From 4ae7aecb68b506f21bd5411bf92a1e8d9fe807bb Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Wed, 19 Oct 2011 15:04:15 +1000 Subject: Remove Q_WS_*, symbian and maemo code in QtDeclarative Change-Id: If64daf80f9d19973e0bc2d864b003a66be5ca61d Reviewed-by: Alan Alpert --- src/declarative/declarative.pro | 12 ------ src/declarative/items/qquicktext.cpp | 16 ++++---- src/declarative/items/qquicktextedit.cpp | 12 ++---- src/declarative/items/qquicktextinput.cpp | 15 ++------ src/declarative/qml/qdeclarativeglobal_p.h | 4 -- src/declarative/qml/qdeclarativeimport.cpp | 44 +--------------------- src/declarative/scenegraph/qsgcontext.cpp | 2 +- src/imports/folderlistmodel/folderlistmodel.pro | 10 ----- .../qdeclarativefolderlistmodel.cpp | 2 +- src/imports/gestures/gestures.pro | 10 ----- src/imports/particles/particles.pro | 10 ----- src/imports/qimportbase.pri | 7 ---- src/imports/testlib/testlib.pro | 17 --------- .../qmldbg_inspector/qmldbg_inspector.pro | 2 - .../qmldbg_inspector/qtquick1/zoomtool.cpp | 2 +- src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro | 4 +- src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro | 2 - src/plugins/qmltooling/qmltooling.pro | 3 -- src/qmltest/qmltest.pro | 10 ----- src/qmltest/quicktestglobal.h | 2 +- 20 files changed, 22 insertions(+), 164 deletions(-) (limited to 'src') diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index 3cf0d39d58..60b5648f03 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -35,18 +35,6 @@ include(items/items.pri) include(particles/particles.pri) include(designer/designer.pri) -symbian: { - TARGET.UID3=0x2001E623 - LIBS += -lefsrv - - contains(QT_CONFIG, freetype) { - DEFINES += QT_NO_FONTCONFIG - INCLUDEPATH += \ - ../3rdparty/freetype/src \ - ../3rdparty/freetype/include - } -} - linux-g++-maemo:DEFINES += QDECLARATIVEVIEW_NOBACKGROUND DEFINES += QT_NO_OPENTYPE diff --git a/src/declarative/items/qquicktext.cpp b/src/declarative/items/qquicktext.cpp index bf736e6a10..36d15c6a64 100644 --- a/src/declarative/items/qquicktext.cpp +++ b/src/declarative/items/qquicktext.cpp @@ -683,14 +683,14 @@ QPixmap QQuickTextPrivate::textLayoutImage(bool drawStyle) QPixmap img(size); if (!size.isEmpty()) { img.fill(Qt::transparent); -#ifdef Q_WS_MAC +/*#ifdef Q_OS_MAC // Fails on CocoaX64 bool oldSmooth = qt_applefontsmoothing_enabled; qt_applefontsmoothing_enabled = false; -#endif +#endif*/ QPainter p(&img); -#ifdef Q_WS_MAC +/*#ifdef Q_OS_MAC // Fails on CocoaX64 qt_applefontsmoothing_enabled = oldSmooth; -#endif +#endif*/ drawTextLayout(&p, QPointF(-layedOutTextRect.x(),0), drawStyle); } return img; @@ -723,14 +723,14 @@ QPixmap QQuickTextPrivate::textDocumentImage(bool drawStyle) //paint text QPixmap img(size); img.fill(Qt::transparent); -#ifdef Q_WS_MAC +/*#ifdef Q_OS_MAC // Fails on CocoaX64 bool oldSmooth = qt_applefontsmoothing_enabled; qt_applefontsmoothing_enabled = false; -#endif +#endif*/ QPainter p(&img); -#ifdef Q_WS_MAC +/*#ifdef Q_OS_MAC // Fails on CocoaX64 qt_applefontsmoothing_enabled = oldSmooth; -#endif +#endif*/ QAbstractTextDocumentLayout::PaintContext context; diff --git a/src/declarative/items/qquicktextedit.cpp b/src/declarative/items/qquicktextedit.cpp index 75f60bc08c..f132c70400 100644 --- a/src/declarative/items/qquicktextedit.cpp +++ b/src/declarative/items/qquicktextedit.cpp @@ -1490,7 +1490,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * } else if (oldNode == 0 || d->documentDirty) { d->documentDirty = false; -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) // Make sure document is relayouted in the paint node on Mac // to avoid crashes due to the font engines created in the // shaping process @@ -1519,7 +1519,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * selectionEnd() - 1); // selectionEnd() returns first char after // selection -#if defined(Q_WS_MAC) +#if defined(Q_OS_MAC) // We also need to make sure the document layout is redone when // control is returned to the main thread, as all the font engines // are now owned by the rendering thread @@ -1873,9 +1873,7 @@ void QQuickTextEditPrivate::updateDefaultTextOption() customizing when you want the input keyboard to be shown and hidden in your application. - By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms - the panels are automatically opened when TextEdit element gains active focus. Input panels are + By default the opening of input panels follows the platform style. Input panels are always closed if no editor has active focus. You can disable the automatic behavior by setting the property \c activeFocusOnPress to false @@ -1918,9 +1916,7 @@ void QQuickTextEdit::openSoftwareInputPanel() for customizing when you want the input keyboard to be shown and hidden in your application. - By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms - the panels are automatically opened when TextEdit element gains active focus. Input panels are + By default the opening of input panels follows the platform style. Input panels are always closed if no editor has active focus. You can disable the automatic behavior by setting the property \c activeFocusOnPress to false diff --git a/src/declarative/items/qquicktextinput.cpp b/src/declarative/items/qquicktextinput.cpp index e28832ed4e..4e260560a1 100644 --- a/src/declarative/items/qquicktextinput.cpp +++ b/src/declarative/items/qquicktextinput.cpp @@ -1699,12 +1699,10 @@ void QQuickTextInput::moveCursorSelection(int pos, SelectionMode mode) customizing when you want the input keyboard to be shown and hidden in your application. - By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms - the panels are automatically opened when TextInput element gains active focus. Input panels are + By default the opening of input panels follows the platform style. Input panels are always closed if no editor has active focus. - . You can disable the automatic behavior by setting the property \c activeFocusOnPress to false + You can disable the automatic behavior by setting the property \c activeFocusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement the behavior you want. @@ -1744,12 +1742,10 @@ void QQuickTextInput::openSoftwareInputPanel() for customizing when you want the input keyboard to be shown and hidden in your application. - By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms - the panels are automatically opened when TextInput element gains active focus. Input panels are + By default the opening of input panels follows the platform style. Input panels are always closed if no editor has active focus. - . You can disable the automatic behavior by setting the property \c activeFocusOnPress to false + You can disable the automatic behavior by setting the property \c activeFocusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement the behavior you want. @@ -1826,9 +1822,6 @@ bool QQuickTextInput::isInputMethodComposing() const void QQuickTextInputPrivate::init() { Q_Q(QQuickTextInput); -#if defined(Q_WS_MAC) - control->setThreadChecks(true); -#endif control->setParent(q);//Now mandatory due to accessibility changes control->setCursorWidth(1); control->setPasswordCharacter(QLatin1Char('*')); diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h index cc0a4b6b1d..c6caa1e354 100644 --- a/src/declarative/qml/qdeclarativeglobal_p.h +++ b/src/declarative/qml/qdeclarativeglobal_p.h @@ -90,11 +90,7 @@ QT_MODULE(Declarative) QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); \ } -#ifdef Q_OS_SYMBIAN -#define Q_DECLARATIVE_PRIVATE_EXPORT Q_AUTOTEST_EXPORT -#else #define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT -#endif struct QDeclarativeGraphics_DerivedObject : public QObject { diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index f94e9e4bae..0a03443acc 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -51,10 +51,6 @@ #include #include -#ifdef Q_OS_SYMBIAN -#include -#endif - QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) @@ -382,13 +378,6 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser->plugins()) { QString resolvedFilePath = database->resolvePlugin(typeLoader, qmldirPath, plugin.path, plugin.name); -#if defined(QT_LIBINFIX) && defined(Q_OS_SYMBIAN) - if (resolvedFilePath.isEmpty()) { - // In case of libinfixed build, attempt to load libinfixed version, too. - QString infixedPluginName = plugin.name + QLatin1String(QT_LIBINFIX); - resolvedFilePath = database->resolvePlugin(dir, plugin.path, infixedPluginName); - } -#endif if (!resolvedFilePath.isEmpty()) { if (!database->importPlugin(resolvedFilePath, uri, errors)) { if (errors) { @@ -751,38 +740,13 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) #ifndef QT_NO_SETTINGS QString installImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); - -#if defined(Q_OS_SYMBIAN) - // Append imports path for all available drives in Symbian - if (installImportsPath.at(1) != QChar(QLatin1Char(':'))) { - QString tempPath = installImportsPath; - if (tempPath.at(tempPath.length() - 1) != QDir::separator()) { - tempPath += QDir::separator(); - } - RFs& fs = qt_s60GetRFs(); - TPtrC tempPathPtr(reinterpret_cast (tempPath.constData())); - TFindFile finder(fs); - TInt err = finder.FindByDir(tempPathPtr, tempPathPtr); - while (err == KErrNone) { - QString foundDir(reinterpret_cast(finder.File().Ptr()), - finder.File().Length()); - foundDir = QDir(foundDir).canonicalPath(); - addImportPath(foundDir); - err = finder.Find(); - } - } else { - addImportPath(installImportsPath); - } -#else addImportPath(installImportsPath); -#endif - #endif // QT_NO_SETTINGS // env import paths QByteArray envImportPath = qgetenv("QML_IMPORT_PATH"); if (!envImportPath.isEmpty()) { -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) QLatin1Char pathSep(';'); #else QLatin1Char pathSep(':'); @@ -899,7 +863,6 @@ QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLo \row \i AIX \i \c .a \row \i HP-UX \i \c .sl, \c .so (HP-UXi) \row \i Mac OS X \i \c .dylib, \c .bundle, \c .so - \row \i Symbian \i \c .dll \endtable Version number on unix are ignored. @@ -915,11 +878,6 @@ QString QDeclarativeImportDatabase::resolvePlugin(QDeclarativeTypeLoader *typeLo << QLatin1String("d.dll") // try a qmake-style debug build first # endif << QLatin1String(".dll")); -#elif defined(Q_OS_SYMBIAN) - return resolvePlugin(typeLoader, qmldirPath, qmldirPluginPath, baseName, - QStringList() - << QLatin1String(".dll") - << QLatin1String(".qtplugin")); #else # if defined(Q_OS_DARWIN) diff --git a/src/declarative/scenegraph/qsgcontext.cpp b/src/declarative/scenegraph/qsgcontext.cpp index 466ae5919e..f995f9e76e 100644 --- a/src/declarative/scenegraph/qsgcontext.cpp +++ b/src/declarative/scenegraph/qsgcontext.cpp @@ -413,7 +413,7 @@ QSGTexture *QSGContext::createTexture(const QImage &image) const QSize QSGContext::minimumFBOSize() const { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC return QSize(33, 33); #else return QSize(1, 1); diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index 63f75d9254..26efc654b8 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -13,14 +13,4 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH -symbian:{ - TARGET.UID3 = 0x20021320 - - isEmpty(DESTDIR):importFiles.files = qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir - else:importFiles.files = $$DESTDIR/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll qmldir - importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles -} - INSTALLS += target qmldir diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 88675d4ae0..a6c9f97a96 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -269,7 +269,7 @@ QUrl QDeclarativeFolderListModel::parentFolder() const QString localFile = d->folder.toLocalFile(); if (!localFile.isEmpty()) { QDir dir(localFile); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN) +#if defined(Q_OS_WIN) if (dir.isRoot()) dir.setPath(""); else diff --git a/src/imports/gestures/gestures.pro b/src/imports/gestures/gestures.pro index e7095956b2..36244a1d71 100644 --- a/src/imports/gestures/gestures.pro +++ b/src/imports/gestures/gestures.pro @@ -13,14 +13,4 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH -symbian:{ - TARGET.UID3 = 0x2002131F - - isEmpty(DESTDIR):importFiles.files = qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir - else:importFiles.files = $$DESTDIR/qmlgesturesplugin$${QT_LIBINFIX}.dll qmldir - importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles -} - INSTALLS += target qmldir diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro index 74dab8dcf3..3c523aca4a 100644 --- a/src/imports/particles/particles.pro +++ b/src/imports/particles/particles.pro @@ -20,14 +20,4 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH -symbian:{ - TARGET.UID3 = 0x2002131E - - isEmpty(DESTDIR):importFiles.files = qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir - else:importFiles.files = $$DESTDIR/qmlparticlesplugin$${QT_LIBINFIX}.dll qmldir - importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles -} - INSTALLS += target qmldir diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri index 5807425e3c..110d145e94 100644 --- a/src/imports/qimportbase.pri +++ b/src/imports/qimportbase.pri @@ -1,6 +1,5 @@ load(qt_module) -symbian:load(qt_plugin) TEMPLATE = lib CONFIG += qt plugin @@ -30,9 +29,3 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols load(qt_targets) wince*:LIBS += $$QMAKE_LIBS_GUI - -symbian: { - TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY = All -Tcb - load(armcc_warnings) -} diff --git a/src/imports/testlib/testlib.pro b/src/imports/testlib/testlib.pro index da072d34b1..dbe45fb6fa 100644 --- a/src/imports/testlib/testlib.pro +++ b/src/imports/testlib/testlib.pro @@ -2,25 +2,8 @@ TARGET = qmltestplugin TARGETPATH = QtTest include(../qimportbase.pri) - CONFIG += qt plugin -symbian { - CONFIG += epocallowdlldata - contains(QT_EDITION, OpenSource) { - TARGET.CAPABILITY = LocalServices NetworkServices ReadUserData UserEnvironment WriteUserData - } else { - TARGET.CAPABILITY = All -Tcb - } - - isEmpty(DESTDIR):importFiles.files = qmltestplugin$${QT_LIBINFIX}.dll qmldir - else:importFiles.files = $$DESTDIR/qmltestplugin$${QT_LIBINFIX}.dll qmldir - importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles - -} - QT += declarative qmltest qmltest-private v8-private declarative-private core-private testlib SOURCES += main.cpp diff --git a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro index 9d2b67cfb6..0c870bbf2d 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro +++ b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro @@ -55,5 +55,3 @@ HEADERS += \ target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target - -symbian:TARGET.UID3=0x20031E90 diff --git a/src/plugins/qmltooling/qmldbg_inspector/qtquick1/zoomtool.cpp b/src/plugins/qmltooling/qmldbg_inspector/qtquick1/zoomtool.cpp index cf456ff251..92f34b36e8 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/qtquick1/zoomtool.cpp +++ b/src/plugins/qmltooling/qmldbg_inspector/qtquick1/zoomtool.cpp @@ -151,7 +151,7 @@ void ZoomTool::mouseReleaseEvent(QMouseEvent *event) view()->setSceneRect(sceneArea); } else { Qt::KeyboardModifier modifierKey = Qt::ControlModifier; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC modifierKey = Qt::AltModifier; #endif if (event->modifiers() & modifierKey) { diff --git a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro index a12fac5da3..c1ca2a5ef9 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro +++ b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro @@ -8,7 +8,7 @@ QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" SOURCES += \ qmlostplugin.cpp \ - qostdevice.cpp + qostdevice.cpp HEADERS += \ qmlostplugin.h \ @@ -17,5 +17,3 @@ HEADERS += \ target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target - -symbian:TARGET.UID3=0x20031E92 diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro index c5f8f90cd6..8ab507c055 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro +++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro @@ -16,5 +16,3 @@ HEADERS += \ target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target - -symbian:TARGET.UID3=0x20031E90 diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index b5c8eaf487..5b735cb716 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -1,7 +1,4 @@ TEMPLATE = subdirs SUBDIRS = qmldbg_tcp - SUBDIRS += qmldbg_inspector - -symbian:SUBDIRS += qmldbg_ost diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro index b0b64cdc6b..ff04487b18 100644 --- a/src/qmltest/qmltest.pro +++ b/src/qmltest/qmltest.pro @@ -19,16 +19,6 @@ feature.path = $$[QT_INSTALL_DATA]/mkspecs/features feature.files = $$PWD/features/qmltestcase.prf INSTALLS += feature -symbian { - DEFINES += QT_MAKEDLL - CONFIG += epocallowdlldata - contains(QT_EDITION, OpenSource) { - TARGET.CAPABILITY = LocalServices NetworkServices ReadUserData UserEnvironment WriteUserData - } else { - TARGET.CAPABILITY = All -Tcb - } -} - INCLUDEPATH += $$PWD/QtQuickTest INCLUDEPATH += $$PWD diff --git a/src/qmltest/quicktestglobal.h b/src/qmltest/quicktestglobal.h index 389674c1b5..54a77a64c9 100644 --- a/src/qmltest/quicktestglobal.h +++ b/src/qmltest/quicktestglobal.h @@ -47,7 +47,7 @@ QT_BEGIN_HEADER QT_LICENSED_MODULE(QtQuickTest) -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_WIN) # if defined(QT_NODLL) # undef QT_MAKEDLL # undef QT_DLL -- cgit v1.2.3