diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2020-09-16 10:50:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-23 12:26:52 +0200 |
commit | 0e1372d95939d3bd3889100fbec10036d7a83f1f (patch) | |
tree | a86a53db4ff36857a1373265b896745d538ce98f | |
parent | b2a329d3e136a847a352b5f894ce27bd38abe61c (diff) |
Fix compilation after 757a9c21c1 in base
Adaptations for the following qtbase changes:
- acbf9a858b Cleanup QTypeInfo
- 652bd1efca Make QStringList an alias to QList<QString>
- 25351dcc54 Long live QKeyCombination!
- ed8acbeb7c Automatically register data/debug stream operations in QMetaType
- a735038376 Move QStateMachine from QtCore to QtScxml
Change-Id: Ieb2677cd0572cc6dfe7be4b8f8dd4189a39bd3fe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | examples/webenginewidgets/printme/main.cpp | 4 | ||||
-rw-r--r-- | examples/webenginewidgets/simplebrowser/browserwindow.cpp | 4 | ||||
-rw-r--r-- | examples/webenginewidgets/stylesheetbrowser/main.cpp | 2 | ||||
-rw-r--r-- | src/core/api/qwebenginecallback_p.h | 2 | ||||
-rw-r--r-- | src/core/pref_service_adapter.h | 2 | ||||
-rw-r--r-- | src/core/profile_qt.h | 1 | ||||
-rw-r--r-- | src/pdfwidgets/qpdfview_p.h | 1 | ||||
-rw-r--r-- | tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 9 |
8 files changed, 15 insertions, 10 deletions
diff --git a/examples/webenginewidgets/printme/main.cpp b/examples/webenginewidgets/printme/main.cpp index e4d6d9dc8..212faf12e 100644 --- a/examples/webenginewidgets/printme/main.cpp +++ b/examples/webenginewidgets/printme/main.cpp @@ -66,8 +66,8 @@ int main(int argc, char *argv[]) PrintHandler handler; handler.setPage(view.page()); - auto printPreviewShortCut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_P), &view); - auto printShortCut = new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_P), &view); + auto printPreviewShortCut = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_P), &view); + auto printShortCut = new QShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_P), &view); QObject::connect(printPreviewShortCut, &QShortcut::activated, &handler, &PrintHandler::printPreview); QObject::connect(printShortCut, &QShortcut::activated, &handler, &PrintHandler::print); diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp index f34fd79c4..26639117c 100644 --- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp +++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp @@ -341,7 +341,7 @@ QToolBar *BrowserWindow::createToolBar() QList<QKeySequence> backShortcuts = QKeySequence::keyBindings(QKeySequence::Back); for (auto it = backShortcuts.begin(); it != backShortcuts.end();) { // Chromium already handles navigate on backspace when appropriate. - if ((*it)[0] == Qt::Key_Backspace) + if ((*it)[0].key() == Qt::Key_Backspace) it = backShortcuts.erase(it); else ++it; @@ -360,7 +360,7 @@ QToolBar *BrowserWindow::createToolBar() m_historyForwardAction = new QAction(this); QList<QKeySequence> fwdShortcuts = QKeySequence::keyBindings(QKeySequence::Forward); for (auto it = fwdShortcuts.begin(); it != fwdShortcuts.end();) { - if (((*it)[0] & Qt::Key_unknown) == Qt::Key_Backspace) + if (((*it)[0].key() & Qt::Key_unknown) == Qt::Key_Backspace) it = fwdShortcuts.erase(it); else ++it; diff --git a/examples/webenginewidgets/stylesheetbrowser/main.cpp b/examples/webenginewidgets/stylesheetbrowser/main.cpp index 833ea6bb0..9cd294d48 100644 --- a/examples/webenginewidgets/stylesheetbrowser/main.cpp +++ b/examples/webenginewidgets/stylesheetbrowser/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { - qRegisterMetaTypeStreamOperators<StyleSheet>("StyleSheet"); + qRegisterMetaType<StyleSheet>("StyleSheet"); QCoreApplication::setOrganizationName("QtExamples"); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); diff --git a/src/core/api/qwebenginecallback_p.h b/src/core/api/qwebenginecallback_p.h index 133a86f6d..9cc25b7fd 100644 --- a/src/core/api/qwebenginecallback_p.h +++ b/src/core/api/qwebenginecallback_p.h @@ -244,7 +244,7 @@ inline void CallbackDirectory::CallbackSharedDataPointer<T>::invokeEmpty() parent->invokeEmptyInternal(callback); } -#define CHECK_RELOCATABLE(x) Q_STATIC_ASSERT((QTypeInfoQuery<QWebEngineCallback<x>>::isRelocatable)); +#define CHECK_RELOCATABLE(x) Q_STATIC_ASSERT((QTypeInfo<QWebEngineCallback<x>>::isRelocatable)); FOR_EACH_TYPE(CHECK_RELOCATABLE) #undef CHECK_RELOCATABLE diff --git a/src/core/pref_service_adapter.h b/src/core/pref_service_adapter.h index 5c4c6e92a..93a61302f 100644 --- a/src/core/pref_service_adapter.h +++ b/src/core/pref_service_adapter.h @@ -44,8 +44,6 @@ #include "components/prefs/pref_service.h" #include "qtwebenginecoreglobal_p.h" -QT_FORWARD_DECLARE_CLASS(QStringList) - namespace QtWebEngineCore { class ProfileAdapter; diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h index df84136bc..11b567b97 100644 --- a/src/core/profile_qt.h +++ b/src/core/profile_qt.h @@ -48,7 +48,6 @@ #include "profile_io_data_qt.h" #include <QtGlobal> -QT_FORWARD_DECLARE_CLASS(QStringList) class InMemoryPrefStore; class PrefService; diff --git a/src/pdfwidgets/qpdfview_p.h b/src/pdfwidgets/qpdfview_p.h index 7e758832c..d6b3f0345 100644 --- a/src/pdfwidgets/qpdfview_p.h +++ b/src/pdfwidgets/qpdfview_p.h @@ -50,6 +50,7 @@ #include "qpdfview.h" +#include <QHash> #include <QPointer> QT_BEGIN_NAMESPACE diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 531477b65..f530fefbb 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -34,7 +34,9 @@ #include <QPaintEngine> #include <QPushButton> #include <QScreen> -#include <QStateMachine> +#if defined(QT_STATEMACHINE_LIB) +# include <QStateMachine> +#endif #include <QtGui/QClipboard> #include <QtTest/QtTest> #include <QTextCharFormat> @@ -129,8 +131,10 @@ private Q_SLOTS: void findTextCalledOnMatch(); void findTextActiveMatchOrdinal(); void deleteQWebEngineViewTwice(); +#if defined(QT_STATEMACHINE_LIB) void loadSignalsOrder_data(); void loadSignalsOrder(); +#endif void openWindowDefaultSize(); #ifdef Q_OS_MAC @@ -1356,6 +1360,8 @@ void tst_QWebEnginePage::deleteQWebEngineViewTwice() } } +// TODO: Reimplement test without QStateMachine or add qtscxml module dependency +#if defined(QT_STATEMACHINE_LIB) class SpyForLoadSignalsOrder : public QStateMachine { Q_OBJECT public: @@ -1413,6 +1419,7 @@ void tst_QWebEnginePage::loadSignalsOrder() page.load(url); QTRY_VERIFY_WITH_TIMEOUT(loadSpy.isFinished(), 20000); } +#endif // defined(QT_STATEMACHINE_LIB) void tst_QWebEnginePage::renderWidgetHostViewNotShowTopLevel() { |