Yes, it resolve this problem, but now I have another problem like this in other place :
class Aleja
{
public:
Aleja();
Aleja(QString NumerAleji);// 0-lewa,1-prawa,2-przenia
QList<Strona> Strony;
void DodajElement(QString NrElementu,QString NrStrony);
int ZwrocLiczbeElemntowNaStronie(int NrStrony);
int liczbaElementow();
QString ZwrocNumerElementu(int NrStrony,int PozycjaElementu);
QList<QString> nazwyStron();
QString NrAleji;
int lel; //liczba elementów
bool CzyElementJuzIstnieje(QString NrElementu,int NrStrony);
int PozycjaElementu(QString NrElementu,int NrStrony);
QString LatLog;
Strona pobierzStrone(QString NazwaStrony); // lewa,prawa,przednia
};
class Aleja
{
public:
Aleja();
Aleja(QString NumerAleji);// 0-lewa,1-prawa,2-przenia
QList<Strona> Strony;
void DodajElement(QString NrElementu,QString NrStrony);
int ZwrocLiczbeElemntowNaStronie(int NrStrony);
int liczbaElementow();
QString ZwrocNumerElementu(int NrStrony,int PozycjaElementu);
QList<QString> nazwyStron();
QString NrAleji;
int lel; //liczba elementów
bool CzyElementJuzIstnieje(QString NrElementu,int NrStrony);
int PozycjaElementu(QString NrElementu,int NrStrony);
QString LatLog;
Strona pobierzStrone(QString NazwaStrony); // lewa,prawa,przednia
};
To copy to clipboard, switch view to plain text mode
and function where i have arror:
Aleja::DodajElement Code:
void Aleja::DodajElement(QString NrElementu,QString NrStrony){
Strony.at(1).dodajElement(NrAleji,NrElementu,NrStrony);
}
void Aleja::DodajElement(QString NrElementu,QString NrStrony){
Strony.at(1).dodajElement(NrAleji,NrElementu,NrStrony);
}
To copy to clipboard, switch view to plain text mode
And similar error:
passing 'const Strona' as 'this' argument of 'void Strona::dodajElement(QString, QString, QString)' discards qualifiers
passing 'const Strona' as 'this' argument of 'void Strona::dodajElement(QString, QString, QString)' discards qualifiers
To copy to clipboard, switch view to plain text mode
Bookmarks