diff --git a/CMakeLists.txt b/CMakeLists.txt index c1793681d004f045cf383c0a15c5ad9959d6f9b3..3fcc3f240f166d8ecbf475747a19adaf7e2f5f77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,21 @@ cmake_minimum_required(VERSION 2.8.12) project(kteatime) -find_package(ECM 1.3.0 REQUIRED NO_MODULE) +set(QT_MIN_VERSION "5.9.0") +set(KF5_VERSION "5.46.0") + + +find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(ECMInstallIcons) # Search KDE installation -find_package(Qt5 5.2.0 CONFIG REQUIRED +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets ) -find_package(KF5 5.23.0 REQUIRED +find_package(KF5 ${KF5_VERSION} REQUIRED Config Crash DocTools @@ -25,15 +29,10 @@ find_package(KF5 5.23.0 REQUIRED include(KDEInstallDirs) include(KDECMakeSettings) -include(KDECompilerSettings NO_POLICY_SCOPE) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(FeatureSummary) -add_definitions( -DQT_NO_CAST_FROM_ASCII ) -add_definitions( -DQT_NO_CAST_TO_ASCII ) -add_definitions(-DQT_USE_FAST_OPERATOR_PLUS) add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) -add_definitions(-DQT_NO_URL_CAST_FROM_STRING) -add_definitions(-DQT_USE_QSTRINGBUILDER) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(data) diff --git a/src/tealistmodel.h b/src/tealistmodel.h index ecb61322ba0105ce85000410ed32c74560dd2e88..e30adfd0f4716fbee5fac61b25a830fe28f7ab89 100644 --- a/src/tealistmodel.h +++ b/src/tealistmodel.h @@ -46,7 +46,7 @@ class TeaListModel : public QAbstractTableModel * * @return @ref QModelIndex with the index of the item. */ - QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const override; /** * Returns the number of rows. @@ -54,7 +54,7 @@ class TeaListModel : public QAbstractTableModel * * @return the number of rows. */ - int rowCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; /** * Returns the number of columns. @@ -62,7 +62,7 @@ class TeaListModel : public QAbstractTableModel * * @return the number of columns. */ - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; /** * Returns the data stored under the given role for the item referred to by the index. @@ -71,7 +71,7 @@ class TeaListModel : public QAbstractTableModel * * @return the specified data. */ - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; /** * Sets the role data for the item at index to value. @@ -81,7 +81,7 @@ class TeaListModel : public QAbstractTableModel * * @return if successful true, otherwise false. */ - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; /** * Returns the data for the given role and section in the header with the specified orientation. @@ -91,7 +91,7 @@ class TeaListModel : public QAbstractTableModel * * @return the specified data. */ - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; /** * inserts rows into the model before the given one. @@ -102,7 +102,7 @@ class TeaListModel : public QAbstractTableModel * * @return true if the rows were successfully inserted, otherwise false. */ - bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; /** * removes rows from the model, starting with the given row. @@ -112,7 +112,7 @@ class TeaListModel : public QAbstractTableModel * * @return true if the rows were successfully removed, otherwise false. */ - bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; /** * Returns the whole list of teas.