diff --git a/qucs-activefilter/CMakeLists.txt b/qucs-activefilter/CMakeLists.txt index e53d8010..455027f4 100644 --- a/qucs-activefilter/CMakeLists.txt +++ b/qucs-activefilter/CMakeLists.txt @@ -35,11 +35,18 @@ CONFIGURE_FILE ( INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}") -FIND_PACKAGE( Qt4 REQUIRED ) -SET( QT_USE_QTGUI TRUE ) -SET( QT_USE_QTSVG TRUE ) +FIND_PACKAGE( Qt5 COMPONENTS Core Gui Widgets Svg REQUIRED) +#INCLUDE( ${QT_USE_FILE} ) + +INCLUDE_DIRECTORIES( + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} + ${Qt5Svg_INCLUDE_DIRS} + ) + +# bug, the find package does not seem to set the QT_LIBRARIES, do it manually +SET(QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Svg_LIBRARIES} ) -INCLUDE( ${QT_USE_FILE} ) ADD_DEFINITIONS(${QT_DEFINITIONS}) @@ -61,10 +68,10 @@ qucsactivefilter.h helpdialog.h ) -QT4_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS}) +QT5_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS}) SET(RESOURCES qucsactivefilter.qrc) -QT4_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES}) +QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES}) IF(APPLE) diff --git a/qucs-activefilter/qucsactivefilter.cpp b/qucs-activefilter/qucsactivefilter.cpp index 69be24b7..89b66801 100644 --- a/qucs-activefilter/qucsactivefilter.cpp +++ b/qucs-activefilter/qucsactivefilter.cpp @@ -41,14 +41,14 @@ QucsActiveFilter::QucsActiveFilter(QWidget *parent) setWindowIcon(QPixmap(":/images/bitmaps/big.qucs.xpm")); setWindowTitle("Qucs Active Filter " PACKAGE_VERSION); - QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); + //QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); // -------- create menubar ------------------- QMenu *fileMenu = new QMenu(tr("&File")); QAction * fileQuit = new QAction(tr("E&xit"), this); fileQuit->setShortcut(Qt::CTRL+Qt::Key_Q); - connect(fileQuit, SIGNAL(activated()), SLOT(close())); + connect(fileQuit, SIGNAL(triggered(bool)), SLOT(close())); fileMenu->addAction(fileQuit); @@ -66,15 +66,15 @@ QucsActiveFilter::QucsActiveFilter(QWidget *parent) QMenu *helpMenu = new QMenu(tr("&Help"), this); QAction * helpHelp = new QAction(tr("Help..."), this); helpHelp->setShortcut(Qt::Key_F1); - connect(helpHelp, SIGNAL(activated()), SLOT(slotHelpIntro())); + connect(helpHelp, SIGNAL(triggered(bool)), SLOT(slotHelpIntro())); QAction * helpAbout = new QAction(tr("&About QucsActiveFilter..."), this); helpMenu->addAction(helpAbout); - connect(helpAbout, SIGNAL(activated()), SLOT(slotHelpAbout())); + connect(helpAbout, SIGNAL(triggered(bool)), SLOT(slotHelpAbout())); QAction * helpAboutQt = new QAction(tr("About Qt..."), this); helpMenu->addAction(helpAboutQt); - connect(helpAboutQt, SIGNAL(activated()), SLOT(slotHelpAboutQt())); + connect(helpAboutQt, SIGNAL(triggered(bool)), SLOT(slotHelpAboutQt())); helpMenu->addAction(helpHelp); helpMenu->addSeparator(); diff --git a/qucs-activefilter/transferfuncdialog.h b/qucs-activefilter/transferfuncdialog.h index 6410815d..fca5db24 100644 --- a/qucs-activefilter/transferfuncdialog.h +++ b/qucs-activefilter/transferfuncdialog.h @@ -18,8 +18,8 @@ #ifndef TRANSFERFUNCDIALOG_H #define TRANSFERFUNCDIALOG_H -#include #include +#include class TransferFuncDialog : public QDialog {