Appears to be 2 types of errors
- Errors due to class changes going from Qt3 to Qt4 – These could probably be addressed with correct switch to include q3support library that is included with Qt4. I copied the q3textstream.h to the working directory to get around referencing error. By not setting this I am forcing all the references not compatible with Qt4 to surface.
- Errors due to the translation files not being available for access
freemonsandlewould@desi:~/Documents/qucs-edit$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
main.cpp: In function ‘bool loadSettings()’:
main.cpp:44:14: error: ‘homeDirPath’ is not a member of ‘QDir’
main.cpp:64:8: error: ‘class QFile’ has no member named ‘setName’
main.cpp:64:16: error: ‘homeDirPath’ is not a member of ‘QDir’
main.cpp:73:36: error: ‘class QString’ has no member named ‘stripWhiteSpace’
main.cpp: In function ‘bool saveApplSettings(QucsEdit*)’:
main.cpp:95:14: error: ‘homeDirPath’ is not a member of ‘QDir’
main.cpp:105:43: error: expected ‘;’ before ‘PACKAGE_VERSION’
main.cpp: In function ‘void showOptions()’:
main.cpp:116:55: error: ‘PACKAGE_VERSION’ was not declared in this scope
main.cpp: In function ‘int main(int, char**)’:
main.cpp:150:30: error: ‘BITMAPDIR’ was not declared in this scope
main.cpp:151:28: error: ‘LANGUAGEDIR’ was not declared in this scope
main.cpp:162:12: error: ‘locale’ is not a member of ‘QTextCodec’
main.cpp:172:68: error: cannot convert ‘QString’ to ‘const char*’ for argument ‘2’ to ‘int fprintf(FILE*, const char*, …)’
main.cpp:176:22: error: ‘const class QChar’ has no member named ‘latin1’
main.cpp:182:67: error: cannot convert ‘QString’ to ‘const char*’ for argument ‘2’ to ‘int fprintf(FILE*, const char*, …)’
main.cpp:189:67: error: cannot convert ‘QString’ to ‘const char*’ for argument ‘2’ to ‘int fprintf(FILE*, const char*, …)’
main.cpp:196:5: error: ‘class QApplication’ has no member named ‘setMainWidget’
make: *** [main.o] Error 1
​Migration Qt3 to Qt4: They changed the name of class members that APPEAR to do the same thing.
- homeDirPath becomes: homePath
- setName becomes setFileName
- QString::stripWhiteSpace() becomes QString::Trimmed()
- QLocale class may have to be used to replace QTextCodec::locale … see QLocale::languageToString
- char QChar::latin1 () const Use toLatin1() instead.
- QApplication::setMainWidget goes away?
Modified File: qucsedit
Auxiliary Links
- How can completely port a qt3 library to qt4?
- Porting to Qt4
- Qt3toQt4 tool
- QT += qt3support, to my projects.pro file – this cleared the errors due to missing class members. The remaining errors were those of missing PACKAGE_VERSION, LANGUAGEDIR, BITMAPDIR.
0 Comments