it will help if you can post the errors.but the compiler gives errors
it will help if you can post the errors.but the compiler gives errors
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
thanks for quick replay
this is the code in cpp
Qt Code:
#ifdef Q_WS_X11 #ifdef DEBUGGING qDebug() << PWD_PRO; #else ... #endif #endifTo copy to clipboard, switch view to plain text mode
compiling this gives:
../MediaDownloader/main/styles.cpp:41:17: error: expected primary-expression before ‘/’ token
../MediaDownloader/main/styles.cpp:41:17: error: ‘home’ was not declared in this scope
../MediaDownloader/main/styles.cpp:41:17: error: ‘deimos’ was not declared in this scope
../MediaDownloader/main/styles.cpp:41:17: error: ‘Lavori’ was not declared in this scope
../MediaDownloader/main/styles.cpp:41:17: error: ‘workspace’ was not declared in this scope
../MediaDownloader/main/styles.cpp:41:17: error: ‘MediaDownloader’ was not declared in this scope
that are actualy the path
thanks again
Can you show few (code) lines before and after the line of the first error?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
sure:
Qt Code:
QFileInfoList styles::getCssFileList() { #ifdef Q_WS_X11 #ifdef DEBUGGING qDebug() << PWD_PRO; // CSSpath.setPath(QDir::currentPath()+"/css/"); #else #endif #endif #ifdef Q_WS_WIN #endif if (!CSSpath.exists()) CSSpath.mkdir(CSSpath.absolutePath()); CSSpath=CSSpath.toNativeSeparators(CSSpath.absolutePath()); }To copy to clipboard, switch view to plain text mode
the function is declared static, but even if I put the qDebug() into constructor it gives error
actually I managed this with "#" directive, but my brain can't reach this
Qt Code:
#define QUOTEME_(x) #x #define QUOTEME(x) QUOTEME_(x)To copy to clipboard, switch view to plain text mode
then doing
will exand as I wantQt Code:
qDebug() << QUOTEME(PWD_PRO);To copy to clipboard, switch view to plain text mode
sorry was a c++ related topic not Qt
Bookmarks