From 3f91cde588ad32277ba06d625ed36256ec65f88e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 20 Feb 2012 17:02:41 +0000 Subject: Test for QT_NO_SSL instead of QT_NO_OPENSSL Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore --- examples/network/download/main.cpp | 2 +- examples/network/http/httpwindow.cpp | 6 +++--- examples/network/http/httpwindow.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp index aea42a540c..ae3aa1f78b 100644 --- a/examples/network/download/main.cpp +++ b/examples/network/download/main.cpp @@ -151,7 +151,7 @@ void DownloadManager::execute() void DownloadManager::sslErrors(const QList &sslErrors) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL foreach (const QSslError &error, sslErrors) fprintf(stderr, "SSL error: %s\n", qPrintable(error.errorString())); #endif diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp index 2f5f739853..c56a6fa53f 100644 --- a/examples/network/http/httpwindow.cpp +++ b/examples/network/http/httpwindow.cpp @@ -47,7 +47,7 @@ HttpWindow::HttpWindow(QWidget *parent) : QDialog(parent) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL urlLineEdit = new QLineEdit("https://qt.nokia.com/"); #else urlLineEdit = new QLineEdit("http://qt.nokia.com/"); @@ -75,7 +75,7 @@ HttpWindow::HttpWindow(QWidget *parent) connect(&qnam, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(slotAuthenticationRequired(QNetworkReply*,QAuthenticator*))); -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL connect(&qnam, SIGNAL(sslErrors(QNetworkReply*,QList)), this, SLOT(sslErrors(QNetworkReply*,QList))); #endif @@ -247,7 +247,7 @@ void HttpWindow::slotAuthenticationRequired(QNetworkReply*,QAuthenticator *authe } } -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void HttpWindow::sslErrors(QNetworkReply*,const QList &errors) { QString errorString; diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h index 54587b2f6d..a3694ddcbe 100644 --- a/examples/network/http/httpwindow.h +++ b/examples/network/http/httpwindow.h @@ -76,7 +76,7 @@ private slots: void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes); void enableDownloadButton(); void slotAuthenticationRequired(QNetworkReply*,QAuthenticator *); -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void sslErrors(QNetworkReply*,const QList &errors); #endif -- cgit v1.2.3 From d91cf1e53b450483d92c50965fd3c33ab1da4300 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Feb 2012 16:09:30 +0100 Subject: clean up qmake-generated projects remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern --- examples/dbus/complexpingpong/complexping.pro | 5 ----- examples/dbus/complexpingpong/complexpong.pro | 5 ----- examples/dbus/dbus-chat/dbus-chat.pro | 6 +----- examples/dbus/listnames/listnames.pro | 5 ----- examples/dbus/pingpong/ping.pro | 6 ------ examples/dbus/pingpong/pong.pro | 6 ------ examples/dbus/remotecontrolledcar/car/car.pro | 10 +--------- .../dbus/remotecontrolledcar/controller/controller.pro | 10 +--------- examples/embedded/styleexample/styleexample.pro | 5 +---- examples/graphicsview/boxes/boxes.pro | 12 +----------- examples/graphicsview/flowlayout/flowlayout.pro | 6 +----- .../weatheranchorlayout/weatheranchorlayout.pro | 6 +----- examples/itemviews/spreadsheet/spreadsheet.pro | 12 ------------ examples/network/download/download.pro | 9 --------- examples/network/downloadmanager/downloadmanager.pro | 10 +--------- examples/opengl/hellogl_es/hellogl_es.pro | 7 +------ examples/opengl/hellogl_es2/hellogl_es2.pro | 11 +---------- examples/opengl/hellowindow/hellowindow.pro | 9 +-------- examples/opengl/paintedwindow/paintedwindow.pro | 10 ---------- examples/opengl/pbuffers2/pbuffers2.pro | 10 ---------- examples/qpa/windows/windows.pro | 14 ++------------ examples/qtconcurrent/imagescaling/imagescaling.pro | 9 +-------- examples/qtconcurrent/map/map.pro | 6 +----- examples/qtconcurrent/progressdialog/progressdialog.pro | 10 ++-------- examples/qtconcurrent/runfunction/runfunction.pro | 10 ++-------- examples/qtconcurrent/wordcount/wordcount.pro | 10 ++-------- examples/threads/waitconditions/waitconditions.pro | 11 +---------- examples/widgets/validators/validators.pro | 12 +----------- 28 files changed, 23 insertions(+), 219 deletions(-) (limited to 'examples') diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro index bc45e99c7b..303f6eb2d7 100644 --- a/examples/dbus/complexpingpong/complexping.pro +++ b/examples/dbus/complexpingpong/complexping.pro @@ -1,14 +1,9 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT -= gui CONFIG += qdbus -# Input HEADERS += complexping.h ping-common.h SOURCES += complexping.cpp -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro index 0934740185..fcb833e596 100644 --- a/examples/dbus/complexpingpong/complexpong.pro +++ b/examples/dbus/complexpingpong/complexpong.pro @@ -1,14 +1,9 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT -= gui CONFIG += qdbus -# Input HEADERS += complexpong.h SOURCES += complexpong.cpp -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro index e1a3539cf3..29b1f56826 100644 --- a/examples/dbus/dbus-chat/dbus-chat.pro +++ b/examples/dbus/dbus-chat/dbus-chat.pro @@ -1,9 +1,6 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . CONFIG += qdbus +QT += widgets -# Input HEADERS += chat.h chat_adaptor.h chat_interface.h SOURCES += chat.cpp chat_adaptor.cpp chat_interface.cpp FORMS += chatmainwindow.ui chatsetnickname.ui @@ -17,5 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/chat INSTALLS += target sources -QT += widgets simulator: warning(This example does not work on Simulator platform) diff --git a/examples/dbus/listnames/listnames.pro b/examples/dbus/listnames/listnames.pro index a863bbc83d..27805e5f6b 100644 --- a/examples/dbus/listnames/listnames.pro +++ b/examples/dbus/listnames/listnames.pro @@ -1,14 +1,9 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT -= gui CONFIG += qdbus win32:CONFIG += console -# Input SOURCES += listnames.cpp -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/listnames sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/listnames diff --git a/examples/dbus/pingpong/ping.pro b/examples/dbus/pingpong/ping.pro index 533371c2ce..2ba1ad2c9c 100644 --- a/examples/dbus/pingpong/ping.pro +++ b/examples/dbus/pingpong/ping.pro @@ -1,15 +1,9 @@ -TEMPLATE = app -TARGET = ping -DEPENDPATH += . -INCLUDEPATH += . QT -= gui CONFIG += qdbus -# Input HEADERS += ping-common.h SOURCES += ping.cpp -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong diff --git a/examples/dbus/pingpong/pong.pro b/examples/dbus/pingpong/pong.pro index 37a5a5c404..5c7cb85c43 100644 --- a/examples/dbus/pingpong/pong.pro +++ b/examples/dbus/pingpong/pong.pro @@ -1,15 +1,9 @@ -TEMPLATE = app -TARGET = pong -DEPENDPATH += . -INCLUDEPATH += . QT -= gui CONFIG += qdbus -# Input HEADERS += ping-common.h pong.h SOURCES += pong.cpp -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro index 761181a782..ea49a7a6d3 100644 --- a/examples/dbus/remotecontrolledcar/car/car.pro +++ b/examples/dbus/remotecontrolledcar/car/car.pro @@ -1,13 +1,6 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Mon Aug 28 19:50:14 2006 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += widgets CONFIG += qdbus -# Input # DBUS_ADAPTORS += car.xml HEADERS += car.h car_adaptor.h SOURCES += car.cpp main.cpp car_adaptor.cpp @@ -18,5 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/car INSTALLS += target sources -QT += widgets simulator: warning(This example does not work on Simulator platform) diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro index 36983e0c54..07fd169519 100644 --- a/examples/dbus/remotecontrolledcar/controller/controller.pro +++ b/examples/dbus/remotecontrolledcar/controller/controller.pro @@ -1,13 +1,6 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Tue Aug 29 12:28:05 2006 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += widgets CONFIG += qdbus -# Input # DBUS_INTERFACES += car.xml FORMS += controller.ui HEADERS += car_interface.h controller.h @@ -19,5 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/controller INSTALLS += target sources -QT += widgets simulator: warning(This example does not work on Simulator platform) diff --git a/examples/embedded/styleexample/styleexample.pro b/examples/embedded/styleexample/styleexample.pro index 3cd4d0a3c0..a0fd001cf9 100644 --- a/examples/embedded/styleexample/styleexample.pro +++ b/examples/embedded/styleexample/styleexample.pro @@ -1,6 +1,5 @@ -TEMPLATE = app +QT += widgets -# Input HEADERS += stylewidget.h FORMS += stylewidget.ui SOURCES += main.cpp stylewidget.cpp @@ -10,5 +9,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample INSTALLS += target sources - -QT += widgets widgets diff --git a/examples/graphicsview/boxes/boxes.pro b/examples/graphicsview/boxes/boxes.pro index 176bc3a1cf..0564ae0ba6 100644 --- a/examples/graphicsview/boxes/boxes.pro +++ b/examples/graphicsview/boxes/boxes.pro @@ -1,13 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) ma 3. nov 17:33:30 2008 -###################################################################### - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . +QT += opengl widgets -# Input HEADERS += 3rdparty/fbm.h \ glbuffers.h \ glextensions.h \ @@ -27,8 +19,6 @@ SOURCES += 3rdparty/fbm.c \ RESOURCES += boxes.qrc -QT += opengl widgets - # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/boxes sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.jpg *.png *.fsh *.vsh *.par diff --git a/examples/graphicsview/flowlayout/flowlayout.pro b/examples/graphicsview/flowlayout/flowlayout.pro index 8d1f7b85ff..4a4b22bcf7 100644 --- a/examples/graphicsview/flowlayout/flowlayout.pro +++ b/examples/graphicsview/flowlayout/flowlayout.pro @@ -1,12 +1,8 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += widgets QMAKE_PROJECT_NAME = flowlayout_graphicsview -# Input HEADERS += flowlayout.h window.h SOURCES += flowlayout.cpp main.cpp window.cpp -QT += widgets simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro index 4c2fdc60de..b6eb292a12 100644 --- a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro +++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro @@ -1,8 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Tue May 12 15:22:25 2009 -###################################################################### +QT += widgets -# Input SOURCES += main.cpp RESOURCES += weatheranchorlayout.qrc @@ -12,5 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES weatheranchorlayout.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/weatheranchorlayout INSTALLS += target sources -QT += widgets simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/itemviews/spreadsheet/spreadsheet.pro b/examples/itemviews/spreadsheet/spreadsheet.pro index f00dfb4c81..93fc5e95c6 100644 --- a/examples/itemviews/spreadsheet/spreadsheet.pro +++ b/examples/itemviews/spreadsheet/spreadsheet.pro @@ -1,17 +1,6 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Thu Mar 5 14:39:33 2009 -###################################################################### - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - QT += widgets printsupport -CONFIG += qt warn_on #unix:contains(QT_CONFIG, dbus):QT += dbus widgets -# Input HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h SOURCES += main.cpp \ printview.cpp \ @@ -20,7 +9,6 @@ SOURCES += main.cpp \ spreadsheetitem.cpp RESOURCES += spreadsheet.qrc - build_all:!build_pass { CONFIG -= build_all CONFIG += release diff --git a/examples/network/download/download.pro b/examples/network/download/download.pro index 7c53044f69..3eabedd375 100644 --- a/examples/network/download/download.pro +++ b/examples/network/download/download.pro @@ -1,14 +1,6 @@ -###################################################################### -# Automatically generated by qmake (2.01a) fr. nov. 16 13:18:20 2007 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT = core network CONFIG += console -# Input SOURCES += main.cpp # install @@ -17,5 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/download INSTALLS += target sources - simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/network/downloadmanager/downloadmanager.pro b/examples/network/downloadmanager/downloadmanager.pro index 6b7e4f8757..04a6c4c4ea 100644 --- a/examples/network/downloadmanager/downloadmanager.pro +++ b/examples/network/downloadmanager/downloadmanager.pro @@ -1,14 +1,6 @@ -###################################################################### -# Automatically generated by qmake (2.01a) fr. nov. 16 14:11:36 2007 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT = core network CONFIG += console -# Input HEADERS += downloadmanager.h textprogressbar.h SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp @@ -18,7 +10,6 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/downloadmanager INSTALLS += target sources - OTHER_FILES += \ debian/changelog \ debian/compat \ @@ -26,4 +17,5 @@ OTHER_FILES += \ debian/copyright \ debian/README \ debian/rules + simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro index 6932b77831..ca0a4bf4cd 100644 --- a/examples/opengl/hellogl_es/hellogl_es.pro +++ b/examples/opengl/hellogl_es/hellogl_es.pro @@ -1,17 +1,12 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += gui -# Input SOURCES += main.cpp SOURCES += glwindow.cpp HEADERS += glwindow.h RESOURCES += texture.qrc -QT += gui -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro index d5bc7ba0a5..5a3d170df8 100644 --- a/examples/opengl/hellogl_es2/hellogl_es2.pro +++ b/examples/opengl/hellogl_es2/hellogl_es2.pro @@ -1,12 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Thu Oct 4 19:01:12 2007 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += opengl widgets -# Input SOURCES += main.cpp SOURCES += glwidget.cpp SOURCES += mainwindow.cpp @@ -17,7 +10,6 @@ HEADERS += mainwindow.h HEADERS += bubble.h RESOURCES += texture.qrc -QT += opengl widgets # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2 @@ -25,7 +17,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es2.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2 INSTALLS += target sources - maemo5 { # Debian package name may not contain numbers or special characters # such as '_', lets change this in Maemo. diff --git a/examples/opengl/hellowindow/hellowindow.pro b/examples/opengl/hellowindow/hellowindow.pro index dc724421f5..b5ede1b83f 100644 --- a/examples/opengl/hellowindow/hellowindow.pro +++ b/examples/opengl/hellowindow/hellowindow.pro @@ -1,12 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . QT += gui-private core-private -# Input + HEADERS += hellowindow.h SOURCES += hellowindow.cpp main.cpp diff --git a/examples/opengl/paintedwindow/paintedwindow.pro b/examples/opengl/paintedwindow/paintedwindow.pro index a3ae3bace5..098329ac4d 100644 --- a/examples/opengl/paintedwindow/paintedwindow.pro +++ b/examples/opengl/paintedwindow/paintedwindow.pro @@ -1,12 +1,3 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . - -# Input HEADERS += paintedwindow.h SOURCES += paintedwindow.cpp main.cpp @@ -15,4 +6,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/paintedwindow sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS paintedwindow.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/paintedwindow INSTALLS += target sources - diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro index bc3b7bb692..ba3a039da2 100644 --- a/examples/opengl/pbuffers2/pbuffers2.pro +++ b/examples/opengl/pbuffers2/pbuffers2.pro @@ -1,14 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Fri May 12 17:15:46 2006 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . - QT += opengl svg widgets -# Input HEADERS += glwidget.h SOURCES += glwidget.cpp main.cpp RESOURCES += pbuffers2.qrc @@ -19,5 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES pbuffers2.pro *.png *.svg sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/pbuffers2 INSTALLS += target sources - simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/qpa/windows/windows.pro b/examples/qpa/windows/windows.pro index ab59f28a3e..40280b718a 100644 --- a/examples/qpa/windows/windows.pro +++ b/examples/qpa/windows/windows.pro @@ -1,15 +1,5 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011 -###################################################################### +CONFIG += console +QT += gui-private core-private -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -CONFIG+=console -QT += gui-private -QT += core-private - -# Input HEADERS += window.h SOURCES += window.cpp main.cpp diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro index b268aa75f2..b959915a55 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.pro +++ b/examples/qtconcurrent/imagescaling/imagescaling.pro @@ -1,20 +1,13 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . -QT += concurrent +QT += concurrent widgets -# Input SOURCES += main.cpp imagescaling.cpp HEADERS += imagescaling.h -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/imagescaling sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/imagescaling INSTALLS += target sources - wince*: DEPLOYMENT_PLUGIN += qgif qjpeg -QT += widgets simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro index 72f770755f..994c266e9b 100644 --- a/examples/qtconcurrent/map/map.pro +++ b/examples/qtconcurrent/map/map.pro @@ -1,14 +1,10 @@ TEMPLATE = app TARGET = mapdemo -DEPENDPATH += . -INCLUDEPATH += . QT += concurrent widgets +CONFIG += console -# Input SOURCES += main.cpp -CONFIG += console -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/map sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/map diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro index 75a3aba0ae..3ec3243b6a 100644 --- a/examples/qtconcurrent/progressdialog/progressdialog.pro +++ b/examples/qtconcurrent/progressdialog/progressdialog.pro @@ -1,17 +1,11 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += concurrent widgets +CONFIG += console -# Input SOURCES += main.cpp -CONFIG += console -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/progressdialog sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/progressdialog INSTALLS += target sources -QT += concurrent widgets - simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro index f047577c9f..1ac02f6fa2 100644 --- a/examples/qtconcurrent/runfunction/runfunction.pro +++ b/examples/qtconcurrent/runfunction/runfunction.pro @@ -1,17 +1,11 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += concurrent widgets +CONFIG += console -# Input SOURCES += main.cpp -CONFIG += console -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/runfunction sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/runfunction INSTALLS += target sources -QT += concurrent widgets - simulator: warning(This example does not work on Simulator platform) diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro index 3bddf1a862..8b6bf8104a 100644 --- a/examples/qtconcurrent/wordcount/wordcount.pro +++ b/examples/qtconcurrent/wordcount/wordcount.pro @@ -1,17 +1,11 @@ -TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . +QT += concurrent widgets +CONFIG += console -# Input SOURCES += main.cpp -CONFIG += console -# install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/wordcount sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/wordcount INSTALLS += target sources -QT += concurrent widgets - simulator: warning(This example does not work on Simulator platform) diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro index 6a3d63b641..29ef9b8334 100644 --- a/examples/threads/waitconditions/waitconditions.pro +++ b/examples/threads/waitconditions/waitconditions.pro @@ -1,16 +1,8 @@ -###################################################################### -# Automatically generated by qmake (1.08a) Fri Jan 7 15:25:07 2005 -###################################################################### - -TEMPLATE = app QT = core gui CONFIG -= moc app_bundle -DEPENDPATH += . -INCLUDEPATH += . +CONFIG += console -# Input SOURCES += waitconditions.cpp -CONFIG += qt warn_on create_prl link_prl console # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/waitconditions @@ -18,5 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS waitconditions.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/waitconditions INSTALLS += target sources - simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/widgets/validators/validators.pro b/examples/widgets/validators/validators.pro index f4cab8edac..7970f961cd 100644 --- a/examples/widgets/validators/validators.pro +++ b/examples/widgets/validators/validators.pro @@ -1,16 +1,8 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Tue Nov 28 13:20:04 2006 -###################################################################### - -TEMPLATE = app -TARGET = validators -DEPENDPATH += . -INCLUDEPATH += . +QT += widgets FORMS += validators.ui RESOURCES += validators.qrc -# Input SOURCES += main.cpp ledwidget.cpp localeselector.cpp HEADERS += ledwidget.h localeselector.h @@ -20,6 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/validators INSTALLS += target sources -QT += widgets - simulator: warning(This example might not fully work on Simulator platform) -- cgit v1.2.3 From 88016d30a0bfb46910b6d45c8de9df93adc3af82 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 23 Feb 2012 07:26:29 +0100 Subject: examples: compile w/o opengl Fixes remnants of an automated QtGui -> QtWidgets port. Change-Id: I31f63bdd6ae71aee8e70b20e24def30e0eafb725 Reviewed-by: Lars Knoll --- examples/animation/sub-attaq/mainwindow.cpp | 12 ++++++------ examples/animation/sub-attaq/sub-attaq.pro | 3 ++- examples/graphicsview/padnavigator/padnavigator.pro | 3 ++- examples/painting/affine/affine.pro | 3 ++- examples/painting/composition/composition.pro | 3 ++- examples/painting/deform/deform.pro | 3 ++- examples/painting/gradients/gradients.pro | 3 ++- examples/painting/pathstroke/pathstroke.pro | 3 ++- 8 files changed, 20 insertions(+), 13 deletions(-) (limited to 'examples') diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp index fd41cee6dc..70f0303177 100644 --- a/examples/animation/sub-attaq/mainwindow.cpp +++ b/examples/animation/sub-attaq/mainwindow.cpp @@ -45,13 +45,13 @@ //Qt #include +#include +#include +#include +#include -#ifdef QT_NO_OPENGL - #include - #include - #include -#else - #include +#ifndef QT_NO_OPENGL +# include #endif MainWindow::MainWindow() : QMainWindow(0) diff --git a/examples/animation/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro index e994694b54..6d9b3195ac 100644 --- a/examples/animation/sub-attaq/sub-attaq.pro +++ b/examples/animation/sub-attaq/sub-attaq.pro @@ -1,4 +1,5 @@ -contains(QT_CONFIG, opengl):QT += opengl widgets +QT += widgets +contains(QT_CONFIG, opengl):QT += opengl HEADERS += boat.h \ bomb.h \ mainwindow.h \ diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro index 2c1d043a92..4b9733bb9b 100644 --- a/examples/graphicsview/padnavigator/padnavigator.pro +++ b/examples/graphicsview/padnavigator/padnavigator.pro @@ -16,7 +16,8 @@ RESOURCES += \ FORMS += \ form.ui -contains(QT_CONFIG, opengl):QT += opengl widgets +QT += widgets +contains(QT_CONFIG, opengl):QT += opengl # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/padnavigator diff --git a/examples/painting/affine/affine.pro b/examples/painting/affine/affine.pro index 80f966e59d..0977ea1c5b 100644 --- a/examples/painting/affine/affine.pro +++ b/examples/painting/affine/affine.pro @@ -3,8 +3,9 @@ HEADERS += xform.h contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) { DEFINES += QT_OPENGL_SUPPORT - QT += opengl widgets + QT += opengl } +QT += widgets SHARED_FOLDER = ../shared diff --git a/examples/painting/composition/composition.pro b/examples/painting/composition/composition.pro index 8641109cc0..eb63d0c47a 100644 --- a/examples/painting/composition/composition.pro +++ b/examples/painting/composition/composition.pro @@ -8,8 +8,9 @@ include($$SHARED_FOLDER/shared.pri) RESOURCES += composition.qrc contains(QT_CONFIG, opengl) { DEFINES += QT_OPENGL_SUPPORT - QT += opengl widgets + QT += opengl } +QT += widgets # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/composition diff --git a/examples/painting/deform/deform.pro b/examples/painting/deform/deform.pro index bd704507c5..527133e7e5 100644 --- a/examples/painting/deform/deform.pro +++ b/examples/painting/deform/deform.pro @@ -9,8 +9,9 @@ RESOURCES += deform.qrc contains(QT_CONFIG, opengl) { DEFINES += QT_OPENGL_SUPPORT - QT += opengl widgets + QT += opengl } +QT += widgets # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/deform diff --git a/examples/painting/gradients/gradients.pro b/examples/painting/gradients/gradients.pro index 4d3efe1255..4362d283ee 100644 --- a/examples/painting/gradients/gradients.pro +++ b/examples/painting/gradients/gradients.pro @@ -8,8 +8,9 @@ include($$SHARED_FOLDER/shared.pri) RESOURCES += gradients.qrc contains(QT_CONFIG, opengl) { DEFINES += QT_OPENGL_SUPPORT - QT += opengl widgets + QT += opengl } +QT += widgets # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/gradients diff --git a/examples/painting/pathstroke/pathstroke.pro b/examples/painting/pathstroke/pathstroke.pro index 60a5cd75ca..916866d1f2 100644 --- a/examples/painting/pathstroke/pathstroke.pro +++ b/examples/painting/pathstroke/pathstroke.pro @@ -9,8 +9,9 @@ RESOURCES += pathstroke.qrc contains(QT_CONFIG, opengl) { DEFINES += QT_OPENGL_SUPPORT - QT += opengl widgets + QT += opengl } +QT += widgets # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/pathstroke -- cgit v1.2.3 From ffa072655df50ba0f6d21d0696750f06abf20e4c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 25 Feb 2012 19:23:06 +0100 Subject: Fix compilation of examples with QStringBuilder In sub-attack an interview, one can't make two implicit conversions at once, so explicitly convert to the right type. The change in the torrent example is required because of https://codereview.qt-project.org/16168 (commit 9491272) But in that case, using a QByteArray is better anyway. Change-Id: Ieed22ac7f0d700d5ba5d1e70af3db4dd6c139c8f Reviewed-by: Lars Knoll --- examples/animation/sub-attaq/pixmapitem.cpp | 4 ++-- examples/itemviews/interview/model.cpp | 2 +- examples/network/torrent/trackerclient.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/animation/sub-attaq/pixmapitem.cpp b/examples/animation/sub-attaq/pixmapitem.cpp index b2061dc06c..077151d708 100644 --- a/examples/animation/sub-attaq/pixmapitem.cpp +++ b/examples/animation/sub-attaq/pixmapitem.cpp @@ -48,9 +48,9 @@ PixmapItem::PixmapItem(const QString &fileName,GraphicsScene::Mode mode, QGraphicsItem * parent) : QGraphicsObject(parent) { if (mode == GraphicsScene::Big) - pix = ":/big/" + fileName; + pix = QPixmap(QStringLiteral(":/big/") + fileName); else - pix = ":/small/" + fileName; + pix = QPixmap(QStringLiteral(":/small/") + fileName); } PixmapItem::PixmapItem(const QString &fileName, QGraphicsScene *scene) : QGraphicsObject(), pix(fileName) diff --git a/examples/itemviews/interview/model.cpp b/examples/itemviews/interview/model.cpp index 966dc7bfba..3b20f91ed6 100644 --- a/examples/itemviews/interview/model.cpp +++ b/examples/itemviews/interview/model.cpp @@ -95,7 +95,7 @@ QVariant Model::data(const QModelIndex &index, int role) const if (!index.isValid()) return QVariant(); if (role == Qt::DisplayRole) - return "Item " + QString::number(index.row()) + ":" + QString::number(index.column()); + return QVariant("Item " + QString::number(index.row()) + ":" + QString::number(index.column())); if (role == Qt::DecorationRole) { if (index.column() == 0) return iconProvider.icon(QFileIconProvider::Folder); diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp index 38f9eaf9fd..12f9504b7b 100644 --- a/examples/network/torrent/trackerclient.cpp +++ b/examples/network/torrent/trackerclient.cpp @@ -108,10 +108,10 @@ void TrackerClient::fetchPeerList() // Percent encode the hash QByteArray infoHash = torrentDownloader->infoHash(); - QString encodedSum; + QByteArray encodedSum; for (int i = 0; i < infoHash.size(); ++i) { encodedSum += '%'; - encodedSum += QString::number(infoHash[i], 16).right(2).rightJustified(2, '0'); + encodedSum += QByteArray::number(infoHash[i], 16).right(2).rightJustified(2, '0'); } bool seeding = (torrentDownloader->state() == TorrentClient::Seeding); -- cgit v1.2.3 From efde205586a70320d0525e941e5a1cd9657bdd30 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 23 Feb 2012 12:26:10 +0100 Subject: Use new plugin system in qtbase. - AccessibleWidgets - Windows printer support - Examples Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743 Reviewed-by: Lars Knoll --- examples/tools/echoplugin/echowindow/echointerface.h | 6 ++++-- examples/tools/echoplugin/plugin/echoplugin.cpp | 4 ---- examples/tools/echoplugin/plugin/echoplugin.h | 2 ++ examples/tools/echoplugin/plugin/echoplugin.json | 1 + examples/tools/echoplugin/plugin/plugin.pro | 1 + examples/tools/plugandpaint/interfaces.h | 16 ++++++++++------ examples/tools/plugandpaint/main.cpp | 4 +--- .../tools/plugandpaintplugins/basictools/basictools.json | 1 + .../tools/plugandpaintplugins/basictools/basictools.pro | 1 + .../plugandpaintplugins/basictools/basictoolsplugin.cpp | 6 ------ .../plugandpaintplugins/basictools/basictoolsplugin.h | 2 ++ .../plugandpaintplugins/extrafilters/extrafilters.json | 1 + .../plugandpaintplugins/extrafilters/extrafilters.pro | 1 + .../extrafilters/extrafiltersplugin.cpp | 2 -- .../extrafilters/extrafiltersplugin.h | 2 ++ examples/tools/styleplugin/plugin/plugin.pro | 1 + examples/tools/styleplugin/plugin/simplestyle.json | 3 +++ examples/tools/styleplugin/plugin/simplestyleplugin.cpp | 4 ---- examples/tools/styleplugin/plugin/simplestyleplugin.h | 3 ++- 19 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 examples/tools/echoplugin/plugin/echoplugin.json create mode 100644 examples/tools/plugandpaintplugins/basictools/basictools.json create mode 100644 examples/tools/plugandpaintplugins/extrafilters/extrafilters.json create mode 100644 examples/tools/styleplugin/plugin/simplestyle.json (limited to 'examples') diff --git a/examples/tools/echoplugin/echowindow/echointerface.h b/examples/tools/echoplugin/echowindow/echointerface.h index 412e37b7d2..13494c8d28 100644 --- a/examples/tools/echoplugin/echowindow/echointerface.h +++ b/examples/tools/echoplugin/echowindow/echointerface.h @@ -53,8 +53,10 @@ public: QT_BEGIN_NAMESPACE -Q_DECLARE_INTERFACE(EchoInterface, - "com.trolltech.Plugin.EchoInterface/1.0"); + +#define EchoInterface_iid "org.qt-project.Qt.Examples.EchoInterface" + +Q_DECLARE_INTERFACE(EchoInterface, EchoInterface_iid) QT_END_NAMESPACE //! [0] diff --git a/examples/tools/echoplugin/plugin/echoplugin.cpp b/examples/tools/echoplugin/plugin/echoplugin.cpp index d22e7ead23..07520899f5 100644 --- a/examples/tools/echoplugin/plugin/echoplugin.cpp +++ b/examples/tools/echoplugin/plugin/echoplugin.cpp @@ -48,7 +48,3 @@ QString EchoPlugin::echo(const QString &message) return message; } //! [0] - -//! [1] -Q_EXPORT_PLUGIN2(echoplugin, EchoPlugin); -//! [1] diff --git a/examples/tools/echoplugin/plugin/echoplugin.h b/examples/tools/echoplugin/plugin/echoplugin.h index d5e24b3b76..47373fc8cb 100644 --- a/examples/tools/echoplugin/plugin/echoplugin.h +++ b/examples/tools/echoplugin/plugin/echoplugin.h @@ -42,6 +42,7 @@ #define ECHOPLUGIN_H #include +#include #include "echoplugin.h" #include "echointerface.h" @@ -49,6 +50,7 @@ class EchoPlugin : public QObject, EchoInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.EchoInterface" FILE "echoplugin.json") Q_INTERFACES(EchoInterface) public: diff --git a/examples/tools/echoplugin/plugin/echoplugin.json b/examples/tools/echoplugin/plugin/echoplugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/tools/echoplugin/plugin/echoplugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro index 2be6de80d1..308c1b8236 100644 --- a/examples/tools/echoplugin/plugin/plugin.pro +++ b/examples/tools/echoplugin/plugin/plugin.pro @@ -4,6 +4,7 @@ CONFIG += plugin INCLUDEPATH += ../echowindow HEADERS = echoplugin.h SOURCES = echoplugin.cpp +OTHER_FILES += echoplugin.json TARGET = $$qtLibraryTarget(echoplugin) DESTDIR = ../plugins #! [0] diff --git a/examples/tools/plugandpaint/interfaces.h b/examples/tools/plugandpaint/interfaces.h index e48683cf68..5c1e0c302d 100644 --- a/examples/tools/plugandpaint/interfaces.h +++ b/examples/tools/plugandpaint/interfaces.h @@ -96,14 +96,18 @@ public: QT_BEGIN_NAMESPACE //! [3] //! [4] -Q_DECLARE_INTERFACE(BrushInterface, - "com.trolltech.PlugAndPaint.BrushInterface/1.0") +#define BrushInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface" + +Q_DECLARE_INTERFACE(BrushInterface, BrushInterface_iid) //! [3] -Q_DECLARE_INTERFACE(ShapeInterface, - "com.trolltech.PlugAndPaint.ShapeInterface/1.0") + +#define ShapeInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.ShapeInterface" + +Q_DECLARE_INTERFACE(ShapeInterface, ShapeInterface_iid) //! [5] -Q_DECLARE_INTERFACE(FilterInterface, - "com.trolltech.PlugAndPaint.FilterInterface/1.0") +#define FilterInterface_iid "org.qt-project.Qt.Examples.PlugAndPaint.FilterInterface" + +Q_DECLARE_INTERFACE(FilterInterface, FilterInterface_iid) //! [4] //! [5] QT_END_NAMESPACE diff --git a/examples/tools/plugandpaint/main.cpp b/examples/tools/plugandpaint/main.cpp index 841d5b417b..3c3693ec0b 100644 --- a/examples/tools/plugandpaint/main.cpp +++ b/examples/tools/plugandpaint/main.cpp @@ -43,9 +43,7 @@ #include #include -QT_BEGIN_NAMESPACE -Q_IMPORT_PLUGIN(pnp_basictools) -QT_END_NAMESPACE +Q_IMPORT_PLUGIN(BasicToolsPlugin) int main(int argc, char *argv[]) { diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.json b/examples/tools/plugandpaintplugins/basictools/basictools.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/tools/plugandpaintplugins/basictools/basictools.json @@ -0,0 +1 @@ +{} diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.pro b/examples/tools/plugandpaintplugins/basictools/basictools.pro index 6175de34a3..89023d19cc 100644 --- a/examples/tools/plugandpaintplugins/basictools/basictools.pro +++ b/examples/tools/plugandpaintplugins/basictools/basictools.pro @@ -4,6 +4,7 @@ CONFIG += plugin static INCLUDEPATH += ../.. HEADERS = basictoolsplugin.h SOURCES = basictoolsplugin.cpp +OTHER_FILES += basictools.json TARGET = $$qtLibraryTarget(pnp_basictools) DESTDIR = ../../plugandpaint/plugins #! [0] diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp index d55048dc0c..bbcae608fa 100644 --- a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp +++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp @@ -189,9 +189,3 @@ QImage BasicToolsPlugin::filterImage(const QString &filter, const QImage &image, return result; } //! [8] - -QT_BEGIN_NAMESPACE -//! [9] -Q_EXPORT_PLUGIN2(pnp_basictools, BasicToolsPlugin) -//! [9] -QT_END_NAMESPACE diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h index c857e4c7a0..a895b60a18 100644 --- a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h +++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -57,6 +58,7 @@ class BasicToolsPlugin : public QObject, public FilterInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface" FILE "basictools.json") Q_INTERFACES(BrushInterface ShapeInterface FilterInterface) //! [0] diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.json b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.json @@ -0,0 +1 @@ +{} diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro index 70e7c42c76..89acbabb23 100644 --- a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro @@ -4,6 +4,7 @@ CONFIG += plugin INCLUDEPATH += ../.. HEADERS = extrafiltersplugin.h SOURCES = extrafiltersplugin.cpp +OTHER_FILES += extrafilters.json TARGET = $$qtLibraryTarget(pnp_extrafilters) DESTDIR = ../../plugandpaint/plugins diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp index 9303fbb6a6..186f364b77 100644 --- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp @@ -120,5 +120,3 @@ QImage ExtraFiltersPlugin::filterImage(const QString &filter, } return result; } - -Q_EXPORT_PLUGIN2(pnp_extrafilters, ExtraFiltersPlugin) diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h index b88febe347..6693287294 100644 --- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h @@ -43,6 +43,7 @@ //! [0] #include +#include #include #include @@ -51,6 +52,7 @@ class ExtraFiltersPlugin : public QObject, public FilterInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.PlugAndPaint.FilterInterface" FILE "extrafilters.json") Q_INTERFACES(FilterInterface) public: diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro index e5cdbe072b..b0dd871b7b 100644 --- a/examples/tools/styleplugin/plugin/plugin.pro +++ b/examples/tools/styleplugin/plugin/plugin.pro @@ -5,6 +5,7 @@ HEADERS = simplestyle.h \ simplestyleplugin.h SOURCES = simplestyle.cpp \ simplestyleplugin.cpp +OTHER_FILES += simplestyle.json TARGET = simplestyleplugin #! [0] win32 { diff --git a/examples/tools/styleplugin/plugin/simplestyle.json b/examples/tools/styleplugin/plugin/simplestyle.json new file mode 100644 index 0000000000..a708e2aafe --- /dev/null +++ b/examples/tools/styleplugin/plugin/simplestyle.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "simplestyle" ] +} diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp index caf3e01dcf..4b37b2adf2 100644 --- a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp +++ b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp @@ -58,7 +58,3 @@ QStyle *SimpleStylePlugin::create(const QString &key) return 0; } //! [1] - -QT_BEGIN_NAMESPACE -Q_EXPORT_PLUGIN2(simplestyleplugin, SimpleStylePlugin) -QT_END_NAMESPACE diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.h b/examples/tools/styleplugin/plugin/simplestyleplugin.h index 873ac59a67..eb2cdedfed 100644 --- a/examples/tools/styleplugin/plugin/simplestyleplugin.h +++ b/examples/tools/styleplugin/plugin/simplestyleplugin.h @@ -52,9 +52,10 @@ QT_END_NAMESPACE class SimpleStylePlugin : public QStylePlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "simplestyle.json") public: - SimpleStylePlugin() {}; + SimpleStylePlugin() {} QStringList keys() const; QStyle *create(const QString &key); -- cgit v1.2.3