szieke / ScriptCommunicator_serial-terminal

Scriptable cross-platform data terminal which supports: serial port, UDP, TCP, SPI, I2C and CAN.

Home Page:https://sourceforge.net/projects/scriptcommunicator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build errors with Qt 5.11

Jakeler opened this issue · comments

commented

Generating the Makefile with: qmake -o Makefile ScriptCommunicator.pro and trying to build with make gives:

/usr/bin/uic mainwindow.ui -o ui_mainwindow.h
/usr/bin/uic settingsdialog.ui -o ui_settingsdialog.h
/usr/bin/uic sendwindow.ui -o ui_sendwindow.h
/usr/bin/uic scriptwindow.ui -o ui_scriptwindow.h
/usr/bin/uic addmessagedialog.ui -o ui_addmessagedialog.h
/usr/bin/uic plotwindow.ui -o ui_plotwindow.h
/usr/bin/uic colorWidgets/color_dialog.ui -o ui_color_dialog.h
/usr/bin/uic colorWidgets/color_palette_widget.ui -o ui_color_palette_widget.h
/usr/bin/uic createSceFile.ui -o ui_createSceFile.h
g++ -c -pipe -Wno-int-to-pointer-cast -Wno-write-strings -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQUAZIP_STATIC -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_SCRIPTTOOLS_LIB -DQT_CORE_LIB -I. -IscriptClasses -IscriptClasses/scriptUiClasses -IcheetahSpi -IaardvarkI2cSpi -Ipcan -IscriptClasses/canvas2D -Iquazip -IScriptEditor -isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtUiTools -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtSerialPort -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtScript -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtScriptTools -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o main.o main.cpp
g++ -c -pipe -Wno-int-to-pointer-cast -Wno-write-strings -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQUAZIP_STATIC -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_SCRIPTTOOLS_LIB -DQT_CORE_LIB -I. -IscriptClasses -IscriptClasses/scriptUiClasses -IcheetahSpi -IaardvarkI2cSpi -Ipcan -IscriptClasses/canvas2D -Iquazip -IScriptEditor -isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtUiTools -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtSerialPort -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtScript -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtScriptTools -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o mainwindow.o mainwindow.cpp
g++ -c -pipe -Wno-int-to-pointer-cast -Wno-write-strings -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQUAZIP_STATIC -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_SCRIPTTOOLS_LIB -DQT_CORE_LIB -I. -IscriptClasses -IscriptClasses/scriptUiClasses -IcheetahSpi -IaardvarkI2cSpi -Ipcan -IscriptClasses/canvas2D -Iquazip -IScriptEditor -isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtUiTools -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtSerialPort -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtScript -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtScriptTools -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o settingsdialog.o settingsdialog.cpp
settingsdialog.cpp: In constructor 'SettingsDialog::SettingsDialog(QAction*)':
settingsdialog.cpp:179:86: error: no matching function for call to 'SettingsDialog::connect(QAction*&, const char [13], SettingsDialog*, const char [21])'
     connect(actionLockScrolling, SIGNAL(triggered()), this, SLOT(lockScrollingSlot()));
                                                                                      ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
                 from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/QDialog:1,
                 from settingsdialog.h:28,
                 from settingsdialog.cpp:25:
/usr/include/qt/QtCore/qobject.h:208:36: note: candidate: 'static QMetaObject::Connection QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)'
     static QMetaObject::Connection connect(const QObject *sender, const char *signal,
                                    ^~~~~~~
/usr/include/qt/QtCore/qobject.h:208:36: note:   no known conversion for argument 1 from 'QAction*' to 'const QObject*'
/usr/include/qt/QtCore/qobject.h:211:36: note: candidate: 'static QMetaObject::Connection QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType)'
     static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
                                    ^~~~~~~
/usr/include/qt/QtCore/qobject.h:211:36: note:   no known conversion for argument 1 from 'QAction*' to 'const QObject*'
/usr/include/qt/QtCore/qobject.h:463:32: note: candidate: 'QMetaObject::Connection QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const'
 inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
                                ^~~~~~~
/usr/include/qt/QtCore/qobject.h:463:32: note:   no known conversion for argument 1 from 'QAction*' to 'const QObject*'
/usr/include/qt/QtCore/qobject.h:228:43: note: candidate: 'template<class Func1, class Func2> static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType)'
     static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
                                           ^~~~~~~
/usr/include/qt/QtCore/qobject.h:228:43: note:   template argument deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of 'template<class Func1, class Func2> static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) [with Func1 = const char*; Func2 = const char*]':
settingsdialog.cpp:179:86:   required from here
/usr/include/qt/QtCore/qobject.h:228:43: error: no type named 'Object' in 'struct QtPrivate::FunctionPointer<const char*>'
/usr/include/qt/QtCore/qobject.h:260:13: note: candidate: 'template<class Func1, class Func2> static typename std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)'
             connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
             ^~~~~~~
/usr/include/qt/QtCore/qobject.h:260:13: note:   template argument deduction/substitution failed:
settingsdialog.cpp:179:86: note:   candidate expects 3 arguments, 4 provided
     connect(actionLockScrolling, SIGNAL(triggered()), this, SLOT(lockScrollingSlot()));
                                                                                      ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
                 from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/QDialog:1,
                 from settingsdialog.h:28,
                 from settingsdialog.cpp:25:
/usr/include/qt/QtCore/qobject.h:269:13: note: candidate: 'template<class Func1, class Func2> static typename std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0) && (! QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)'
             connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
             ^~~~~~~
/usr/include/qt/QtCore/qobject.h:269:13: note:   template argument deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of 'template<class Func1, class Func2> static typename std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0) && (! QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = const char*; Func2 = const char*]':
settingsdialog.cpp:179:86:   required from here
/usr/include/qt/QtCore/qobject.h:269:13: error: no type named 'type' in 'struct std::enable_if<false, QMetaObject::Connection>'
/usr/include/qt/QtCore/qobject.h:300:13: note: candidate: 'template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)'
             connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
             ^~~~~~~
/usr/include/qt/QtCore/qobject.h:300:13: note:   template argument deduction/substitution failed:
settingsdialog.cpp:179:86: note:   candidate expects 3 arguments, 4 provided
     connect(actionLockScrolling, SIGNAL(triggered()), this, SLOT(lockScrollingSlot()));
                                                                                      ^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
                 from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/QDialog:1,
                 from settingsdialog.h:28,
                 from settingsdialog.cpp:25:
/usr/include/qt/QtCore/qobject.h:308:13: note: candidate: 'template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)'
             connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
             ^~~~~~~
/usr/include/qt/QtCore/qobject.h:308:13: note:   template argument deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of 'template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = const char*; Func2 = const char*]':
settingsdialog.cpp:179:86:   required from here
/usr/include/qt/QtCore/qobject.h:308:13: error: no type named 'Object' in 'struct QtPrivate::FunctionPointer<const char*>'
settingsdialog.cpp: In member function 'void SettingsDialog::setAllSettingsSlot(Settings&, bool)':
settingsdialog.cpp:814:26: error: invalid use of incomplete type 'class QAction'
     m_actionLockScrolling->setChecked(settings.lockScrollingInConsole);
                          ^~
In file included from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/QDialog:1,
                 from settingsdialog.h:28,
                 from settingsdialog.cpp:25:
/usr/include/qt/QtWidgets/qwidget.h:68:7: note: forward declaration of 'class QAction'
 class QAction;
       ^~~~~~~
settingsdialog.cpp: In member function 'void SettingsDialog::updateSettings(bool)':
settingsdialog.cpp:2021:69: error: invalid use of incomplete type 'class QAction'
     m_currentSettings.lockScrollingInConsole = m_actionLockScrolling->isChecked();
                                                                     ^~
In file included from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/QDialog:1,
                 from settingsdialog.h:28,
                 from settingsdialog.cpp:25:
/usr/include/qt/QtWidgets/qwidget.h:68:7: note: forward declaration of 'class QAction'
 class QAction;
       ^~~~~~~
make: *** [Makefile:3010: settingsdialog.o] Error 1

Hi,

I build ScriptCommunicator with Qt 5.5 and everthing works fine. I will install Qt 5.11 today and see what the problem is.

Best regards,
Stefan

Hi again,

the reason was a missing include (settingsdialog.h) which is needed for Qt 5.11. You can find the fix on the trunk.

PS: Thx for reporting this issue.

Best regards,
Stefan