Compiling error: QUAboutDialog.cpp

  • Roysen

    Uman version: 1.7.1
    OpenSuse 11.1
    Qt 4.4.3

    make give this error:

    /usr/bin/uic QUMontyArea.ui -o ui_QUMontyArea.h
    /usr/bin/uic QUAboutDialog.ui -o ui_QUAboutDialog.h
    'horizontalSpacer' isn't a valid widget
    '' isn't a valid widget
    /usr/bin/uic QUFilterArea.ui -o ui_QUFilterArea.h
    /usr/bin/uic QUCoverGroup.ui -o ui_QUCoverGroup.h
    /usr/bin/uic QUAmazonArea.ui -o ui_QUAmazonArea.h
    /usr/bin/uic QUTaskDialog.ui -o ui_QUTaskDialog.h
    /usr/bin/uic QUCustomTagsDialog.ui -o ui_QUCustomTagsDialog.h
    /usr/bin/uic QUPlaylistArea.ui -o ui_QUPlaylistArea.h
    /usr/bin/uic QUPictureDialog.ui -o ui_QUPictureDialog.h
    /usr/bin/uic QUMessageBox.ui -o ui_QUMessageBox.h
    /usr/bin/uic QUReportDialog.ui -o ui_QUReportDialog.h
    /usr/bin/uic QUProgressDialog.ui -o ui_QUProgressDialog.h
    /usr/bin/uic QUTextDialog.ui -o ui_QUTextDialog.h
    /usr/bin/uic QUTagOrderDialog.ui -o ui_QUTagOrderDialog.h
    /usr/bin/uic QUMainWindow.ui -o ui_QUMainWindow.h
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -Itasks -Idetails -Isongtree -Ireports -Itasks/taskDialog -Ipreview -Iplaylist -Iamazon -Imetaphone -Ifilter -Imonty -I/usr/include/taglib -I. -I. -o QULogService.o QULogService.cpp
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -Itasks -Idetails -Isongtree -Ireports -Itasks/taskDialog -Ipreview -Iplaylist -Iamazon -Imetaphone -Ifilter -Imonty -I/usr/include/taglib -I. -I. -o QULyricTask.o tasks/QULyricTask.cpp
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -Itasks -Idetails -Isongtree -Ireports -Itasks/taskDialog -Ipreview -Iplaylist -Iamazon -Imetaphone -Ifilter -Imonty -I/usr/include/taglib -I. -I. -o QUSongLine.o QUSongLine.cpp
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -Itasks -Idetails -Isongtree -Ireports -Itasks/taskDialog -Ipreview -Iplaylist -Iamazon -Imetaphone -Ifilter -Imonty -I/usr/include/taglib -I. -I. -o QUMontyArea.o monty/QUMontyArea.cpp
    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -Itasks -Idetails -Isongtree -Ireports -Itasks/taskDialog -Ipreview -Iplaylist -Iamazon -Imetaphone -Ifilter -Imonty -I/usr/include/taglib -I. -I. -o QUAboutDialog.o QUAboutDialog.cpp
    QUAboutDialog.cpp: In constructor ‘QUAboutDialog::QUAboutDialog(QWidget*)’:
    QUAboutDialog.cpp:23: error: ‘date_time’ was not declared in this scope
    QUAboutDialog.cpp:29: error: ‘revision’ was not declared in this scope
    make: *** [QUAboutDialog.o] Error 1

    • I have commented out some lines on this file just to keep going with the compiling. Anyways I am stuck later on the compiling.
      Just in case I am sending to you the commented out lines...

      QUAboutDialog.cpp :

      //      QDateTime dateTime = QDateTime::fromString(QString(date_time), "dd.MM.yyyy HH:mm");

              versionLbl->setText(QString(tr("Version: <b>%1.%2.%3</b><br>SVN: #%4, %5"))
      //                      .arg(QString(revision).remove(QRegExp("(.*:)|\\D")))
      //                      .arg(dateTime.toString("MMM dd yyyy, HH:mm")));

    • After sending this to you I have figured out that the problem is that the variables are undeclared. So to solve this issue you have to previusly declared variables like date_time and revision. Maybe

      QString date_time;
      QString revision;

      QDateTime dateTime = QDateTime::fromString(date_time, "dd.MM.yyyy HH:mm");

      versionLbl->setText(QString(tr("Version: <b>%1.%2.%3</b><br>SVN: #%4, %5"))
      .arg(dateTime.toString("MMM dd yyyy, HH:mm")));

      Maybe Marcel can change it to this, to avoid this compile problem in some boxes. :)

    • Marcel Taeumel
      Marcel Taeumel

      Well, you could create a "version.h" with the correct fields, e.g.:

      const char *revision = "r275:277M"; const char *date_time = "29.10.2008 19:09"; 

      There is an extra target in the Qt Project File:

      QMAKE_EXTRA_TARGETS += revtarget
      PRE_TARGETDEPS += version.h = version.h
      revtarget.commands = @echo \     "const char *revision = \&quot;r$(shell svnversion .)\&quot;; \     const \     char \     *date_time \     = \     \&quot;$(shell date /T)$(shell time /T)\&quot;;" > $$ \ &&python
      revtarget.depends = $$SOURCES \     $$HEADERS \     $$FORMS

      But if you only have the source, it will not compile. Hmmm. You could make a real SVN-Checkout. Then it should work. Or just create a version.h

      I will try to provide better cross-platform compatibility of my source code in the next release. :)

      • Sounds great!