diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-06-18 18:08:05 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-19 13:59:54 +0200 |
commit | 81a75bde3fb71ced76c975ff9ec9b75bbcc70bcf (patch) | |
tree | 5cc8e1b1e4b41c25c3ef215e7f5f36f06b9d0a5f /tools | |
parent | 442447e703936a3c8f737e1cb966f93d987c6ea6 (diff) | |
download | qtquick1-81a75bde3fb71ced76c975ff9ec9b75bbcc70bcf.tar.gz |
Remove Symbian support.
Change-Id: I735584db5cf7298ef61f316036df460e79485246
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/deviceorientation_symbian.cpp | 192 | ||||
-rw-r--r-- | tools/qml/loggerwidget.cpp | 13 | ||||
-rw-r--r-- | tools/qml/main.cpp | 25 | ||||
-rw-r--r-- | tools/qml/qdeclarativetester.cpp | 4 | ||||
-rw-r--r-- | tools/qml/qml.pri | 14 | ||||
-rw-r--r-- | tools/qml/qml.pro | 10 | ||||
-rw-r--r-- | tools/qml/qmlruntime.cpp | 30 |
7 files changed, 1 insertions, 287 deletions
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp deleted file mode 100644 index 2373d18f..00000000 --- a/tools/qml/deviceorientation_symbian.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "deviceorientation.h" - -#include <e32base.h> -#include <sensrvchannelfinder.h> -#include <sensrvdatalistener.h> -#include <sensrvchannel.h> -#include <sensrvorientationsensor.h> - -class SymbianOrientation : public DeviceOrientation, public MSensrvDataListener -{ - Q_OBJECT -public: - SymbianOrientation() - : DeviceOrientation(), m_current(UnknownOrientation), m_sensorChannel(0), m_channelOpen(false) - { - TRAP_IGNORE(initL()); - if (!m_sensorChannel) - qWarning("No valid sensors found."); - } - - ~SymbianOrientation() - { - if (m_sensorChannel) { - m_sensorChannel->StopDataListening(); - m_sensorChannel->CloseChannel(); - delete m_sensorChannel; - } - } - - void initL() - { - CSensrvChannelFinder *channelFinder = CSensrvChannelFinder::NewLC(); - RSensrvChannelInfoList channelInfoList; - CleanupClosePushL(channelInfoList); - - TSensrvChannelInfo searchConditions; - searchConditions.iChannelType = KSensrvChannelTypeIdOrientationData; - channelFinder->FindChannelsL(channelInfoList, searchConditions); - - for (int i = 0; i < channelInfoList.Count(); ++i) { - TRAPD(error, m_sensorChannel = CSensrvChannel::NewL(channelInfoList[i])); - if (!error) - TRAP(error, m_sensorChannel->OpenChannelL()); - if (!error) { - TRAP(error, m_sensorChannel->StartDataListeningL(this, 1, 1, 0)); - m_channelOpen = true; - break; - } - if (error) { - delete m_sensorChannel; - m_sensorChannel = 0; - } - } - - channelInfoList.Close(); - CleanupStack::Pop(&channelInfoList); - CleanupStack::PopAndDestroy(channelFinder); - } - - Orientation orientation() const - { - return m_current; - } - - void setOrientation(Orientation) { } - -private: - DeviceOrientation::Orientation m_current; - CSensrvChannel *m_sensorChannel; - bool m_channelOpen; - void pauseListening() { - if (m_sensorChannel && m_channelOpen) { - m_sensorChannel->StopDataListening(); - m_sensorChannel->CloseChannel(); - m_channelOpen = false; - } - } - - void resumeListening() { - if (m_sensorChannel && !m_channelOpen) { - TRAPD(error, m_sensorChannel->OpenChannelL()); - if (!error) { - TRAP(error, m_sensorChannel->StartDataListeningL(this, 1, 1, 0)); - if (!error) { - m_channelOpen = true; - } - } - if (error) { - delete m_sensorChannel; - m_sensorChannel = 0; - } - } - } - - void DataReceived(CSensrvChannel &channel, TInt count, TInt dataLost) - { - Q_UNUSED(dataLost) - if (channel.GetChannelInfo().iChannelType == KSensrvChannelTypeIdOrientationData) { - TSensrvOrientationData data; - for (int i = 0; i < count; ++i) { - TPckgBuf<TSensrvOrientationData> dataBuf; - channel.GetData(dataBuf); - data = dataBuf(); - Orientation orientation = UnknownOrientation; - switch (data.iDeviceOrientation) { - case TSensrvOrientationData::EOrientationDisplayUp: - orientation = Portrait; - break; - case TSensrvOrientationData::EOrientationDisplayRightUp: - orientation = Landscape; - break; - case TSensrvOrientationData::EOrientationDisplayLeftUp: - orientation = LandscapeInverted; - break; - case TSensrvOrientationData::EOrientationDisplayDown: - orientation = PortraitInverted; - break; - case TSensrvOrientationData::EOrientationUndefined: - case TSensrvOrientationData::EOrientationDisplayUpwards: - case TSensrvOrientationData::EOrientationDisplayDownwards: - default: - break; - } - - if (m_current != orientation && orientation != UnknownOrientation) { - m_current = orientation; - emit orientationChanged(); - } - } - } - } - - void DataError(CSensrvChannel& /* channel */, TSensrvErrorSeverity /* error */) - { - } - - void GetDataListenerInterfaceL(TUid /* interfaceUid */, TAny*& /* interface */) - { - } -}; - - -DeviceOrientation* DeviceOrientation::instance() -{ - static SymbianOrientation *o = 0; - if (!o) - o = new SymbianOrientation; - return o; -} - -#include "deviceorientation_symbian.moc" diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index 7db3fc83..63b14f0f 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -66,19 +66,6 @@ LoggerWidget::LoggerWidget(QWidget *parent) : m_plainTextEdit = new QPlainTextEdit(); -#if defined(Q_OS_SYMBIAN) - QAction* clearAction = new QAction(tr("Clear"), this); - clearAction->setSoftKeyRole(QAction::PositiveSoftKey); - connect(clearAction, SIGNAL(triggered()), m_plainTextEdit, SLOT(clear())); - addAction(clearAction); - - m_plainTextEdit->setReadOnly(true); - QAction* backAction = new QAction( tr("Back"), this ); - backAction->setSoftKeyRole( QAction::NegativeSoftKey ); - connect(backAction, SIGNAL(triggered()), this, SLOT(hide())); - addAction( backAction ); -#endif - #ifdef Q_WS_MAEMO_5 new TextEditAutoResizer(m_plainTextEdit); setAttribute(Qt::WA_Maemo5StackedWindow); diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 6ce2bc1f..84fa4d07 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -76,13 +76,6 @@ void exitApp(int i) QWeakPointer<LoggerWidget> logger; static QAtomicInt recursiveLock(0); -#if defined (Q_OS_SYMBIAN) -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#endif - void myMessageOutput(QtMsgType type, const char *msg) { QString strMsg = QString::fromLatin1(msg); @@ -98,19 +91,6 @@ void myMessageOutput(QtMsgType type, const char *msg) warnings += QLatin1Char('\n'); } } -#if defined (Q_OS_SYMBIAN) - static int fd = -1; - if (fd == -1) - fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT); - - ::write(fd, msg, strlen(msg)); - ::write(fd, "\n", 1); - ::fsync(fd); - switch (type) { - case QtFatalMsg: - abort(); - } -#endif if (systemMsgOutput) { systemMsgOutput(type, msg); @@ -212,11 +192,6 @@ struct ViewerOptions warningsConfig(DefaultWarnings), sizeToView(true) { -#if defined(Q_OS_SYMBIAN) - maximized = true; - useNativeFileBrowser = false; -#endif - #if defined(Q_OS_MAC) useGL = true; #endif diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp index 6a029453..fcc1dace 100644 --- a/tools/qml/qdeclarativetester.cpp +++ b/tools/qml/qdeclarativetester.cpp @@ -49,9 +49,7 @@ #include <QCryptographicHash> #include <private/qabstractanimation_p.h> #include <QGraphicsObject> -#ifndef Q_OS_SYMBIAN #include <private/qdeclarativeitem_p.h> -#endif QT_BEGIN_NAMESPACE @@ -269,9 +267,7 @@ void QDeclarativeTester::save() void QDeclarativeTester::updateCurrentTime(int msec) { -#ifndef Q_OS_SYMBIAN QDeclarativeItemPrivate::setConsistentTime(msec); -#endif if (!testscript && msec > 16 && options & QDeclarativeViewer::Snapshot) return; diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index f118bb25..1563ae50 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -19,19 +19,7 @@ SOURCES += $$PWD/qmlruntime.cpp \ RESOURCES = $$PWD/browser/browser.qrc \ $$PWD/startup/startup.qrc -symbian { - contains(QT_CONFIG, s60) { - LIBS += -lavkon -lcone - } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - LIBS += -lsensrvclient -lsensrvutil - SOURCES += $$PWD/deviceorientation_symbian.cpp - } else { - SOURCES += $$PWD/deviceorientation.cpp - } - FORMS = $$PWD/recopts.ui \ - $$PWD/proxysettings.ui -} else:maemo5 { +maemo5 { QT += dbus HEADERS += $$PWD/texteditautoresizer_maemo5.h SOURCES += $$PWD/deviceorientation_maemo5.cpp diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 789d1a99..c159ed6b 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -30,17 +30,7 @@ wince* { maemo5 { QT += maemo5 } -symbian { - TARGET.UID3 = 0x20021317 - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) - TARGET.EPOCHEAPSIZE = 0x20000 0x4000000 - TARGET.CAPABILITY = NetworkServices ReadUserData - # Deploy plugin for remote debugging - qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/qmldbg_tcp$${QT_LIBINFIX}.dll $$QT_BUILD_TREE/plugins/qmltooling/qmldbg_ost$${QT_LIBINFIX}.dll - qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmltooling - DEPLOYMENT += qmldebuggingplugin -} mac { QMAKE_INFO_PLIST=Info_mac.plist TARGET=QMLViewer diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 93759a4f..965fc765 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -743,10 +743,8 @@ void QDeclarativeViewer::createMenu() connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool))); showWarningsWindow = new QAction(tr("Show Warnings"), this); -#if !defined(Q_OS_SYMBIAN) showWarningsWindow->setCheckable((true)); showWarningsWindow->setChecked(loggerWindow->isVisible()); -#endif connect(showWarningsWindow, SIGNAL(triggered(bool)), this, SLOT(showWarnings(bool))); QAction *proxyAction = new QAction(tr("HTTP &Proxy..."), this); @@ -764,30 +762,22 @@ void QDeclarativeViewer::createMenu() orientation->setExclusive(true); connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*))); -#if defined(Q_OS_SYMBIAN) - QAction *autoOrientationAction = new QAction(tr("Auto-orientation"), this); - autoOrientationAction->setCheckable(true); -#endif QAction *portraitAction = new QAction(tr("Portrait"), this); portraitAction->setCheckable(true); QAction *landscapeAction = new QAction(tr("Landscape"), this); landscapeAction->setCheckable(true); -#if !defined(Q_OS_SYMBIAN) QAction *portraitInvAction = new QAction(tr("Portrait (inverted)"), this); portraitInvAction->setCheckable(true); QAction *landscapeInvAction = new QAction(tr("Landscape (inverted)"), this); landscapeInvAction->setCheckable(true); -#endif QAction *aboutAction = new QAction(tr("&About Qt..."), this); aboutAction->setMenuRole(QAction::AboutQtRole); connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); -#if !defined(Q_OS_SYMBIAN) QAction *closeAction = new QAction(tr("&Close"), this); closeAction->setShortcuts(QKeySequence::Close); connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); -#endif QAction *quitAction = new QAction(tr("&Quit"), this); quitAction->setMenuRole(QAction::QuitRole); @@ -823,7 +813,6 @@ void QDeclarativeViewer::createMenu() fileMenu->addAction(openAction); fileMenu->addAction(openUrlAction); fileMenu->addAction(reloadAction); -#if !defined(Q_OS_SYMBIAN) fileMenu->addSeparator(); fileMenu->addAction(closeAction); fileMenu->addAction(quitAction); @@ -831,7 +820,6 @@ void QDeclarativeViewer::createMenu() QMenu *recordMenu = menu->addMenu(tr("&Recording")); recordMenu->addAction(snapshotAction); recordMenu->addAction(recordAction); -#endif // ! Q_OS_SYMBIAN QMenu *debugMenu = menu->addMenu(tr("&Debugging")); debugMenu->addAction(slowAction); @@ -839,25 +827,16 @@ void QDeclarativeViewer::createMenu() QMenu *settingsMenu = menu->addMenu(tr("&Settings")); settingsMenu->addAction(proxyAction); -#if defined(Q_OS_SYMBIAN) - settingsMenu->addAction(fullscreenAction); -#else settingsMenu->addAction(recordOptions); settingsMenu->addMenu(loggerWindow->preferencesMenu()); -#endif // !Q_OS_SYMBIAN settingsMenu->addAction(rotateAction); QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties")); -#if defined(Q_OS_SYMBIAN) - orientation->addAction(autoOrientationAction); -#endif orientation->addAction(portraitAction); orientation->addAction(landscapeAction); -#if !defined(Q_OS_SYMBIAN) orientation->addAction(portraitInvAction); orientation->addAction(landscapeInvAction); -#endif propertiesMenu->addActions(orientation->actions()); QMenu *helpMenu = menu->addMenu(tr("&Help")); @@ -919,11 +898,7 @@ void QDeclarativeViewer::toggleFullScreen() void QDeclarativeViewer::showWarnings(bool show) { -#if defined(Q_OS_SYMBIAN) - loggerWindow->showMaximized(); -#else loggerWindow->setVisible(show); -#endif } void QDeclarativeViewer::warningsWidgetOpened() @@ -1117,12 +1092,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url) canvas->engine()->clearComponentCache(); QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty(QLatin1String("qmlViewer"), this); -#ifdef Q_OS_SYMBIAN - ctxt->setContextProperty(QLatin1String("qmlViewerFolder"), QLatin1String("E:\\")); // Documents on your S60 phone -#else ctxt->setContextProperty(QLatin1String("qmlViewerFolder"), QDir::currentPath()); -#endif - ctxt->setContextProperty(QLatin1String("runtime"), Runtime::instance()); QString fileName = url.toLocalFile(); |