summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-09-07 16:36:49 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-09-07 16:36:49 (GMT)
commit415ad7b69d364c41156d35b98790b02667a6671b (patch)
tree759b02134da808773a1d68eecf2eb5c0ff12167c /tools
parent3c18c2a43260a271f8a13e89053eede15d399005 (diff)
parent703d85e8991e2061062f6d7c695cdeb45d9661fd (diff)
downloadQt-415ad7b69d364c41156d35b98790b02667a6671b.zip
Qt-415ad7b69d364c41156d35b98790b02667a6671b.tar.gz
Qt-415ad7b69d364c41156d35b98790b02667a6671b.tar.bz2
Merge branch '4.7' into qmldocs
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/main.cpp3
-rw-r--r--tools/configure/configureapp.cpp18
-rw-r--r--tools/linguist/linguist/mainwindow.cpp2
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
-rw-r--r--tools/qml/deviceorientation.cpp5
-rw-r--r--tools/qml/deviceorientation.h3
-rw-r--r--tools/qml/deviceorientation_maemo5.cpp53
-rw-r--r--tools/qml/deviceorientation_symbian.cpp27
-rw-r--r--tools/qml/main.cpp3
-rw-r--r--tools/qml/qmlruntime.cpp2
10 files changed, 95 insertions, 23 deletions
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 02507ae..bb86bfe 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -316,6 +316,7 @@ int main(int argc, char *argv[])
TRACE_OBJ
QApplication a(argc, argv, useGui(argc, argv));
a.addLibraryPath(a.applicationDirPath() + QLatin1String("/plugins"));
+ setupTranslations();
// Parse arguments.
CmdLineParser cmd(a.arguments());
@@ -419,8 +420,6 @@ int main(int argc, char *argv[])
cachedCollection.setCurrentFilter(cmd.currentFilter());
}
- setupTranslations();
-
/*
* We need to be careful here: The main window has to be deleted before
* the help engine wrapper, which has to be deleted before the
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 09da581..0d0729b 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -381,6 +381,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
dictionary[ "LTCG" ] = "no";
dictionary[ "NATIVE_GESTURES" ] = "yes";
+ dictionary[ "MSVC_MP" ] = "no";
}
Configure::~Configure()
@@ -534,6 +535,13 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-ltcg") {
dictionary[ "LTCG" ] = "no";
}
+ else if (configCmdLine.at(i) == "-mp") {
+ dictionary[ "MSVC_MP" ] = "yes";
+ }
+ else if (configCmdLine.at(i) == "-no-mp") {
+ dictionary[ "MSVC_MP" ] = "no";
+ }
+
#endif
else if (configCmdLine.at(i) == "-platform") {
@@ -1509,6 +1517,10 @@ void Configure::applySpecSpecifics()
dictionary[ "QT3SUPPORT" ] = "no";
dictionary[ "OPENGL" ] = "no";
dictionary[ "OPENSSL" ] = "yes";
+ // We accidently enabled IPv6 for Qt Symbian in 4.6.x. However the underlying OpenC does not fully support IPV6.
+ // Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt
+ // symbian socket engine.
+ dictionary[ "IPV6" ] = "no";
dictionary[ "STL" ] = "yes";
dictionary[ "EXCEPTIONS" ] = "yes";
dictionary[ "RTTI" ] = "yes";
@@ -1848,6 +1860,8 @@ bool Configure::displayHelp()
desc("STYLE_S60" , "yes", "", " s60\n", ' ');
desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7.");
+ desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC");
+ desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)");
/* We do not support -qconfig on Windows yet
@@ -2822,7 +2836,7 @@ void Configure::generateCachefile()
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {
cacheStream << (*var) << endl;
}
- cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl;
+ cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl;
QStringList buildParts;
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
@@ -2885,6 +2899,8 @@ void Configure::generateCachefile()
if (dictionary[ "LTCG" ] == "yes")
configStream << " ltcg";
+ if (dictionary[ "MSVC_MP" ] == "yes")
+ configStream << " msvc_mp";
if (dictionary[ "STL" ] == "yes")
configStream << " stl";
if (dictionary[ "EXCEPTIONS" ] == "yes")
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 7d11823..265df05 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -1030,6 +1030,8 @@ void MainWindow::findAgain()
break;
if (searchItem(m->extraComment()))
break;
+ if (searchItem(m->translatorComment()))
+ break;
m_foundWhere = DataModel::NoLocation;
// did not find the search string in this message
}
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 8d4d27f..ed5ee17 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -171,5 +171,5 @@ HTML.footer = " <!-- /div -->\n" \
" </form>\n" \
" </div>\n" \
" <div id=\"blurpage\">\n" \
- " </div>\n" \
+ " <!--/div -->\n" \
" </div>\n"
diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
index e7c70d5..d3014ad 100644
--- a/tools/qml/deviceorientation.cpp
+++ b/tools/qml/deviceorientation.cpp
@@ -53,6 +53,11 @@ public:
return m_orientation;
}
+ void pauseListening() {
+ }
+ void resumeListening() {
+ }
+
void setOrientation(Orientation o) {
if (o != m_orientation) {
m_orientation = o;
diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h
index 817bfc8..487ebd4 100644
--- a/tools/qml/deviceorientation.h
+++ b/tools/qml/deviceorientation.h
@@ -63,6 +63,9 @@ public:
virtual Orientation orientation() const = 0;
virtual void setOrientation(Orientation) = 0;
+ virtual void pauseListening() = 0;
+ virtual void resumeListening() = 0;
+
static DeviceOrientation *instance();
signals:
diff --git a/tools/qml/deviceorientation_maemo5.cpp b/tools/qml/deviceorientation_maemo5.cpp
index e942579..a324820 100644
--- a/tools/qml/deviceorientation_maemo5.cpp
+++ b/tools/qml/deviceorientation_maemo5.cpp
@@ -50,23 +50,9 @@ class MaemoOrientation : public DeviceOrientation
Q_OBJECT
public:
MaemoOrientation()
- : o(UnknownOrientation)
+ : o(UnknownOrientation), sensorEnabled(false)
{
- // enable the orientation sensor
- QDBusConnection::systemBus().call(
- QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
- MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ));
-
- // query the initial orientation
- QDBusMessage reply = QDBusConnection::systemBus().call(
- QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
- MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET));
- if (reply.type() == QDBusMessage::ErrorMessage) {
- qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage()));
- } else {
- o = toOrientation(reply.arguments().value(0).toString());
- }
-
+ resumeListening();
// connect to the orientation change signal
QDBusConnection::systemBus().connect(QString(), MCE_SIGNAL_PATH, MCE_SIGNAL_IF,
MCE_DEVICE_ORIENTATION_SIG,
@@ -91,6 +77,40 @@ public:
{
}
+ void pauseListening() {
+ if (sensorEnabled) {
+ // disable the orientation sensor
+ QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ));
+ sensorEnabled = false;
+ }
+ }
+
+ void resumeListening() {
+ if (!sensorEnabled) {
+ // enable the orientation sensor
+ QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ));
+
+ QDBusMessage reply = QDBusConnection::systemBus().call(
+ QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
+ MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET));
+
+ if (reply.type() == QDBusMessage::ErrorMessage) {
+ qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage()));
+ } else {
+ Orientation orientation = toOrientation(reply.arguments().value(0).toString());
+ if (o != orientation) {
+ o = orientation;
+ emit orientationChanged();
+ }
+ sensorEnabled = true;
+ }
+ }
+ }
+
private Q_SLOTS:
void deviceOrientationChanged(const QString &newOrientation)
{
@@ -116,6 +136,7 @@ private:
private:
Orientation o;
+ bool sensorEnabled;
};
DeviceOrientation* DeviceOrientation::instance()
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp
index 307c417..7710cf9 100644
--- a/tools/qml/deviceorientation_symbian.cpp
+++ b/tools/qml/deviceorientation_symbian.cpp
@@ -52,7 +52,7 @@ class SymbianOrientation : public DeviceOrientation, public MSensrvDataListener
Q_OBJECT
public:
SymbianOrientation()
- : DeviceOrientation(), m_current(UnknownOrientation), m_sensorChannel(0)
+ : DeviceOrientation(), m_current(UnknownOrientation), m_sensorChannel(0), m_channelOpen(false)
{
TRAP_IGNORE(initL());
if (!m_sensorChannel)
@@ -84,6 +84,7 @@ public:
TRAP(error, m_sensorChannel->OpenChannelL());
if (!error) {
TRAP(error, m_sensorChannel->StartDataListeningL(this, 1, 1, 0));
+ m_channelOpen = true;
break;
}
if (error) {
@@ -107,6 +108,30 @@ public:
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)
{
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 7421b5e..78cd64d 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -441,6 +441,7 @@ static QDeclarativeViewer *createViewer()
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
+ viewer->setUseGL(opts.useGL);
if (!opts.scriptopts.isEmpty()) {
viewer->setScriptOptions(opts.scriptOptions);
@@ -492,8 +493,6 @@ void showViewer(QDeclarativeViewer *viewer)
viewer->showMaximized();
else
viewer->show();
-
- viewer->setUseGL(opts.useGL);
viewer->raise();
}
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 321b7fd..b38e80d 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1208,8 +1208,10 @@ bool QDeclarativeViewer::event(QEvent *event)
{
if (event->type() == QEvent::WindowActivate) {
Runtime::instance()->setActiveWindow(true);
+ DeviceOrientation::instance()->resumeListening();
} else if (event->type() == QEvent::WindowDeactivate) {
Runtime::instance()->setActiveWindow(false);
+ DeviceOrientation::instance()->pauseListening();
}
return QWidget::event(event);
}