diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-08-12 12:18:48 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-08-12 12:18:48 (GMT) |
commit | d658662e742b57f60908ba3d935b0870e12d8963 (patch) | |
tree | 6819e6af527e2f11473b99c7efca48b9faf529a1 | |
parent | e4bb34d51cc9f4f78abc17a0e715876b11d53ace (diff) | |
parent | 7a9b580030208a806897146b4c0f1d8f0d9caaa4 (diff) | |
download | Qt-d658662e742b57f60908ba3d935b0870e12d8963.zip Qt-d658662e742b57f60908ba3d935b0870e12d8963.tar.gz Qt-d658662e742b57f60908ba3d935b0870e12d8963.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
40 files changed, 116 insertions, 125 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 2ef78b2..7091b5d 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -9108,7 +9108,6 @@ void QGraphicsTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) QApplication::sendEvent(receiver, &_event); } } - QGraphicsItem::mouseReleaseEvent(event); dd->clickCausedFocus = 0; dd->sendControlEvent(event); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index d2183d2..db78349 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1100,7 +1100,7 @@ void QApplication::symbianResourceChange(int type) s60Style = qobject_cast<QS60Style*>(QApplication::style()); if (s60Style) - s60Style->handleDynamicLayoutVariantSwitch(); + s60Style->d_func()->handleDynamicLayoutVariantSwitch(); #endif } break; @@ -1108,7 +1108,7 @@ void QApplication::symbianResourceChange(int type) #ifndef QT_NO_STYLE_S60 case KAknsMessageSkinChange: if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) - s60Style->handleSkinChange(); + s60Style->d_func()->handleSkinChange(); break; #endif #endif // Q_WS_S60 diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h index bdd8c8a..7711b19 100644 --- a/src/gui/styles/qs60style.h +++ b/src/gui/styles/qs60style.h @@ -89,12 +89,6 @@ public: bool saveS60ThemeToBlob(const QString &blobFile) const; #endif // !Q_WS_S60 -#ifdef Q_WS_S60 -public Q_SLOTS: - void handleDynamicLayoutVariantSwitch(); - void handleSkinChange(); -#endif // Q_WS_S60 - protected Q_SLOTS: QIcon standardIconImplementation( StandardPixmap standardIcon, const QStyleOption * option = 0, const QWidget * widget = 0 ) const; @@ -102,6 +96,7 @@ protected Q_SLOTS: private: Q_DISABLE_COPY(QS60Style) friend class QStyleFactory; + friend class QApplication; }; #endif // QT_NO_STYLE_S60 diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 0cd2310..680d787 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -455,6 +455,11 @@ public: SkinElementFlags flags = KDefaultSkinElementFlags); static QPixmap backgroundTexture(); +#ifdef Q_WS_S60 + void handleDynamicLayoutVariantSwitch(); + void handleSkinChange(); +#endif // Q_WS_S60 + private: static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter, const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 635442b..45be2eb 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1358,26 +1358,24 @@ QS60Style::QS60Style() { } -void QS60Style::handleDynamicLayoutVariantSwitch() +void QS60StylePrivate::handleDynamicLayoutVariantSwitch() { - Q_D(QS60Style); - d->clearCaches(QS60StylePrivate::CC_LayoutChange); - d->setActiveLayout(); - d->refreshUI(); - d->setBackgroundTexture(qApp); + clearCaches(QS60StylePrivate::CC_LayoutChange); + setActiveLayout(); + refreshUI(); + setBackgroundTexture(qApp); foreach (QWidget *widget, QApplication::allWidgets()) widget->ensurePolished(); } -void QS60Style::handleSkinChange() +void QS60StylePrivate::handleSkinChange() { - Q_D(QS60Style); - d->clearCaches(QS60StylePrivate::CC_ThemeChange); - d->setThemePalette(qApp); + clearCaches(QS60StylePrivate::CC_ThemeChange); + setThemePalette(qApp); foreach (QWidget *topLevelWidget, QApplication::allWidgets()){ QEvent e(QEvent::StyleChange); QApplication::sendEvent(topLevelWidget, &e); - d->setThemePalette(topLevelWidget); + setThemePalette(topLevelWidget); topLevelWidget->ensurePolished(); } } diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index a575199..c47a834 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -775,7 +775,9 @@ QFont::QFont() Constructs a font object with the specified \a family, \a pointSize, \a weight and \a italic settings. - If \a pointSize is <= 0, it is set to 12. + If \a pointSize is zero or negative, the point size of the font + is set to a system-dependent default value. Generally, this is + 12 points, except on Symbian where it is 7 points. The \a family name may optionally also include a foundry name, e.g. "Helvetica [Cronyx]". If the \a family is diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index f4a2348..80215e1 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -400,8 +400,17 @@ void QLineControl::moveCursor(int pos, bool mark) */ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) { - int priorState = m_undoState; - removeSelectedText(); + int priorState = 0; + bool isGettingInput = !event->commitString().isEmpty() || !event->preeditString().isEmpty() + || event->replacementLength() > 0; + bool cursorPositionChanged = false; + + if (isGettingInput) { + // If any text is being input, remove selected text. + priorState = m_undoState; + removeSelectedText(); + } + int c = m_cursor; // cursor position after insertion of commit string if (event->replacementStart() <= 0) @@ -415,11 +424,30 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) m_selend = m_selstart + event->replacementLength(); removeSelectedText(); } - if (!event->commitString().isEmpty()) + if (!event->commitString().isEmpty()) { insert(event->commitString()); + cursorPositionChanged = true; + } m_cursor = qMin(c, m_text.length()); + for (int i = 0; i < event->attributes().size(); ++i) { + const QInputMethodEvent::Attribute &a = event->attributes().at(i); + if (a.type == QInputMethodEvent::Selection) { + m_cursor = qBound(0, a.start + a.length, m_text.length()); + if (a.length) { + m_selstart = qMax(0, qMin(a.start, m_text.length())); + m_selend = m_cursor; + if (m_selend < m_selstart) { + qSwap(m_selstart, m_selend); + } + } else { + m_selstart = m_selend = 0; + } + cursorPositionChanged = true; + } + } + setPreeditArea(m_cursor, event->preeditString()); m_preeditCursor = event->preeditString().length(); m_hideCursor = false; @@ -442,9 +470,10 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) } m_textLayout.setAdditionalFormats(formats); updateDisplayText(); - if (!event->commitString().isEmpty()) + if (cursorPositionChanged) emitCursorPositionChanged(); - finishChange(priorState); + if (isGettingInput) + finishChange(priorState); } /*! diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 5b04616..cd9666d 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1657,7 +1657,7 @@ QVariant QLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const case Qt::ImFont: return font(); case Qt::ImCursorPosition: - return QVariant(d->control->hasSelectedText() ? d->control->selectionEnd() : d->control->cursor()); + return QVariant(d->control->cursor()); case Qt::ImSurroundingText: return QVariant(text()); case Qt::ImCurrentSelection: diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h index b21820c..2c0d08f 100644 --- a/src/gui/widgets/qlineedit_p.h +++ b/src/gui/widgets/qlineedit_p.h @@ -76,7 +76,7 @@ public: QLineEditPrivate() : control(0), frame(1), contextMenuEnabled(1), cursorVisible(0), - dragEnabled(0), hscroll(0), vscroll(0), clickCausedFocus(0), + dragEnabled(0), clickCausedFocus(0), hscroll(0), vscroll(0), alignment(Qt::AlignLeading | Qt::AlignVCenter), leftTextMargin(0), topTextMargin(0), rightTextMargin(0), bottomTextMargin(0) { @@ -101,7 +101,7 @@ public: inline bool shouldEnableInputMethod() const { - return !control->isReadOnly() && (control->echoMode() == QLineEdit::Normal || control->echoMode() == QLineEdit::PasswordEchoOnEdit); + return !control->isReadOnly(); } QPoint tripleClick; diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index d6b0325..33c72b4 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -65,7 +65,7 @@ #include <private/qhttpnetworkrequest_p.h> #include <private/qhttpnetworkreply_p.h> -#include "qhttpnetworkconnectionchannel_p.h" +#include <private/qhttpnetworkconnectionchannel_p.h> #ifndef QT_NO_HTTP diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index dd5edb0..854bd17 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -97,43 +97,6 @@ QT_BEGIN_NAMESPACE /*! Create a new QNetworkCookie object, initializing the cookie name - and its value to empty QByteArray - - A cookie is only valid if it has a name. However, the value is - opaque to the application and being empty may have significance to - the remote server. -*/ -QNetworkCookie::QNetworkCookie() - : d(new QNetworkCookiePrivate) -{ - qRegisterMetaType<QNetworkCookie>(); - qRegisterMetaType<QList<QNetworkCookie> >(); - - d->name = QByteArray(); - d->value = QByteArray(); -} - -/*! - Create a new QNetworkCookie object, initializing the cookie name - to \a name and its value to empty QByteArray. - - A cookie is only valid if it has a name. However, the value is - opaque to the application and being empty may have significance to - the remote server. -*/ -QNetworkCookie::QNetworkCookie( const QByteArray &name ) - : d(new QNetworkCookiePrivate) -{ - qRegisterMetaType<QNetworkCookie>(); - qRegisterMetaType<QList<QNetworkCookie> >(); - - d->name = name; - d->value = QByteArray(); -} - - -/*! - Create a new QNetworkCookie object, initializing the cookie name to \a name and its value to \a value. A cookie is only valid if it has a name. However, the value is diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index 35c7095..ef309a8 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -67,9 +67,7 @@ public: Full }; - QNetworkCookie(); - QNetworkCookie(const QByteArray &name ); - QNetworkCookie(const QByteArray &name, const QByteArray &value ); + QNetworkCookie(const QByteArray &name = QByteArray(), const QByteArray &value = QByteArray()); QNetworkCookie(const QNetworkCookie &other); ~QNetworkCookie(); QNetworkCookie &operator=(const QNetworkCookie &other); diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index caa8669..d6d76f7 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -242,18 +242,6 @@ public: }; /*! - Constructs a QNetworkRequest object with empty QUrl. - - \sa url(), setUrl() -*/ -QNetworkRequest::QNetworkRequest() - : d(new QNetworkRequestPrivate) -{ - d->url = QUrl(); -} - - -/*! Constructs a QNetworkRequest object with \a url as the URL to be requested. diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index cf06f7c..1ea7934 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -87,9 +87,7 @@ public: AlwaysCache }; - - explicit QNetworkRequest(); - explicit QNetworkRequest(const QUrl &url); + explicit QNetworkRequest(const QUrl &url = QUrl()); QNetworkRequest(const QNetworkRequest &other); ~QNetworkRequest(); QNetworkRequest &operator=(const QNetworkRequest &other); diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 4bb56a3..b528850 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -159,20 +159,11 @@ public: \sa setRequiredStatus() setLength() setPrecision() setDefaultValue() setGenerated() setReadOnly() */ -QSqlField::QSqlField() -{ - d = new QSqlFieldPrivate(QString(), QVariant::Invalid); -} - -QSqlField::QSqlField(const QString& fieldName) -{ - d = new QSqlFieldPrivate(fieldName, QVariant::Invalid); -} - QSqlField::QSqlField(const QString& fieldName, QVariant::Type type) { d = new QSqlFieldPrivate(fieldName, type); } + /*! Constructs a copy of \a other. */ diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h index d70af15..2c3b52a 100644 --- a/src/sql/kernel/qsqlfield.h +++ b/src/sql/kernel/qsqlfield.h @@ -58,9 +58,9 @@ class Q_SQL_EXPORT QSqlField public: enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 }; - QSqlField(); - QSqlField(const QString& fieldName); - QSqlField(const QString& fieldName, QVariant::Type type); + QSqlField(const QString& fieldName = QString(), + QVariant::Type type = QVariant::Invalid); + QSqlField(const QSqlField& other); QSqlField& operator=(const QSqlField& other); bool operator==(const QSqlField& other) const; diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 2a1ba64..93c9d9f 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -53,9 +53,7 @@ QT_BEGIN_NAMESPACE struct QHolder { - QHolder(): holderName(QString()), holderPos(-1) {} - QHolder(const QString& hldr): holderName(hldr), holderPos(-1) {} - QHolder(const QString& hldr, int index): holderName(hldr), holderPos(index) {} + QHolder(const QString& hldr = QString(), int index = -1): holderName(hldr), holderPos(index) {} bool operator==(const QHolder& h) const { return h.holderPos == holderPos && h.holderName == holderName; } bool operator!=(const QHolder& h) const { return h.holderPos != holderPos || h.holderName != holderName; } QString holderName; diff --git a/tests/auto/_Categories/QtGui.txt b/tests/auto/_Categories/QtGui.txt index dcb3be5..77830b2 100644 --- a/tests/auto/_Categories/QtGui.txt +++ b/tests/auto/_Categories/QtGui.txt @@ -38,7 +38,7 @@ qdesktopwidget qdial qdialog qdialogbuttonbox -qdirectpainter cetest-subdir: test +#qdirectpainter cetest-subdir: test TEST IS FOR EMBEDDED LINUX ONLY qdirmodel qdockwidget qdoublespinbox @@ -87,7 +87,6 @@ qitemeditorfactory qitemmodel qitemselectionmodel qitemview -qkeyevent qkeysequence qlabel qlayout @@ -118,7 +117,6 @@ qpixmap qpixmapcache qpixmapfilter qplaintextedit -qpointarray #qprinter NO PRINTING SUPPORT ON SYMBIAN YET #qprinterinfo qprogressbar diff --git a/tests/auto/_Categories/QtNetwork.txt b/tests/auto/_Categories/QtNetwork.txt index f08cfc9..30645d7 100644 --- a/tests/auto/_Categories/QtNetwork.txt +++ b/tests/auto/_Categories/QtNetwork.txt @@ -1,4 +1,4 @@ -_networkselftest +networkselftest #qsocketnotifier qabstractnetworkcache qabstractsocket diff --git a/tests/auto/_Categories/QtScript.txt b/tests/auto/_Categories/QtScript.txt index abd93a4..3b7e79a 100644 --- a/tests/auto/_Categories/QtScript.txt +++ b/tests/auto/_Categories/QtScript.txt @@ -6,7 +6,6 @@ qscriptengine qscriptengineagent #qscriptenginedebugger does not compile, requires QtScriptTools.lib qscriptjstestsuite -qscriptqobject qscriptstring qscriptv8testsuite qscriptvalue diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index a048bc7..c36cd75 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -186,7 +186,6 @@ SUBDIRS += \ qitemmodel \ qitemselectionmodel \ qitemview \ - qkeyevent \ qkeysequence \ qlabel \ qlayout \ diff --git a/tests/auto/qdom/qdom.pro b/tests/auto/qdom/qdom.pro index 84b721e..61914b5 100644 --- a/tests/auto/qdom/qdom.pro +++ b/tests/auto/qdom/qdom.pro @@ -10,7 +10,7 @@ wince*|symbian*: { DEPLOYMENT += addFiles DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs - DEFINES += SRCDIR=\\\"\\\" + !symbian:DEFINES += SRCDIR=\\\"\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index 5b4787f..cea0402 100644 --- a/tests/auto/qdom/tst_qdom.cpp +++ b/tests/auto/qdom/tst_qdom.cpp @@ -52,6 +52,10 @@ #include <QtXml> #include <QVariant> +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 9ef2c74..078ea07 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -237,7 +237,6 @@ void tst_QFileInfo::copy() tst_QFileInfo::tst_QFileInfo() { - Q_SET_DEFAULT_IAP } void tst_QFileInfo::isFile_data() @@ -331,6 +330,9 @@ void tst_QFileInfo::isRoot_data() QTest::newRow("drive 1") << "c:" << false; QTest::newRow("drive 2") << "c:/" << true; QTest::newRow("drive 3") << "p:/" << false; +#endif + +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) QTest::newRow("unc 1") << "//" + QtNetworkSettings::winServerName() << true; QTest::newRow("unc 2") << "//" + QtNetworkSettings::winServerName() + "/" << true; QTest::newRow("unc 3") << "//" + QtNetworkSettings::winServerName() + "/testshare" << false; @@ -485,6 +487,8 @@ void tst_QFileInfo::canonicalFilePath() QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath()); } } +# if !defined(Q_OS_SYMBIAN) + // Symbian doesn't support links to directories { const QString link(QDir::tempPath() + QDir::separator() + "tst_qfileinfo"); QFile::remove(link); @@ -516,6 +520,7 @@ void tst_QFileInfo::canonicalFilePath() QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath()); } } +# endif #endif } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 892e182..0b15928 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -597,7 +597,7 @@ void tst_QGraphicsItem::destruction() child->setParentItem(parent); parent->setVisible(false); scene->addItem(parent); - QCOMPARE(child->parentItem(), parent); + QCOMPARE(child->parentItem(), static_cast<QGraphicsItem*>(parent)); delete scene; QCOMPARE(itemDeleted, 110); } diff --git a/tests/auto/qgroupbox/tst_qgroupbox.cpp b/tests/auto/qgroupbox/tst_qgroupbox.cpp index 4933deb..383326d 100644 --- a/tests/auto/qgroupbox/tst_qgroupbox.cpp +++ b/tests/auto/qgroupbox/tst_qgroupbox.cpp @@ -467,7 +467,7 @@ void tst_QGroupBox::propagateFocus() box.show(); box.setFocus(); QTest::qWait(250); - QCOMPARE(qApp->focusWidget(), &lineEdit); + QCOMPARE(qApp->focusWidget(), static_cast<QWidget*>(&lineEdit)); } QTEST_MAIN(tst_QGroupBox) diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp index bf499ec..9943414 100644 --- a/tests/auto/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp @@ -14,7 +14,7 @@ ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software +** General Public License version 2.1 as published by 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 @@ -219,7 +219,7 @@ void tst_QHostInfo::lookupIPv4_data() #ifdef Q_OS_SYMBIAN // Test server lookup QTest::newRow("lookup_01") << QtNetworkSettings::serverName() << QtNetworkSettings::serverIP().toString() << int(QHostInfo::NoError); - QTest::newRow("literal_ip4") << QtNetworkSettings::serverIP() << QtNetworkSettings::serverIP().toString() << int(QHostInfo::NoError); + QTest::newRow("literal_ip4") << QtNetworkSettings::serverIP().toString() << QtNetworkSettings::serverIP().toString() << int(QHostInfo::NoError); QTest::newRow("multiple_ip4") << "multi.dev.troll.no" << "1.2.3.4 1.2.3.5 10.3.3.31" << int(QHostInfo::NoError); #else QTest::newRow("empty") << "" << "" << int(QHostInfo::HostNotFound); diff --git a/tests/auto/qimagereader/qimagereader.pro b/tests/auto/qimagereader/qimagereader.pro index b4e1de1..31a9b0f 100644 --- a/tests/auto/qimagereader/qimagereader.pro +++ b/tests/auto/qimagereader/qimagereader.pro @@ -3,7 +3,7 @@ SOURCES += tst_qimagereader.cpp MOC_DIR=tmp QT += network RESOURCES += qimagereader.qrc -DEFINES += SRCDIR=\\\"$$PWD\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\" !contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF !contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index ea30b3c..3b1b40b 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -55,6 +55,10 @@ #include <QTcpServer> #include <QTimer> +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "." +#endif + typedef QMap<QString, QString> QStringMap; typedef QList<int> QIntList; Q_DECLARE_METATYPE(QImage) diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index 6059833..111a093 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -164,7 +164,7 @@ protected slots: void restartProcess(); void waitForReadyReadInAReadyReadSlotSlot(); void waitForBytesWrittenInABytesWrittenSlotSlot(); - + private: QProcess *process; qint64 bytesAvailable; @@ -1805,8 +1805,9 @@ void tst_QProcess::setEnvironment_data() void tst_QProcess::setEnvironment() { -#if !defined (Q_OS_WINCE) - // there is no concept of system variables on Windows CE as there is no console +#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + QSKIP("OS doesn't support environment variables", SkipAll); +#endif // make sure our environment variables are correct QVERIFY(qgetenv("tst_QProcess").isEmpty()); @@ -1882,7 +1883,6 @@ void tst_QProcess::setEnvironment() QCOMPARE(process.readAll(), value.toLocal8Bit()); } -#endif } //----------------------------------------------------------------------------- void tst_QProcess::systemEnvironment() diff --git a/tests/auto/qscriptengine/qscriptengine.pro b/tests/auto/qscriptengine/qscriptengine.pro index 39484bd..4d1828f 100644 --- a/tests/auto/qscriptengine/qscriptengine.pro +++ b/tests/auto/qscriptengine/qscriptengine.pro @@ -1,7 +1,7 @@ load(qttest_p4) QT = core gui script SOURCES += tst_qscriptengine.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\" wince*|symbian*: { addFiles.sources = script @@ -10,5 +10,6 @@ wince*|symbian*: { } symbian: { + DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb" } diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index ab4364e..cb2ab2e 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -55,6 +55,11 @@ Q_DECLARE_METATYPE(QObjectList) //TESTED_CLASS= //TESTED_FILES= +#if defined(Q_OS_SYMBIAN) +# define STRINGIFY(x) #x +# define TOSTRING(x) STRINGIFY(x) +# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) +#endif class tst_QScriptEngine : public QObject { Q_OBJECT @@ -227,7 +232,7 @@ void tst_QScriptEngine::newFunction() QCOMPARE(fun.prototype().isValid(), true); QCOMPARE(fun.prototype().isFunction(), true); QCOMPARE(fun.prototype().strictlyEquals(eng.evaluate("Function.prototype")), true); - + QCOMPARE(fun.call().isNull(), true); QCOMPARE(fun.construct().isObject(), true); } diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index ab0ddca..2733845 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -44,6 +44,10 @@ #include <QtScript> +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro index 58c53e4..3f641b5 100644 --- a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro +++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro @@ -1,7 +1,7 @@ load(qttest_p4) QT = core script SOURCES += tst_qscriptv8testsuite.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\" wince*|symbian: { testFiles.sources = tests diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 6604104..724c2fb 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -45,6 +45,10 @@ #include <QtScript> +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/qsplitter/qsplitter.pro b/tests/auto/qsplitter/qsplitter.pro index 8c3e40b..5ec2b9d 100644 --- a/tests/auto/qsplitter/qsplitter.pro +++ b/tests/auto/qsplitter/qsplitter.pro @@ -8,7 +8,7 @@ wince*|symbian*: { addFiles.sources = extradata.txt setSizes3.dat addFiles.path = . DEPLOYMENT += addFiles - DEFINES += SRCDIR=\\\"./\\\" + !symbian:DEFINES += SRCDIR=\\\"./\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp index a44e25d..d76bf78 100644 --- a/tests/auto/qsplitter/tst_qsplitter.cpp +++ b/tests/auto/qsplitter/tst_qsplitter.cpp @@ -57,6 +57,10 @@ #include <qdebug.h> // for file error messages #include "../../shared/util.h" +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 12e8f1b..05b0794 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -626,7 +626,7 @@ void tst_QSslSocket::connectToHostEncryptedWithVerificationPeerName() socket->addCaCertificates(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem")); #ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND - connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), + connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(untrustedWorkaroundSlot(QList<QSslError>))); #endif diff --git a/tests/auto/qstyle/qstyle.pro b/tests/auto/qstyle/qstyle.pro index 8163f26..1ffe369 100644 --- a/tests/auto/qstyle/qstyle.pro +++ b/tests/auto/qstyle/qstyle.pro @@ -3,7 +3,7 @@ TARGET.EPOCHEAPSIZE = 0x200000 0x800000 SOURCES += tst_qstyle.cpp wince*|symbian*: { - DEFINES += SRCDIR=\\\".\\\" + !symbian:DEFINES += SRCDIR=\\\".\\\" addPixmap.sources = task_25863.png addPixmap.path = . DEPLOYMENT += addPixmap diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 98a5e73..0014e12 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9272,7 +9272,7 @@ void tst_QWidget::inputFocus_task257832() QSKIP("No input context", SkipSingle); widget->setFocus(); context->setFocusWidget(widget); - QCOMPARE(context->focusWidget(), widget); + QCOMPARE(context->focusWidget(), static_cast<QWidget*>(widget)); widget->setReadOnly(true); QVERIFY(!context->focusWidget()); delete widget; |