Reinstall old qt 4.4.0



  • Hi All,
    I have a very old (GPL) program developed with qt4.4.0/MinGW needing some small tweaks.

    I completely lost in the years the development environment and I am stuck.
    I tried reinstalling qt-win-opensource-4.4.0-mingw.exe, but it fails to fetch MinGW (unable to contact server).
    Installing a current version of MinGW doesn't work either because of library mismatch.
    I also tried to install current version of Qt, but that also fails due to change in Qt API (I would like to touch the old code as little as possible).

    Can someone suggest what should I do?

    TiA
    Mauro


  • Moderators

    I think updating Qt version (and fixing incompatibility problems) is the best option: Qt should be source-compatible, so it is likely that all is needed are some minor tweaks. And you will be left with a fresh code that can be recompiled any time, without having to prepare a very special setup.

    Or you can compile Qt 4.4 from source and then compile your project without any changes.



  • Uhm...
    that doesn't look really true.
    As said I already tried that route.

    Using latest Qt5.2.1 I see MAJOR API changes (unless I did some very large mistake somewhere);
    @D:\mcon\Documents\devel\Reader2>mingw32-make
    D:/opt/Qt/Qt5.2.1/Tools/mingw48_32/bin/mingw32-make.EXE -f Makefile.Release
    mingw32-make.EXE[1]: Entering directory 'D:/mcon/Documents/devel/Reader2'
    g++ -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -I"........\opt\Qt\Qt5.2.1\5.2.1\mingw48_32\include" -I"........\opt\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtGui" -I"........\opt\Qt\Qt5.2.1\5.2.1\mingw48_32\include\QtCore" -I"release" -I"........\opt\Qt\Qt5.2.1\5.2.1\mingw48_32\mkspecs\win32-g++" -o release\setup.o setup.cpp
    In file included from setup.cpp:24:0:
    setup.h:23:25: fatal error: QtGui/QDialog: No such file or directory
    #include <QtGui/QDialog>
    ^
    compilation terminated.
    Makefile.Release:519: recipe for target 'release/setup.o' failed
    mingw32-make.EXE[1]: *** [release/setup.o] Error 1
    mingw32-make.EXE[1]: Leaving directory 'D:/mcon/Documents/devel/Reader2'
    makefile:34: recipe for target 'release' failed
    mingw32-make.EXE: *** [release] Error 2
    @

    I checked; the header is NOT in the release.
    Having to code around QDialog missing does not seem a "minor tweak" to me.

    What am I doing wrong?
    TiA
    Mauro


  • Moderators

    I was not talking about Qt 5... use Qt 4.8.5, it should compile without any code changes. Migration to Qt 5 will be a bit more tricky, but usually can be done easily, too. There is a perl script that automatically ports most of the code.

    All widgets in Qt5 are now in QtWidgets module. Best include <QDialog> and it will remain valid in all Qt versions.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.