summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-19 14:21:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-19 14:21:41 (GMT)
commit2969a34664430338875e9786935b865aec0252de (patch)
tree35588b0f0fbd31d490809d90f6362fe178e36fea
parent16f1618c62c9e292d9feaed7f967e360c1d27520 (diff)
parent4542e8dbc2aeb942a8c963724c02da5220deef4f (diff)
downloadQt-2969a34664430338875e9786935b865aec0252de.zip
Qt-2969a34664430338875e9786935b865aec0252de.tar.gz
Qt-2969a34664430338875e9786935b865aec0252de.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Enable s60main.rsc infixing. Virtual Keyboard and double tap for Symbian support Whitespace
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp25
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h9
-rw-r--r--src/gui/s60framework/qs60mainapplication.cpp7
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp10
-rw-r--r--src/gui/s60framework/s60framework.pri3
-rw-r--r--src/gui/styles/qs60style.cpp9
-rw-r--r--src/s60installs/s60installs.pro8
-rw-r--r--tools/runonphone/main.cpp42
-rw-r--r--tools/runonphone/serenum_stub.cpp2
-rw-r--r--tools/runonphone/serenum_unix.cpp2
-rw-r--r--tools/runonphone/trksignalhandler.cpp30
11 files changed, 76 insertions, 71 deletions
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index a0a80c8..402eccf 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -132,27 +132,10 @@ private:
void init()
{
#ifdef Q_WS_S60
-# if defined(QT_LIBINFIX)
-# define S60_LIBNAME_3_1 "qts60plugin_3_1" QT_LIBINFIX ".dll"
-# define S60_LIBNAME_3_2 "qts60plugin_3_2" QT_LIBINFIX ".dll"
-# define S60_LIBNAME_5_0 "qts60plugin_5_0" QT_LIBINFIX ".dll"
-
- TPtrC8 ptrLibName_3_1(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_1));
- TPtrC8 ptrLibName_3_2(reinterpret_cast<const TUint8 *>(S60_LIBNAME_3_2));
- TPtrC8 ptrLibName_5_0(reinterpret_cast<const TUint8 *>(S60_LIBNAME_5_0));
-
- TFileName KLibName_3_1;
- TFileName KLibName_3_2;
- TFileName KLibName_5_0;
-
- KLibName_3_1.Copy(ptrLibName_3_1);
- KLibName_3_2.Copy(ptrLibName_3_2);
- KLibName_5_0.Copy(ptrLibName_5_0);
-# else
- _LIT(KLibName_3_1, "qts60plugin_3_1.dll");
- _LIT(KLibName_3_2, "qts60plugin_3_2.dll");
- _LIT(KLibName_5_0, "qts60plugin_5_0.dll");
-# endif
+ _LIT(KLibName_3_1, "qts60plugin_3_1" QT_LIBINFIX_UNICODE L".dll");
+ _LIT(KLibName_3_2, "qts60plugin_3_2" QT_LIBINFIX_UNICODE L".dll");
+ _LIT(KLibName_5_0, "qts60plugin_5_0" QT_LIBINFIX_UNICODE L".dll");
+
TPtrC libName;
TInt uidValue;
switch (QSysInfo::s60Version()) {
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
index 9f282d5..4a515ce 100644
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ b/src/corelib/kernel/qcore_symbian_p.h
@@ -60,6 +60,15 @@
#include <qhash.h>
#include <f32file.h>
+#define QT_LSTRING2(x) L##x
+#define QT_LSTRING(x) QT_LSTRING2(x)
+
+#if defined(QT_LIBINFIX)
+# define QT_LIBINFIX_UNICODE QT_LSTRING(QT_LIBINFIX)
+#else
+# define QT_LIBINFIX_UNICODE L""
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp
index 2a7c4aa..41ac1a8 100644
--- a/src/gui/s60framework/qs60mainapplication.cpp
+++ b/src/gui/s60framework/qs60mainapplication.cpp
@@ -41,6 +41,7 @@
// INCLUDE FILES
#include <exception>
+#include <private/qcore_symbian_p.h>
#include "qs60maindocument.h"
#include "qs60mainapplication_p.h"
#include "qs60mainapplication.h"
@@ -57,17 +58,17 @@ CApaApplication *newS60Application()
return new QS60MainApplication;
}
-_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc");
+_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main" QT_LIBINFIX_UNICODE L".rsc");
/*!
\class QS60MainApplication
\since 4.6
\brief The QS60MainApplication class provides support for migration from S60.
-
+
\warning This class is provided only to get access to S60 specific
functionality in the application framework classes. It is not
portable. We strongly recommend against using it in new applications.
-
+
The QS60MainApplication provides a helper class for use in migrating
from existing S60 based applications to Qt based applications. It is
used in the exact same way as the \c CAknApplication class from
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index 012985b..3b5b9d3 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -45,7 +45,15 @@
#include <eikmenub.h>
#include <eikmenup.h>
#include <barsread.h>
-#include <s60main.rsg>
+#include <qconfig.h>
+#if defined(QT_LIBINFIX_UNQUOTED)
+// Two level macro needed for proper expansion of libinfix
+# define QT_S60MAIN_RSG_2(x) <s60main##x##.rsg>
+# define QT_S60MAIN_RSG(x) QT_S60MAIN_RSG_2(x)
+# include QT_S60MAIN_RSG(QT_LIBINFIX_UNQUOTED)
+#else
+# include <s60main.rsg>
+#endif
#include <avkon.rsg>
#include "qs60mainappui.h"
diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri
index 6080e6d..d30f80a 100644
--- a/src/gui/s60framework/s60framework.pri
+++ b/src/gui/s60framework/s60framework.pri
@@ -4,6 +4,7 @@
minimalAppResource31 = \
"SOURCEPATH s60framework" \
"START RESOURCE s60main.rss" \
+ "TARGET s60main$${QT_LIBINFIX}" \
"HEADER" \
"TARGETPATH /resource/apps" \
"END"
@@ -17,3 +18,5 @@ HEADERS += s60framework/qs60mainapplication_p.h \
s60framework/qs60mainapplication.h \
s60framework/qs60mainappui.h \
s60framework/qs60maindocument.h
+
+!isEmpty(QT_LIBINFIX): DEFINES += QT_LIBINFIX_UNQUOTED=$$QT_LIBINFIX \ No newline at end of file
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index a2ebebb..cd556b8 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2475,6 +2475,12 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
{
int retValue = -1;
switch (sh) {
+ case SH_RequestSoftwareInputPanel:
+ if (QS60StylePrivate::isSingleClickUi())
+ retValue = RSIP_OnMouseClick;
+ else
+ retValue = RSIP_OnMouseClickAndAlreadyFocused;
+ break;
case SH_ComboBox_Popup:
retValue = true;
break;
@@ -2531,9 +2537,6 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_UnderlineShortcut:
retValue = 0;
break;
- case SH_RequestSoftwareInputPanel:
- retValue = RSIP_OnMouseClickAndAlreadyFocused;
- break;
case SH_FormLayoutWrapPolicy:
retValue = QFormLayout::WrapLongRows;
break;
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index ec03673..1f6e72b 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -12,10 +12,7 @@ symbian: {
isEmpty(QT_LIBINFIX) {
TARGET.UID3 = 0x2001E61C
- # s60main.rsc and sqlite3 are expected to be already found on phone if
- # infixed configuration is built.
- DEPLOYMENT += qtresources
-
+ # sqlite3 is expected to be already found on phone if infixed configuration is built.
sqlitedeployment = \
"; Deploy sqlite onto phone that does not have it already" \
"@\"$$PWD/sqlite3.sis\", (0x2002af5f)"
@@ -26,8 +23,9 @@ symbian: {
}
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
- qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc
+ qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main$${QT_LIBINFIX}.rsc
qtresources.path = c:$$APP_RESOURCE_DIR
+ DEPLOYMENT += qtresources
qtlibraries.sources = \
QtCore$${QT_LIBINFIX}.dll \
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index 1a5cdee..65085e0 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -44,9 +44,9 @@
#include <QStringList>
#include <QScopedPointer>
#include <QTimer>
-#include "trkutils.h"
-#include "trkdevice.h"
-#include "launcher.h"
+#include "symbianutils/trkutils.h"
+#include "symbianutils/trkdevice.h"
+#include "symbianutils/launcher.h"
#include "trksignalhandler.h"
#include "serenum.h"
@@ -133,28 +133,28 @@ int main(int argc, char *argv[])
return 1;
}
- if(serialPortName.isEmpty()) {
- if(loglevel > 0)
+ if (serialPortName.isEmpty()) {
+ if (loglevel > 0)
outstream << "Detecting serial ports" << endl;
QList <SerialPortId> ports = enumerateSerialPorts();
foreach(SerialPortId id, ports) {
- if(loglevel > 0)
+ if (loglevel > 0)
outstream << "Port Name: " << id.portName << ", "
<< "Friendly Name:" << id.friendlyName << endl;
- if(serialPortName.isEmpty()) {
- if(!id.friendlyName.isEmpty() &&
- serialPortFriendlyName.isEmpty() &&
- (id.friendlyName.contains("symbian", Qt::CaseInsensitive) ||
- id.friendlyName.contains("s60", Qt::CaseInsensitive) ||
- id.friendlyName.contains("nokia", Qt::CaseInsensitive)))
- serialPortName = id.portName;
- else if (!id.friendlyName.isEmpty() &&
- !serialPortFriendlyName.isEmpty() &&
- id.friendlyName.contains(serialPortFriendlyName))
+ if (serialPortName.isEmpty()) {
+ if (!id.friendlyName.isEmpty()
+ && serialPortFriendlyName.isEmpty()
+ && (id.friendlyName.contains("symbian", Qt::CaseInsensitive)
+ || id.friendlyName.contains("s60", Qt::CaseInsensitive)
+ || id.friendlyName.contains("nokia", Qt::CaseInsensitive)))
serialPortName = id.portName;
+ else if (!id.friendlyName.isEmpty()
+ && !serialPortFriendlyName.isEmpty()
+ && id.friendlyName.contains(serialPortFriendlyName))
+ serialPortName = id.portName;
}
}
- if(serialPortName.isEmpty()) {
+ if (serialPortName.isEmpty()) {
errstream << "No phone found, ensure USB cable is connected or specify manually with -p" << endl;
return 1;
}
@@ -162,7 +162,7 @@ int main(int argc, char *argv[])
QScopedPointer<trk::Launcher> launcher;
- if(sisFile.isEmpty()) {
+ if (sisFile.isEmpty()) {
launcher.reset(new trk::Launcher(trk::Launcher::ActionCopyRun));
launcher->setCopyFileName(exeFile, QString("c:\\sys\\bin\\") + exeFile);
errstream << "System TRK required to copy EXE, use --sis if using Application TRK" << endl;
@@ -172,14 +172,14 @@ int main(int argc, char *argv[])
launcher->setCopyFileName(sisFile, "c:\\data\\testtemp.sis");
launcher->setInstallFileName("c:\\data\\testtemp.sis");
}
- if(loglevel > 0)
+ if (loglevel > 0)
outstream << "Connecting to target via " << serialPortName << endl;
launcher->setTrkServerName(serialPortName);
launcher->setFileName(QString("c:\\sys\\bin\\") + exeFile);
launcher->setCommandLineArgs(cmdLine);
- if(loglevel > 1)
+ if (loglevel > 1)
launcher->setVerbose(1);
TrkSignalHandler handler;
@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
}
QString errorMessage;
- if(!launcher->startServer(&errorMessage)) {
+ if (!launcher->startServer(&errorMessage)) {
errstream << errorMessage << endl;
return 1;
}
diff --git a/tools/runonphone/serenum_stub.cpp b/tools/runonphone/serenum_stub.cpp
index f39765e..6f0e1ef 100644
--- a/tools/runonphone/serenum_stub.cpp
+++ b/tools/runonphone/serenum_stub.cpp
@@ -47,7 +47,7 @@
QList<SerialPortId> enumerateSerialPorts()
{
QList<SerialPortId> list;
- qWarning() << "enumerateSerialPorts not implemented" << endl;
+ qWarning() << "enumerateSerialPorts not implemented";
return list;
}
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
index ca6c437..c8ec021 100644
--- a/tools/runonphone/serenum_unix.cpp
+++ b/tools/runonphone/serenum_unix.cpp
@@ -51,7 +51,7 @@ QList<SerialPortId> enumerateSerialPorts()
QList<SerialPortId> list;
QDir dir("/dev/serial/by-id/");
QFileInfoList ports(dir.entryInfoList());
- foreach(QFileInfo info, ports) {
+ foreach (const QFileInfo &info, ports) {
if (!info.isDir()) {
SerialPortId id;
id.friendlyName = info.fileName();
diff --git a/tools/runonphone/trksignalhandler.cpp b/tools/runonphone/trksignalhandler.cpp
index 138ebc9..18a2c0c 100644
--- a/tools/runonphone/trksignalhandler.cpp
+++ b/tools/runonphone/trksignalhandler.cpp
@@ -58,13 +58,13 @@ private:
void TrkSignalHandler::copyingStarted()
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Copying..." << endl;
}
void TrkSignalHandler::canNotConnect(const QString &errorMessage)
{
- d->err << "Cannot Connect - " << errorMessage << endl;
+ d->err << "Cannot connect - " << errorMessage << endl;
}
void TrkSignalHandler::canNotCreateFile(const QString &filename, const QString &errorMessage)
@@ -84,7 +84,7 @@ void TrkSignalHandler::canNotCloseFile(const QString &filename, const QString &e
void TrkSignalHandler::installingStarted()
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Installing..." << endl;
}
@@ -95,19 +95,19 @@ void TrkSignalHandler::canNotInstall(const QString &packageFilename, const QStri
void TrkSignalHandler::installingFinished()
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Installing finished" << endl;
}
void TrkSignalHandler::startingApplication()
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Starting app..." << endl;
}
void TrkSignalHandler::applicationRunning(uint pid)
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Running..." << endl;
}
@@ -118,7 +118,7 @@ void TrkSignalHandler::canNotRun(const QString &errorMessage)
void TrkSignalHandler::finished()
{
- if(d->loglevel > 0)
+ if (d->loglevel > 0)
d->out << "Done." << endl;
QCoreApplication::quit();
}
@@ -130,17 +130,17 @@ void TrkSignalHandler::applicationOutputReceived(const QString &output)
void TrkSignalHandler::copyProgress(int percent)
{
- if(d->loglevel > 0) {
+ if (d->loglevel > 0) {
d->out << percent << "% ";
d->out.flush();
- if(percent==100)
+ if (percent==100)
d->out << endl;
}
}
void TrkSignalHandler::stateChanged(int state)
{
- if(d->loglevel > 1)
+ if (d->loglevel > 1)
d->out << "State" << state << endl;
}
@@ -164,10 +164,10 @@ void TrkSignalHandler::timeout()
emit terminate();
}
-TrkSignalHandlerPrivate::TrkSignalHandlerPrivate() :
- out(stdout),
- err(stderr),
- loglevel(0)
+TrkSignalHandlerPrivate::TrkSignalHandlerPrivate()
+ : out(stdout),
+ err(stderr),
+ loglevel(0)
{
}
@@ -179,8 +179,8 @@ TrkSignalHandlerPrivate::~TrkSignalHandlerPrivate()
}
TrkSignalHandler::TrkSignalHandler()
+ : d(new TrkSignalHandlerPrivate())
{
- d = new TrkSignalHandlerPrivate();
}
TrkSignalHandler::~TrkSignalHandler()