From 19b804b8500add399e1ed13c01280b9e2e4504f2 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 26 Jun 2016 10:32:24 +0000 Subject: [PATCH] various cleanups Signed-off-by: Ivailo Monev --- CMakeLists.txt | 4 ++++ mkspecs/tests/tests.cmake | 3 +-- src/gui/dialogs/qmessagebox.cpp | 9 --------- src/gui/dialogs/qmessagebox.h | 2 -- src/gui/itemviews/qtreewidget.cpp | 20 -------------------- src/gui/itemviews/qtreewidget.h | 2 -- src/gui/kernel/qevent.cpp | 31 ------------------------------- src/gui/kernel/qevent.h | 4 ---- src/help/qhelpengine.cpp | 1 - src/help/qhelpengine_p.h | 2 -- src/help/qhelpenginecore.cpp | 1 - 11 files changed, 5 insertions(+), 74 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f5c8ab78..31cfdf152 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/staticlib") include(CheckIncludeFile) +include(CheckTypeSize) include(FeatureSummary) include(KatieMacros) include(KatieBuildMacros) @@ -210,6 +211,9 @@ else() add_definitions(-DTIME_WITH_SYS_TIME=0) endif() +# used in qconfig.h +check_type_size(size_t QT_POINTER_SIZE) + configure_file( ${CMAKE_SOURCE_DIR}/src/core/global/qconfig.h.cmake ${CMAKE_BINARY_DIR}/include/QtCore/qconfig.h diff --git a/mkspecs/tests/tests.cmake b/mkspecs/tests/tests.cmake index bed79b2ca..4b43ccbd8 100644 --- a/mkspecs/tests/tests.cmake +++ b/mkspecs/tests/tests.cmake @@ -78,5 +78,4 @@ endmacro() katie_misc_test(stl STL) -include(CheckTypeSize) -check_type_size(size_t QT_POINTER_SIZE) +# TODO: check if data relocations should be disabled before any target additions and define Q_NO_DATA_RELOCATION diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index af63084a9..532061ad9 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -1736,15 +1736,6 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) #endif } -/*! - \internal -*/ -QSize QMessageBox::sizeHint() const -{ - // ### Qt 5: remove - return QDialog::sizeHint(); -} - ///////////////////////////////////////////////////////////////////////////////////////// // Source and binary compatibility routines for 4.0 and 4.1 diff --git a/src/gui/dialogs/qmessagebox.h b/src/gui/dialogs/qmessagebox.h index 47803782b..550fcb610 100644 --- a/src/gui/dialogs/qmessagebox.h +++ b/src/gui/dialogs/qmessagebox.h @@ -198,8 +198,6 @@ public: static void about(QWidget *parent, const QString &title, const QString &text); static void aboutQt(QWidget *parent, const QString &title = QString()); - QSize sizeHint() const; - QString informativeText() const; void setInformativeText(const QString &text); diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index 08cf909ed..e23a6cbbe 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -2887,26 +2887,6 @@ void QTreeWidget::sortItems(int column, Qt::SortOrder order) d->model->sort(column, order); } -/*! - \internal - - ### Qt 5: remove -*/ -void QTreeWidget::setSortingEnabled(bool enable) -{ - QTreeView::setSortingEnabled(enable); -} - -/*! - \internal - - ### Qt 5: remove -*/ -bool QTreeWidget::isSortingEnabled() const -{ - return QTreeView::isSortingEnabled(); -} - /*! Starts editing the \a item in the given \a column if it is editable. */ diff --git a/src/gui/itemviews/qtreewidget.h b/src/gui/itemviews/qtreewidget.h index 143e34a5f..f31545011 100644 --- a/src/gui/itemviews/qtreewidget.h +++ b/src/gui/itemviews/qtreewidget.h @@ -299,8 +299,6 @@ public: int sortColumn() const; void sortItems(int column, Qt::SortOrder order); - void setSortingEnabled(bool enable); - bool isSortingEnabled() const; void editItem(QTreeWidgetItem *item, int column = 0); void openPersistentEditor(QTreeWidgetItem *item, int column = 0); diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 522f2004e..8a25b253a 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -905,15 +905,6 @@ QFocusEvent::~QFocusEvent() { } -// ### Qt 5: remove -/*! - \internal - */ -Qt::FocusReason QFocusEvent::reason() -{ - return m_reason; -} - /*! Returns the reason for this focus event. */ @@ -3389,13 +3380,6 @@ QClipboardEvent::~QClipboardEvent() Returns the key sequence that triggered the event. */ -// ### Qt 5: remove -/*! - \fn const QKeySequence &QShortcutEvent::key() - - \internal -*/ - /*! \fn int QShortcutEvent::shortcutId() const @@ -3405,14 +3389,6 @@ QClipboardEvent::~QClipboardEvent() \sa QShortcut::id() */ -// ### Qt 5: remove -/*! - \fn int QShortcutEvent::shortcutId() - \overload - - \internal -*/ - /*! \fn bool QShortcutEvent::isAmbiguous() const @@ -3422,13 +3398,6 @@ QClipboardEvent::~QClipboardEvent() \sa QShortcut::activatedAmbiguously() */ -// ### Qt 5: remove -/*! - \fn bool QShortcutEvent::isAmbiguous() - - \internal -*/ - /*! \class QWindowStateChangeEvent \ingroup events diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 9f2bc224a..ecfe72499 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -245,7 +245,6 @@ public: inline bool gotFocus() const { return type() == FocusIn; } inline bool lostFocus() const { return type() == FocusOut; } - Qt::FocusReason reason(); Qt::FocusReason reason() const; private: @@ -609,11 +608,8 @@ public: QShortcutEvent(const QKeySequence &key, int id, bool ambiguous = false); ~QShortcutEvent(); - inline const QKeySequence &key() { return sequence; } inline const QKeySequence &key() const { return sequence; } - inline int shortcutId() { return sid; } inline int shortcutId() const { return sid; } - inline bool isAmbiguous() { return ambig; } inline bool isAmbiguous() const { return ambig; } protected: QKeySequence sequence; diff --git a/src/help/qhelpengine.cpp b/src/help/qhelpengine.cpp index e6284feb1..5124a2d40 100644 --- a/src/help/qhelpengine.cpp +++ b/src/help/qhelpengine.cpp @@ -52,7 +52,6 @@ #include #include #include -#include QT_BEGIN_NAMESPACE diff --git a/src/help/qhelpengine_p.h b/src/help/qhelpengine_p.h index fb864cbb1..d184c737a 100644 --- a/src/help/qhelpengine_p.h +++ b/src/help/qhelpengine_p.h @@ -60,8 +60,6 @@ QT_BEGIN_NAMESPACE -class QSqlQuery; - class QHelpEngineCore; class QHelpDBReader; class QHelpContentModel; diff --git a/src/help/qhelpenginecore.cpp b/src/help/qhelpenginecore.cpp index 3f2adff98..edeb098f6 100644 --- a/src/help/qhelpenginecore.cpp +++ b/src/help/qhelpenginecore.cpp @@ -51,7 +51,6 @@ #include #include #include -#include QT_BEGIN_NAMESPACE