summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.exebin1316864 -> 1317888 bytes
-rw-r--r--demos/qtdemo/MagicAnim.qml60
-rw-r--r--demos/qtdemo/colors.cpp2
-rw-r--r--demos/qtdemo/mainwindow.cpp12
-rw-r--r--demos/qtdemo/menumanager.cpp35
-rw-r--r--demos/qtdemo/menumanager.h3
-rw-r--r--demos/qtdemo/qmlShell.qml177
-rw-r--r--demos/qtdemo/qtdemo.pro3
-rw-r--r--demos/qtdemo/qtdemo.qrc1
-rw-r--r--mkspecs/features/incredibuild_xge.prf6
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-hangul.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h36
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp3
-rw-r--r--src/declarative/QmlChanges.txt3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp59
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h11
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp6
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp1
-rw-r--r--src/gui/kernel/qapplication.cpp3
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/styles/qgtkstyle_p.cpp2
-rw-r--r--src/gui/text/qstatictext.cpp163
-rw-r--r--src/gui/text/qstatictext_p.h19
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp21
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qpaintengine_opengl.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp25
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h2
-rw-r--r--src/script/api/qscriptcontext.cpp1
-rw-r--r--src/src.pro16
-rw-r--r--src/tools/tools.pro16
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp13
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp29
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp45
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default_p.h3
-rw-r--r--tools/configure/configureapp.cpp104
-rw-r--r--tools/configure/configureapp.h3
46 files changed, 516 insertions, 428 deletions
diff --git a/configure.exe b/configure.exe
index a19f515..1fddc81 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/qtdemo/MagicAnim.qml b/demos/qtdemo/MagicAnim.qml
deleted file mode 100644
index 7ac3e1c..0000000
--- a/demos/qtdemo/MagicAnim.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** 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
-** 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.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import Qt 4.7
-
-//Emulates the in animation of the menu elements
-SequentialAnimation{
- id: main;
- property Item target
- property int from: 0
- property int to: 100
- property int duration: 1000
- property string properties: "y"
- PauseAnimation { duration: main.duration*0.20 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.from; to: main.to + 40; duration: main.duration*0.30 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.to + 40; to: main.to; duration: main.duration*0.10 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.to; to: main.to + 20; duration: main.duration*0.10 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.to + 20; to: main.to; duration: main.duration*0.10 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.to; to: main.to + 8; duration: main.duration*0.10 }
- NumberAnimation { target: main.target; properties: main.properties; from: main.to + 8; to: main.to; duration: main.duration*0.10 }
-}
-
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index 07cf162..b352e3d 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -270,7 +270,7 @@ void Colors::parseArgs(int argc, char *argv[])
else if (s.startsWith("-h") || s.startsWith("-help")){
QMessageBox::warning(0, "Arguments",
QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
- + "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ + "[-animations[0|1]] [-no-blending] [-use-blur] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ "[-use-window-mask] [-no-rescale] "
+ "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
+ "[-animation-speed<float>] [-fps<int>] "
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 45ec9a6..753014a 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -266,7 +266,7 @@ void MainWindow::setupSceneItems()
{
if (Colors::showFps){
this->fpsLabel = new DemoTextItem(QString("FPS: --"), Colors::buttonFont(), Qt::white, -1, this->scene, 0, DemoTextItem::DYNAMIC_TEXT);
- this->fpsLabel->setZValue(100);
+ this->fpsLabel->setZValue(1000);
this->fpsLabel->setPos(Colors::stageStartX, 600 - QFontMetricsF(Colors::buttonFont()).height() - 5);
}
@@ -311,15 +311,9 @@ void MainWindow::checkAdapt()
}
//Note: Because we don't adapt later in the program, if blur makes FPS plummet then we won't catch it
- if (!Colors::noBlur && MenuManager::instance()->mainSceneBlur && this->mainSceneRoot){
+ if (!Colors::noBlur && MenuManager::instance()->declarativeEngine && this->mainSceneRoot){
Colors::noBlur = true;
- this->mainSceneRoot->setGraphicsEffect(0);
- MenuManager::instance()->mainSceneBlur = 0;
- if(MenuManager::instance()->qmlRoot){
- MenuManager::instance()->qmlRoot->setGraphicsEffect(0);
- MenuManager::instance()->declarativeEngine->rootContext()->setContextProperty("realBlur", 0);
- }
- MenuManager::instance()->qmlShadow = 0;
+ MenuManager::instance()->declarativeEngine->rootContext()->setContextProperty("useBlur", false);
if (Colors::verbose)
qDebug() << "- benchmark adaption: removed blur (fps < 30)";
}
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
index 9eb5664..9e2ba6b 100644
--- a/demos/qtdemo/menumanager.cpp
+++ b/demos/qtdemo/menumanager.cpp
@@ -59,8 +59,6 @@ MenuManager::MenuManager()
this->tickerInAnim = 0;
this->upButton = 0;
this->downButton = 0;
- this->mainSceneBlur = 0;
- this->qmlShadow = 0;
this->helpEngine = 0;
this->score = new Score();
this->currentMenu = QLatin1String("[no menu visible]");
@@ -381,8 +379,14 @@ void MenuManager::launchQmlExample(const QString &name)
}
}
+ QPainter painter(qmlBgImage);
+ this->window->fpsLabel->setOpacity(0);
+ this->window->render(&painter);
+ this->window->fpsLabel->setOpacity(1.0);
+ Qt::ImageConversionFlags convFlags = Qt::AvoidDither | Qt::NoOpaqueDetection;
+ this->declarativeEngine->rootContext()->setContextProperty("bgAppPixmap", QVariant(QPixmap::fromImage(*qmlBgImage, convFlags)));
qmlRoot->setProperty("show", QVariant(true));
- qmlRoot->setProperty("source", file.fileName());
+ qmlRoot->setProperty("qmlFile", QUrl::fromLocalFile(file.fileName()));
}
void MenuManager::exampleFinished()
@@ -401,15 +405,6 @@ void MenuManager::init(MainWindow *window)
{
this->window = window;
- //Create blur for later use
- // Note that blur is DISABLED by default because it's too slow, even on Desktop machines
- if(!Colors::noBlur){
- this->mainSceneBlur = new QGraphicsBlurEffect(this);
- this->mainSceneBlur->setEnabled(false);
- this->mainSceneBlur->setBlurRadius(0);
- this->window->mainSceneRoot->setGraphicsEffect(mainSceneBlur);
- }
-
// Create div:
this->createTicker();
this->createUpnDownButtons();
@@ -439,8 +434,15 @@ void MenuManager::init(MainWindow *window)
// Create QML Loader
qmlRegisterType<QGraphicsBlurEffect>("Effects", 1, 0, "Blur");
+ qmlRegisterType<QGraphicsDropShadowEffect>("Effects", 1, 0, "DropShadow");
declarativeEngine = new QDeclarativeEngine(this);
- MenuManager::instance()->declarativeEngine->rootContext()->setContextProperty("realBlur", this->mainSceneBlur);
+
+ // Note that we paint the background into a static image for a theorized performance improvement when blurring
+ // It has not yet been determined what, if any, speed up this gives (but is left in 'cause the QML expects it now)
+ this->qmlBgImage = new QImage(window->sceneRect().size().toSize(), QImage::Format_ARGB32);
+ this->qmlBgImage->fill(0);
+ declarativeEngine->rootContext()->setContextProperty("useBlur", !Colors::noBlur);
+ declarativeEngine->rootContext()->setContextProperty("bgAppPixmap", QVariant(QPixmap::fromImage(*qmlBgImage)));
QDeclarativeComponent component(declarativeEngine, QUrl("qrc:qml/qmlShell.qml"), this);
qmlRoot = 0;
if(component.isReady())
@@ -450,14 +452,9 @@ void MenuManager::init(MainWindow *window)
if(qmlRoot){
qmlRoot->setHeight(this->window->scene->sceneRect().height());
qmlRoot->setWidth(this->window->scene->sceneRect().width());
- qmlRoot->setZValue(1000);//Above other items
+ qmlRoot->setZValue(101);//Above other items
qmlRoot->setCursor(Qt::ArrowCursor);
window->scene->addItem(qmlRoot);
- if(!Colors::noBlur){
- qmlShadow = new QGraphicsDropShadowEffect(this);
- qmlShadow->setOffset(4);
- qmlRoot->setGraphicsEffect(qmlShadow);
- }
//Note that QML adds key handling to the app.
window->viewport()->setFocusPolicy(Qt::NoFocus);//Correct keyboard focus handling
diff --git a/demos/qtdemo/menumanager.h b/demos/qtdemo/menumanager.h
index 3524081..e90e02c 100644
--- a/demos/qtdemo/menumanager.h
+++ b/demos/qtdemo/menumanager.h
@@ -85,8 +85,7 @@ public:
QDeclarativeEngine* declarativeEngine;
QDeclarativeItem *qmlRoot;
- QGraphicsBlurEffect *mainSceneBlur;
- QGraphicsDropShadowEffect *qmlShadow;
+ QImage *qmlBgImage;
private slots:
void exampleFinished();
diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml
index eb155c4..b9021e8 100644
--- a/demos/qtdemo/qmlShell.qml
+++ b/demos/qtdemo/qmlShell.qml
@@ -42,117 +42,132 @@
import Qt 4.7
import Effects 1.0
+/* Vars exposed from C++
+ pixmap bgAppPixmap
+ bool useBlur (to turn on, pass -use-blur on the cmd line. Off by default 'cause it's too slow)
+*/
Item {
id: main
- property alias source: loader.source
+ //height and width set by program to fill window
+ //below properties are sometimes set from C++
+ property url qmlFile: ''
property bool show: false
- x: 0
- y: -500 //height and width set by program
- opacity: 0
- property QtObject blurEffect: realBlur == null ? dummyBlur : realBlur //Is there a better way to lose those error messages?
- Loader{//Automatic FocusScope
- focus: true
- clip: true
- id: loader //source set by program
- anchors.centerIn: parent
- onStatusChanged: if(status == Loader.Ready) {
+ Image{
+ id: bg
+ opacity: 0
+ anchors.fill: parent
+ z: -1
+ pixmap: bgAppPixmap
+ effect: Blur { id: blurEffect; enabled: useBlur; blurRadius: 8;}
+ }
+
+ Item{ id:embeddedViewer
+ width: parent.width
+ height: parent.height
+ opacity: 0;
+ z: 10
+ Loader{
+ id: loader
+ z: 10
+ focus: true //Automatic FocusScope
+ clip: true
+ source: qmlFile
+ anchors.centerIn: parent
+ onStatusChanged: if(status == Loader.Ready) {
if(loader.item.width > 640)
loader.item.width = 640;
if(loader.item.height > 480)
loader.item.height = 480;
- }
+ }
- }
- Rectangle{
- z: -1
- anchors.fill: loader.status == Loader.Ready ? loader : errorTxt
- anchors.margins: -10
- radius: 12
- smooth: true
- gradient: Gradient{
- GradientStop{ position: 0.0; color: "#14FFFFFF" }
- GradientStop{ position: 1.0; color: "#5AFFFFFF" }
}
- MouseArea{
- anchors.fill: parent
- onClicked: loader.focus=true;/* and don't propogate to the 'exit' area*/
+ Rectangle{ id: frame
+ z: 9
+ anchors.fill: loader.status == Loader.Ready ? loader : errorTxt
+ anchors.margins: -8
+ radius: 4
+ smooth: true
+ border.color: "#88aaaaaa"
+ gradient: Gradient{
+ GradientStop{ position: 0.0; color: "#14FFFFFF" }
+ GradientStop{ position: 1.0; color: "#5AFFFFFF" }
+ }
+ MouseArea{
+ anchors.fill: parent
+ onClicked: loader.focus=true;/* and don't propogate to the 'exit' area*/
+ }
+
+ Rectangle{ id: innerFrame
+ anchors.margins: 7
+ anchors.bottomMargin: 8
+ anchors.rightMargin: 8
+ color: "black"
+ border.color: "#44000000"
+ anchors.fill:parent
+ }
+
+ effect: DropShadow {
+ enabled: useBlur;
+ blurRadius: 9;
+ color: "#88000000";
+ xOffset:0
+ yOffset:0
+ }
}
+ Text{
+ id: errorTxt
+ z: 10
+ anchors.centerIn: parent
+ color: 'white'
+ smooth: true
+ visible: loader.status == Loader.Error
+ textFormat: Text.RichText
+ //Note that if loader is Error, it is because the file was found but there was an error creating the component
+ //This means either we have a bug in our demos, or the required modules (which ship with Qt) did not deploy correctly
+ text: "The example has failed to load.<br />If you installed Qt's QML modules this is a bug!<br />"
+ + 'Report it at <a href="http://bugreports.qt.nokia.com">http://bugreports.qt.nokia.com</a>';
+ onLinkActivated: Qt.openUrlExternally(link);
+ }
+ }
+ Rectangle{ id: blackout //Maybe use a colorize effect instead?
+ z: 8
+ anchors.fill: parent
+ color: "#000000"
+ opacity: 0
}
-
MouseArea{
- z: -2
- hoverEnabled: true //To steal from the buttons
+ z: 8
+ enabled: main.show
+ hoverEnabled: true //To steal focus from the buttons
anchors.fill: parent
onClicked: main.show=false;
}
- Text{
- id: errorTxt
- anchors.centerIn: parent
- color: 'white'
- smooth: true
- visible: loader.status == Loader.Error
- textFormat: Text.RichText //includes link for bugreport
- //Note that if loader is Error, it is because the file was found but there was an error creating the component
- //This means either we have a bug in our demos, or the required modules (which ship with Qt) did not deploy correctly
- text: 'The example has failed to load. This is a bug!<br />'
- +'Report it at <a href="http://bugreports.qt.nokia.com">http://bugreports.qt.nokia.com</a>';
- onLinkActivated: Qt.openUrlExternally(link);
- }
-
-
states: [
State {
name: "show"
when: show == true
PropertyChanges {
- target: main
+ target: embeddedViewer
+ opacity: 1
+ }
+ PropertyChanges {
+ target: bg
opacity: 1
- y: 0
}
PropertyChanges {
- target: blurEffect
- enabled: true
- blurRadius: 8
- blurHints: Blur.AnimationHint | Blur.PerformanceHint
+ target: blackout
+ opacity: 0.5
}
}
]
- MagicAnim{ id: magicAnim; target: main; from: -500; to: 0 }
- transitions: [
- Transition { from: ""; to: "show"
- SequentialAnimation{
- ScriptAction{ script: magicAnim.start() }
- NumberAnimation{ properties: "opacity,blurRadius"; easing.type: Easing.OutCubic; duration: 1000}
- PropertyAnimation{ target: main; property: "y"}
- }
-
- },
- Transition { from: "show"; to: "" //Addtionally, unload the item
+ transitions: [//Should not be too long, because the component has already started running
+ Transition { from: ''; to: "show"; reversible: true
SequentialAnimation{
- NumberAnimation{ properties: "y,opacity,blurRadius";duration: 500 }
- ScriptAction{ script: loader.source = ''; }
+ PropertyAction { target: bg; property: useBlur?"y":"opacity";}//fade in blurred background only if blurred
+ NumberAnimation{ properties: "opacity"; easing.type: Easing.InQuad; duration: 500}
}
- /*Attempt to copy the exeunt animation. Looks bad
- SequentialAnimation{
- ParallelAnimation{
- NumberAnimation{ properties: "opacity,blurRadius"; easing.type: Easing.InCubic; duration: 1000 }
- SequentialAnimation{
- NumberAnimation{ target: main; property: 'y'; to: 3.2*height/5; duration: 500}
- ParallelAnimation{
- NumberAnimation{ target: main; property: 'y'; to: 3.0*height/5; duration: 100}
- NumberAnimation{ target: main; property: 'x'; to: 3.0*width/5; duration: 100}
- }
- NumberAnimation{ target: main; property: 'x'; to: 700; duration: 400}
- }
- }
- ScriptAction{ script: loader.source = ''; }
- PropertyAction{ properties: "x,y";}
- }
- */
}
]
- Item{ Blur{id: dummyBlur } }
-
}
diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro
index 5e64e1c..4d4177e 100644
--- a/demos/qtdemo/qtdemo.pro
+++ b/demos/qtdemo/qtdemo.pro
@@ -75,5 +75,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES qtdemo.pro images xml *.
sources.path = $$[QT_INSTALL_DEMOS]/qtdemo
OTHER_FILES += \
- qmlShell.qml \
- MagicAnim.qml
+ qmlShell.qml
diff --git a/demos/qtdemo/qtdemo.qrc b/demos/qtdemo/qtdemo.qrc
index 7682ab5..c18420f 100644
--- a/demos/qtdemo/qtdemo.qrc
+++ b/demos/qtdemo/qtdemo.qrc
@@ -7,6 +7,5 @@
</qresource>
<qresource prefix="/qml" lang="qml">
<file>qmlShell.qml</file>
- <file>MagicAnim.qml</file>
</qresource>
</RCC>
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
index b8ca571..a81a0cc 100644
--- a/mkspecs/features/incredibuild_xge.prf
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -1,11 +1,11 @@
contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") {
- EOC = \$\$escape_expand(\\\\n\\\\t)
+ EOC = $$escape_expand(\\n\\t)
# The VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
- win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\\\\r\\\\h)
+ win32-msvc2*|wince*msvc*: EOC = $$escape_expand(\\r\\h)
for(xge, INCREDIBUILD_XGE) {
- eval($${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands))
+ $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands)
}
}
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 4c4f5bc..d6b3e09 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -972,7 +972,7 @@ MakefileGenerator::writePrlFile(QTextStream &t)
libs << "QMAKE_LIBS_PRIVATE";
t << "QMAKE_PRL_LIBS = ";
for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
- t << project->values((*it)).join(" ") << " ";
+ t << project->values((*it)).join(" ").replace('\\', "\\\\") << " ";
t << endl;
}
}
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
index a819dac..6f89ed6 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
@@ -130,7 +130,7 @@ static int hangul_nextSyllableBoundary(const HB_UChar16 *s, int start, int end)
static const HB_OpenTypeFeature hangul_features [] = {
{ HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
{ HB_MAKE_TAG('l', 'j', 'm', 'o'), CcmpProperty },
- { HB_MAKE_TAG('j', 'j', 'm', 'o'), CcmpProperty },
+ { HB_MAKE_TAG('v', 'j', 'm', 'o'), CcmpProperty },
{ HB_MAKE_TAG('t', 'j', 'm', 'o'), CcmpProperty },
{ 0, 0 }
};
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index f7c7714..470e27b 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -34,6 +34,18 @@
HB_BEGIN_HEADER
+/*
+ using anything else than signed or unsigned for bitfields in C is non standard,
+ but accepted by almost all compilers. And it gives a significant reduction in
+ memory consumption as HB_CharAttributes and HB_GlyphAttributes will not have
+ a 4 byte alignment
+*/
+#ifdef __xlC__
+typedef unsigned hb_bitfield;
+#else
+typedef hb_uint8 hb_bitfield;
+#endif
+
typedef enum {
HB_Script_Common,
HB_Script_Greek,
@@ -123,12 +135,12 @@ typedef enum {
typedef struct {
- /*HB_LineBreakType*/ unsigned lineBreakType :2;
- /*HB_Bool*/ unsigned whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */
- /*HB_Bool*/ unsigned charStop :1; /* Valid cursor position (for left/right arrow) */
- /*HB_Bool*/ unsigned wordBoundary :1;
- /*HB_Bool*/ unsigned sentenceBoundary :1;
- unsigned unused :2;
+ /*HB_LineBreakType*/ hb_bitfield lineBreakType :2;
+ /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */
+ /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */
+ /*HB_Bool*/ hb_bitfield wordBoundary :1;
+ /*HB_Bool*/ hb_bitfield sentenceBoundary :1;
+ hb_bitfield unused :2;
} HB_CharAttributes;
void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength,
@@ -181,12 +193,12 @@ typedef enum {
* it like that. If this is a problem please tell Trolltech :)
*/
typedef struct {
- unsigned justification :4; /* Justification class */
- unsigned clusterStart :1; /* First glyph of representation of cluster */
- unsigned mark :1; /* needs to be positioned around base char */
- unsigned zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
- unsigned dontPrint :1;
- unsigned combiningClass :8;
+ hb_bitfield justification :4; /* Justification class */
+ hb_bitfield clusterStart :1; /* First glyph of representation of cluster */
+ hb_bitfield mark :1; /* needs to be positioned around base char */
+ hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
+ hb_bitfield dontPrint :1;
+ hb_bitfield combiningClass :8;
} HB_GlyphAttributes;
typedef struct HB_FaceRec_ {
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index 1e674af..458bb2a 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -159,8 +159,9 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangEnglish_Prc, "en_CN" }, // 159 ### Not supported by CLDR
{ ELangEnglish_Japan, "en_JP"}, // 160 ### Not supported by CLDR
{ ELangEnglish_Thailand, "en_TH" }, // 161 ### Not supported by CLDR
- { ELangMalay_Apac, "ms" } // 326
+ { ELangMalay_Apac, "ms" }, // 326
#endif
+ { 327/*ELangIndonesian_Apac*/,"id_ID" } // 327 - appeared in Symbian^3
};
/*!
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 3eed8d6..142920c 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,6 +1,9 @@
=============================================================================
The changes below are pre Qt 4.7.0 RC
+TextInput and TextEdit:
+ - showInputPanelOnFocus property added
+ - openSoftwareInputPanel() and closeSoftwareInputPanel() functions added
Flickable:
- overShoot is replaced by boundsBehavior enumeration
- flickingHorizontally and flickingVertically properties added
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 1dde510..10dc0f8 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -160,6 +160,7 @@ void QDeclarativeFlickablePrivate::init()
q->setFiltersChildEvents(true);
QDeclarativeItemPrivate *viewportPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(viewport));
viewportPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ lastPosTime.invalidate();
}
/*
@@ -656,7 +657,7 @@ void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEven
void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_Q(QDeclarativeFlickable);
- if (!interactive || lastPosTime.isNull())
+ if (!interactive || !lastPosTime.isValid())
return;
bool rejectY = false;
bool rejectX = false;
@@ -752,7 +753,7 @@ void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEv
stealMouse = false;
q->setKeepMouseGrab(false);
pressed = false;
- if (lastPosTime.isNull())
+ if (!lastPosTime.isValid())
return;
if (QDeclarativeItemPrivate::elapsed(lastPosTime) > 100) {
@@ -780,7 +781,7 @@ void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEv
fixupX();
}
- lastPosTime = QTime();
+ lastPosTime.invalidate();
if (!timeline.isActive())
q->movementEnding();
@@ -1218,8 +1219,8 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
}
return stealThisEvent || d->delayedPressEvent;
- } else if (!d->lastPosTime.isNull()) {
- d->lastPosTime = QTime();
+ } else if (d->lastPosTime.isValid()) {
+ d->lastPosTime.invalidate();
}
if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) {
d->clearDelayedPress();
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index b467ed2..66d2678 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -140,13 +140,13 @@ public:
bool stealMouse : 1;
bool pressed : 1;
bool interactive : 1;
- QTime lastPosTime;
+ QElapsedTimer lastPosTime;
QPointF lastPos;
QPointF pressPos;
- QTime pressTime;
+ QElapsedTimer pressTime;
qreal deceleration;
qreal maxVelocity;
- QTime velocityTime;
+ QElapsedTimer velocityTime;
QPointF lastFlickablePosition;
qreal reportedVelocitySmoothing;
QGraphicsSceneMouseEvent *delayedPressEvent;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 2841ac3..7bd08ce 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -3145,41 +3145,56 @@ QDebug operator<<(QDebug debug, QDeclarativeItem *item)
return debug;
}
-int QDeclarativeItemPrivate::consistentTime = -1;
-void QDeclarativeItemPrivate::setConsistentTime(int t)
+qint64 QDeclarativeItemPrivate::consistentTime = -1;
+void QDeclarativeItemPrivate::setConsistentTime(qint64 t)
{
consistentTime = t;
}
-QTime QDeclarativeItemPrivate::currentTime()
+class QElapsedTimerConsistentTimeHack
{
- if (consistentTime == -1)
- return QTime::currentTime();
- else
- return QTime(0, 0).addMSecs(consistentTime);
-}
+public:
+ void start() {
+ t1 = QDeclarativeItemPrivate::consistentTime;
+ t2 = 0;
+ }
+ qint64 elapsed() {
+ return QDeclarativeItemPrivate::consistentTime - t1;
+ }
+ qint64 restart() {
+ qint64 val = QDeclarativeItemPrivate::consistentTime - t1;
+ t1 = QDeclarativeItemPrivate::consistentTime;
+ t2 = 0;
+ return val;
+ }
-void QDeclarativeItemPrivate::start(QTime &t)
+private:
+ qint64 t1;
+ qint64 t2;
+};
+
+void QDeclarativeItemPrivate::start(QElapsedTimer &t)
{
- t = currentTime();
+ if (QDeclarativeItemPrivate::consistentTime == -1)
+ t.start();
+ else
+ ((QElapsedTimerConsistentTimeHack*)&t)->start();
}
-int QDeclarativeItemPrivate::elapsed(QTime &t)
+qint64 QDeclarativeItemPrivate::elapsed(QElapsedTimer &t)
{
- int n = t.msecsTo(currentTime());
- if (n < 0) // passed midnight
- n += 86400 * 1000;
- return n;
+ if (QDeclarativeItemPrivate::consistentTime == -1)
+ return t.elapsed();
+ else
+ return ((QElapsedTimerConsistentTimeHack*)&t)->elapsed();
}
-int QDeclarativeItemPrivate::restart(QTime &t)
+qint64 QDeclarativeItemPrivate::restart(QElapsedTimer &t)
{
- QTime time = currentTime();
- int n = t.msecsTo(time);
- if (n < 0) // passed midnight
- n += 86400*1000;
- t = time;
- return n;
+ if (QDeclarativeItemPrivate::consistentTime == -1)
+ return t.restart();
+ else
+ return ((QElapsedTimerConsistentTimeHack*)&t)->restart();
}
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 15b34f0..184d6f1 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -305,12 +305,11 @@ public:
virtual void focusChanged(bool);
- static int consistentTime;
- static QTime currentTime();
- static void setConsistentTime(int t);
- static void start(QTime &);
- static int elapsed(QTime &);
- static int restart(QTime &);
+ static qint64 consistentTime;
+ static void setConsistentTime(qint64 t);
+ static void start(QElapsedTimer &);
+ static qint64 elapsed(QElapsedTimer &);
+ static qint64 restart(QElapsedTimer &);
};
/*
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 3a69f44..448ec06 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -948,7 +948,7 @@ void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativePathView);
- if (!d->interactive || d->lastPosTime.isNull())
+ if (!d->interactive || !d->lastPosTime.isValid())
return;
if (!d->stealMouse) {
@@ -982,7 +982,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
Q_D(QDeclarativePathView);
d->stealMouse = false;
setKeepMouseGrab(false);
- if (!d->interactive || d->lastPosTime.isNull())
+ if (!d->interactive || !d->lastPosTime.isValid())
return;
qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.;
@@ -1017,7 +1017,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
d->fixOffset();
}
- d->lastPosTime = QTime();
+ d->lastPosTime.invalidate();
ungrabMouse();
}
@@ -1059,8 +1059,8 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
grabMouse();
return d->stealMouse;
- } else if (!d->lastPosTime.isNull()) {
- d->lastPosTime = QTime();
+ } else if (d->lastPosTime.isValid()) {
+ d->lastPosTime.invalidate();
}
return false;
}
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
index 3abb2f4..a0d2610 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
@@ -97,6 +97,7 @@ public:
q->setFlag(QGraphicsItem::ItemIsFocusScope);
q->setFiltersChildEvents(true);
q->connect(&tl, SIGNAL(updated()), q, SLOT(ticked()));
+ lastPosTime.invalidate();
}
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
@@ -154,7 +155,7 @@ public:
bool autoHighlight : 1;
bool highlightUp : 1;
bool layoutScheduled : 1;
- QTime lastPosTime;
+ QElapsedTimer lastPosTime;
QPointF lastPos;
qreal dragMargin;
qreal deceleration;
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 4f7a722..301ca00 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -116,6 +116,10 @@ void QDeclarativeGradientStop::updateGradient()
\snippet doc/src/snippets/declarative/gradient.qml code
+ Note that this item is not a visual representation of a gradient. To display a
+ gradient use a visual item (like rectangle) which supports having a gradient set
+ on it for display.
+
\sa GradientStop
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 167db77..9ccb8d2 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -1335,7 +1335,7 @@ void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool showOnFocus)
void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextEdit);
- if (d->showInputPanelOnFocus && !isReadOnly()) {
+ if (d->showInputPanelOnFocus && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
openSoftwareInputPanel();
}
QDeclarativePaintedItem::focusInEvent(event);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 18e3595..9c70ea9 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1282,7 +1282,7 @@ void QDeclarativeTextInput::setShowInputPanelOnFocus(bool showOnFocus)
void QDeclarativeTextInput::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextInput);
- if (d->showInputPanelOnFocus && !isReadOnly()) {
+ if (d->showInputPanelOnFocus && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
openSoftwareInputPanel();
}
QDeclarativePaintedItem::focusInEvent(event);
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index db6c4c5..36d21a6 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1275,14 +1275,14 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
QTransform matrix = childd->transformToParent();
if (x)
matrix *= *x;
- *rect |= matrix.mapRect(child->boundingRect());
+ *rect |= matrix.mapRect(child->d_ptr->effectiveBoundingRect());
if (!childd->children.isEmpty())
childd->childrenBoundingRectHelper(&matrix, rect);
} else {
if (x)
- *rect |= x->mapRect(child->boundingRect());
+ *rect |= x->mapRect(child->d_ptr->effectiveBoundingRect());
else
- *rect |= child->boundingRect();
+ *rect |= child->d_ptr->effectiveBoundingRect();
if (!childd->children.isEmpty())
childd->childrenBoundingRectHelper(x, rect);
}
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index d5f6fd2..9bbfc23 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -667,7 +667,6 @@ void QItemDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &o
{
Q_D(const QItemDelegate);
- QPen pen = painter->pen();
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 57c4c99..0d11b27 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -666,7 +666,8 @@ void QApplicationPrivate::process_cmdline()
\o -geometry \e geometry, sets the client geometry of the first window
that is shown.
\o -fn or \c -font \e font, defines the application font. The font
- should be specified using an X logical font description.
+ should be specified using an X logical font description. Note that
+ this option is ignored when Qt is built with fontconfig support enabled.
\o -bg or \c -background \e color, sets the default background color
and an application palette (light and dark shades are calculated).
\o -fg or \c -foreground \e color, sets the default foreground color.
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 6c8d561..9d6dc9a 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -325,6 +325,7 @@ void QGtkStyle::polish(QApplication *app)
qt_filedialog_save_filename_hook = &QGtkStylePrivate::saveFilename;
qt_filedialog_open_filenames_hook = &QGtkStylePrivate::openFilenames;
qt_filedialog_existing_directory_hook = &QGtkStylePrivate::openDirectory;
+ qApp->installEventFilter(&d->filter);
}
}
}
@@ -345,6 +346,7 @@ void QGtkStyle::unpolish(QApplication *app)
qt_filedialog_save_filename_hook = 0;
qt_filedialog_open_filenames_hook = 0;
qt_filedialog_existing_directory_hook = 0;
+ qApp->removeEventFilter(&d->filter);
}
}
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp
index 3c6a1ef..4ed0fab 100644
--- a/src/gui/styles/qgtkstyle_p.cpp
+++ b/src/gui/styles/qgtkstyle_p.cpp
@@ -285,8 +285,6 @@ void QGtkStylePrivate::init()
{
resolveGtk();
initGtkWidgets();
- if (isThemeAvailable())
- qApp->installEventFilter(&filter);
}
GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path)
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index c7817c6..84c1d96 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -363,23 +363,24 @@ QSizeF QStaticText::size() const
}
QStaticTextPrivate::QStaticTextPrivate()
- : textWidth(-1.0), items(0), itemCount(0), glyphPool(0), positionPool(0),
+ : textWidth(-1.0), items(0), itemCount(0), glyphPool(0), positionPool(0), charPool(0),
needsRelayout(true), useBackendOptimizations(false), textFormat(Qt::AutoText)
{
}
QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
: text(other.text), font(other.font), textWidth(other.textWidth), matrix(other.matrix),
- items(0), itemCount(0), glyphPool(0), positionPool(0), needsRelayout(true),
+ items(0), itemCount(0), glyphPool(0), positionPool(0), charPool(0), needsRelayout(true),
useBackendOptimizations(other.useBackendOptimizations), textFormat(other.textFormat)
{
}
QStaticTextPrivate::~QStaticTextPrivate()
{
- delete[] items;
+ delete[] items;
delete[] glyphPool;
delete[] positionPool;
+ delete[] charPool;
}
QStaticTextPrivate *QStaticTextPrivate::get(const QStaticText *q)
@@ -395,15 +396,8 @@ namespace {
class DrawTextItemRecorder: public QPaintEngine
{
public:
- DrawTextItemRecorder(int expectedItemCount, QStaticTextItem *items,
- int expectedGlyphCount, QFixedPoint *positionPool, glyph_t *glyphPool)
- : m_items(items),
- m_itemCount(0), m_glyphCount(0),
- m_expectedItemCount(expectedItemCount),
- m_expectedGlyphCount(expectedGlyphCount),
- m_glyphPool(glyphPool),
- m_positionPool(positionPool),
- m_dirtyPen(false)
+ DrawTextItemRecorder(bool useBackendOptimizations, int numChars)
+ : m_dirtyPen(false), m_useBackendOptimizations(useBackendOptimizations)
{
}
@@ -415,26 +409,19 @@ namespace {
virtual void drawTextItem(const QPointF &position, const QTextItem &textItem)
{
- const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
-
- m_itemCount++;
- m_glyphCount += ti.glyphs.numGlyphs;
- if (m_items == 0)
- return;
-
- Q_ASSERT(m_itemCount <= m_expectedItemCount);
- Q_ASSERT(m_glyphCount <= m_expectedGlyphCount);
-
- QStaticTextItem *currentItem = (m_items + (m_itemCount - 1));
- currentItem->fontEngine = ti.fontEngine;
- currentItem->font = ti.font();
- currentItem->chars = ti.chars;
- currentItem->numChars = ti.num_chars;
- currentItem->numGlyphs = ti.glyphs.numGlyphs;
- currentItem->glyphs = m_glyphPool;
- currentItem->glyphPositions = m_positionPool;
+ const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
+
+ QStaticTextItem currentItem;
+ currentItem.fontEngine = ti.fontEngine;
+ currentItem.font = ti.font();
+ currentItem.charOffset = m_chars.size();
+ currentItem.numChars = ti.num_chars;
+ currentItem.numGlyphs = ti.glyphs.numGlyphs;
+ currentItem.glyphOffset = m_glyphs.size(); // Store offset into glyph pool
+ currentItem.positionOffset = m_glyphs.size(); // Offset into position pool
+ currentItem.useBackendOptimizations = m_useBackendOptimizations;
if (m_dirtyPen)
- currentItem->color = state->pen().color();
+ currentItem.color = state->pen().color();
QTransform matrix = state->transform();
matrix.translate(position.x(), position.y());
@@ -447,13 +434,21 @@ namespace {
Q_ASSERT(size == ti.glyphs.numGlyphs);
Q_ASSERT(size == positions.size());
- memmove(currentItem->glyphs, glyphs.constData(), sizeof(glyph_t) * size);
- memmove(currentItem->glyphPositions, positions.constData(), sizeof(QFixedPoint) * size);
+ m_glyphs.resize(m_glyphs.size() + size);
+ m_positions.resize(m_glyphs.size());
+ m_chars.resize(m_chars.size() + ti.num_chars);
- m_glyphPool += size;
- m_positionPool += size;
- }
+ glyph_t *glyphsDestination = m_glyphs.data() + currentItem.glyphOffset;
+ qMemCopy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
+ QFixedPoint *positionsDestination = m_positions.data() + currentItem.positionOffset;
+ qMemCopy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
+
+ QChar *charsDestination = m_chars.data() + currentItem.charOffset;
+ qMemCopy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
+
+ m_items.append(currentItem);
+ }
virtual bool begin(QPaintDevice *) { return true; }
virtual bool end() { return true; }
@@ -463,38 +458,42 @@ namespace {
return User;
}
- int itemCount() const
+ QVector<QStaticTextItem> items() const
{
- return m_itemCount;
+ return m_items;
}
- int glyphCount() const
+ QVector<QFixedPoint> positions() const
{
- return m_glyphCount;
+ return m_positions;
}
- private:
- QStaticTextItem *m_items;
- int m_itemCount;
- int m_glyphCount;
- int m_expectedItemCount;
- int m_expectedGlyphCount;
+ QVector<glyph_t> glyphs() const
+ {
+ return m_glyphs;
+ }
+
+ QVector<QChar> chars() const
+ {
+ return m_chars;
+ }
- glyph_t *m_glyphPool;
- QFixedPoint *m_positionPool;
+ private:
+ QVector<QStaticTextItem> m_items;
+ QVector<QFixedPoint> m_positions;
+ QVector<glyph_t> m_glyphs;
+ QVector<QChar> m_chars;
bool m_dirtyPen;
+ bool m_useBackendOptimizations;
};
class DrawTextItemDevice: public QPaintDevice
{
public:
- DrawTextItemDevice(int expectedItemCount = -1, QStaticTextItem *items = 0,
- int expectedGlyphCount = -1, QFixedPoint *positionPool = 0,
- glyph_t *glyphPool = 0)
+ DrawTextItemDevice(bool useBackendOptimizations, int numChars)
{
- m_paintEngine = new DrawTextItemRecorder(expectedItemCount, items,
- expectedGlyphCount, positionPool, glyphPool);
+ m_paintEngine = new DrawTextItemRecorder(useBackendOptimizations, numChars);
}
~DrawTextItemDevice()
@@ -538,14 +537,24 @@ namespace {
return m_paintEngine;
}
- int itemCount() const
+ QVector<glyph_t> glyphs() const
{
- return m_paintEngine->itemCount();
+ return m_paintEngine->glyphs();
}
- int glyphCount() const
+ QVector<QFixedPoint> positions() const
{
- return m_paintEngine->glyphCount();
+ return m_paintEngine->positions();
+ }
+
+ QVector<QStaticTextItem> items() const
+ {
+ return m_paintEngine->items();
+ }
+
+ QVector<QChar> chars() const
+ {
+ return m_paintEngine->chars();
}
private:
@@ -616,42 +625,42 @@ void QStaticTextPrivate::init()
delete[] items;
delete[] glyphPool;
delete[] positionPool;
+ delete[] charPool;
position = QPointF(0, 0);
- // Draw once to count number of items and glyphs, so that we can use as little memory
- // as possible to store the data
- DrawTextItemDevice counterDevice;
+ DrawTextItemDevice device(useBackendOptimizations, text.size());
{
- QPainter painter(&counterDevice);
+ QPainter painter(&device);
painter.setFont(font);
painter.setTransform(matrix);
paintText(QPointF(0, 0), &painter);
-
}
- itemCount = counterDevice.itemCount();
+ QVector<QStaticTextItem> deviceItems = device.items();
+ QVector<QFixedPoint> positions = device.positions();
+ QVector<glyph_t> glyphs = device.glyphs();
+ QVector<QChar> chars = device.chars();
+
+ itemCount = deviceItems.size();
items = new QStaticTextItem[itemCount];
- if (useBackendOptimizations) {
- for (int i=0; i<itemCount; ++i)
- items[i].useBackendOptimizations = true;
- }
+ glyphPool = new glyph_t[glyphs.size()];
+ qMemCopy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t));
+ positionPool = new QFixedPoint[positions.size()];
+ qMemCopy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
- int glyphCount = counterDevice.glyphCount();
- glyphPool = new glyph_t[glyphCount];
- positionPool = new QFixedPoint[glyphCount];
+ charPool = new QChar[chars.size()];
+ qMemCopy(charPool, chars.constData(), chars.size() * sizeof(QChar));
- // Draw again to actually record the items and glyphs
- DrawTextItemDevice recorderDevice(itemCount, items, glyphCount, positionPool, glyphPool);
- {
- QPainter painter(&recorderDevice);
- painter.setFont(font);
- painter.setTransform(matrix);
+ for (int i=0; i<itemCount; ++i) {
+ items[i] = deviceItems.at(i);
- paintText(QPointF(0, 0), &painter);
+ items[i].glyphs = glyphPool + items[i].glyphOffset;
+ items[i].glyphPositions = positionPool + items[i].positionOffset;
+ items[i].chars = charPool + items[i].charOffset;
}
needsRelayout = false;
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index f017ed1..2ab5579 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -88,9 +88,18 @@ public:
userData = newUserData;
}
- QFixedPoint *glyphPositions; // 8 bytes per glyph
- glyph_t *glyphs; // 4 bytes per glyph
- const QChar *chars; // 2 bytes per glyph
+ union {
+ QFixedPoint *glyphPositions; // 8 bytes per glyph
+ int positionOffset;
+ };
+ union {
+ glyph_t *glyphs; // 4 bytes per glyph
+ int glyphOffset;
+ };
+ union {
+ QChar *chars; // 2 bytes per glyph
+ int charOffset;
+ };
// =================
// 14 bytes per glyph
@@ -134,14 +143,16 @@ public:
QTransform matrix; // 80 bytes per text
QStaticTextItem *items; // 4 bytes per text
int itemCount; // 4 bytes per text
+
glyph_t *glyphPool; // 4 bytes per text
QFixedPoint *positionPool; // 4 bytes per text
+ QChar *charPool; // 4 bytes per text
unsigned char needsRelayout : 1;
unsigned char useBackendOptimizations : 1; // 1 byte per text
unsigned char textFormat : 2;
// ================
- // 163 bytes per text
+ // 167 bytes per text
static QStaticTextPrivate *get(const QStaticText *q);
};
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index 36a25f6..050e2b7 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -150,6 +150,9 @@ public:
The item includes no scrolling, scaling,
toolbars, etc., those must be implemented around WebView. See the WebBrowser example
for a demonstration of this.
+
+ When this item has keyboard focus, all keyboard input will be sent directly to the
+ web page within.
*/
/*!
@@ -701,20 +704,12 @@ void QDeclarativeWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
QDeclarativeItem::hoverMoveEvent(event);
}
-bool QDeclarativeWebView::sceneEvent(QEvent *event)
-{
- if (event->type() == QEvent::KeyPress) {
- QKeyEvent *k = static_cast<QKeyEvent *>(event);
- if (k->key() == Qt::Key_Tab || k->key() == Qt::Key_Backtab) {
- if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) { //### Add MetaModifier?
- page()->event(event);
- if (event->isAccepted())
- return true;
- }
- }
- }
+bool QDeclarativeWebView::sceneEvent(QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)//Key events go to the page
+ return page()->event(event);
return QDeclarativeItem::sceneEvent(event);
-}
+}
/*!
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 4461358..5758b25 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1401,7 +1401,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem
{
QStaticTextItem staticTextItem;
- staticTextItem.chars = ti.chars;
+ staticTextItem.chars = const_cast<QChar *>(ti.chars);
staticTextItem.fontEngine = ti.fontEngine;
staticTextItem.glyphs = glyphs.data();
staticTextItem.numChars = ti.num_chars;
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 28d37bc..12c487d 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -4999,7 +4999,7 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
{
QStaticTextItem staticTextItem;
- staticTextItem.chars = ti.chars;
+ staticTextItem.chars = const_cast<QChar *>(ti.chars);
staticTextItem.fontEngine = ti.fontEngine;
staticTextItem.glyphs = glyphs.data();
staticTextItem.numChars = ti.num_chars;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 80366d1..f704432 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -91,6 +91,7 @@ void QDirectFBPixmapData::resize(int width, int height)
setSerialNumber(++global_ser_no);
}
+#ifdef QT_DIRECTFB_OPAQUE_DETECTION
// mostly duplicated from qimage.cpp (QImageData::checkForAlphaPixels)
static bool checkForAlphaPixels(const QImage &img)
{
@@ -160,12 +161,16 @@ static bool checkForAlphaPixels(const QImage &img)
return false;
}
+#endif // QT_DIRECTFB_OPAQUE_DETECTION
-bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img)
+bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img, Qt::ImageConversionFlags flags)
{
-#ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
- return checkForAlphaPixels(img);
+ if (img.depth() == 1)
+ return true;
+#ifdef QT_DIRECTFB_OPAQUE_DETECTION
+ return ((flags & Qt::NoOpaqueDetection) ? img.hasAlphaChannel() : checkForAlphaPixels(img));
#else
+ Q_UNUSED(flags);
return img.hasAlphaChannel();
#endif
}
@@ -287,19 +292,9 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
#endif
-void QDirectFBPixmapData::fromImage(const QImage &img,
- Qt::ImageConversionFlags flags)
+void QDirectFBPixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags)
{
- if (img.depth() == 1) {
- alpha = true;
-#ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
- } else if (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img)) {
- alpha = true;
-#else
- } else if (img.hasAlphaChannel()) {
- alpha = true;
-#endif
- }
+ alpha = QDirectFBPixmapData::hasAlphaChannel(img, flags);
imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
QImage image;
if ((flags & ~Qt::NoOpaqueDetection) != Qt::AutoColor) {
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
index da6edc6..343b26e 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
@@ -86,8 +86,8 @@ public:
virtual int metric(QPaintDevice::PaintDeviceMetric m) const { return QDirectFBPaintDevice::metric(m); }
inline QImage::Format pixelFormat() const { return imageFormat; }
- static bool hasAlphaChannel(const QImage &img);
inline bool hasAlphaChannel() const { return alpha; }
+ static bool hasAlphaChannel(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
private:
#ifdef QT_DIRECTFB_IMAGEPROVIDER
bool fromDataBufferDescription(const DFBDataBufferDescription &dataBuffer);
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 639af80..3f08e74 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -742,6 +742,7 @@ void QScriptContext::pushScope(const QScriptValue &object)
*/
QScriptValue QScriptContext::popScope()
{
+ activationObject(); //ensure the creation of the normal scope for native context
JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
JSC::ScopeChainNode *scope = frame->scopeChain();
Q_ASSERT(scope != 0);
diff --git a/src/src.pro b/src/src.pro
index 7574796..5436c4a 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -157,24 +157,24 @@ for(subname, SRC_SUBDIRS) {
SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
!isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info {
#debug
- eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
- eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug))
+ debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
+ debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
EXTRA_DEBUG_TARGETS += debug-$${subtarget}
QMAKE_EXTRA_TARGETS += debug-$${subtarget}
#release
- eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
- eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release))
+ release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
+ release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
EXTRA_RELEASE_TARGETS += release-$${subtarget}
QMAKE_EXTRA_TARGETS += release-$${subtarget}
} else { #do not have a real debug target/release
#debug
- eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
- eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
+ debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
EXTRA_DEBUG_TARGETS += debug-$${subtarget}
QMAKE_EXTRA_TARGETS += debug-$${subtarget}
#release
- eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
- eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
+ release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
EXTRA_RELEASE_TARGETS += release-$${subtarget}
QMAKE_EXTRA_TARGETS += release-$${subtarget}
}
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index 1ecb944..4736d09 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -45,24 +45,24 @@ EXTRA_RELEASE_TARGETS =
SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
!isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info {
#debug
- eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
- eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug))
+ debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
+ debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)
EXTRA_DEBUG_TARGETS += debug-$${subtarget}
QMAKE_EXTRA_TARGETS += debug-$${subtarget}
#release
- eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
- eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release))
+ release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
+ release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)
EXTRA_RELEASE_TARGETS += release-$${subtarget}
QMAKE_EXTRA_TARGETS += release-$${subtarget}
} else { #do not have a real debug target/release
#debug
- eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
- eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS
+ debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
EXTRA_DEBUG_TARGETS += debug-$${subtarget}
QMAKE_EXTRA_TARGETS += debug-$${subtarget}
#release
- eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
- eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS
+ release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)
EXTRA_RELEASE_TARGETS += release-$${subtarget}
QMAKE_EXTRA_TARGETS += release-$${subtarget}
}
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 0df28d0..d3e3c3a 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -915,9 +915,18 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent()
edit.setFocus(false);
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
+ ic.closeInputPanelReceived = false;
+
+ // active window focus reason should not cause input panel to open
+ QGraphicsObject * editObject = qobject_cast<QGraphicsObject*>(&edit);
+ editObject->setFocus(Qt::ActiveWindowFocusReason);
+ QCOMPARE(ic.openInputPanelReceived, false);
+ QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // and input panel should not open if focus has already been set
edit.setFocus(true);
- QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, true);
+ QCOMPARE(ic.openInputPanelReceived, false);
+ QCOMPARE(ic.closeInputPanelReceived, false);
edit.setShowInputPanelOnFocus(true);
QCOMPARE(inputPanelonFocusSpy.count(),2);
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 155223d..c01cfa5 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -819,9 +819,18 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
input.setFocus(false);
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
+ ic.closeInputPanelReceived = false;
+
+ // active window focus reason should not cause input panel to open
+ QGraphicsObject * inputObject = qobject_cast<QGraphicsObject*>(&input);
+ inputObject->setFocus(Qt::ActiveWindowFocusReason);
+ QCOMPARE(ic.openInputPanelReceived, false);
+ QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // and input panel should not open if focus has already been set
input.setFocus(true);
- QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, true);
+ QCOMPARE(ic.openInputPanelReceived, false);
+ QCOMPARE(ic.closeInputPanelReceived, false);
input.setShowInputPanelOnFocus(true);
QCOMPARE(inputPanelonFocusSpy.count(),2);
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 300afc3..5547b02 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -348,6 +348,7 @@ private slots:
void childrenBoundingRect2();
void childrenBoundingRect3();
void childrenBoundingRect4();
+ void childrenBoundingRect5();
void group();
void setGroup();
void setGroup2();
@@ -3369,6 +3370,34 @@ void tst_QGraphicsItem::childrenBoundingRect4()
QCOMPARE(rect2->childrenBoundingRect(), rect3->boundingRect());
}
+void tst_QGraphicsItem::childrenBoundingRect5()
+{
+ QGraphicsScene scene;
+
+ QGraphicsRectItem *parent = scene.addRect(QRectF(0, 0, 100, 100));
+ QGraphicsRectItem *child = scene.addRect(QRectF(0, 0, 100, 100));
+ child->setParentItem(parent);
+
+ QGraphicsView view(&scene);
+ view.show();
+
+ QTest::qWaitForWindowShown(&view);
+
+ // Try to mess up the cached bounding rect.
+ QRectF expectedChildrenBoundingRect = parent->boundingRect();
+ QCOMPARE(parent->childrenBoundingRect(), expectedChildrenBoundingRect);
+
+ // Apply some effects.
+ QGraphicsDropShadowEffect *dropShadow = new QGraphicsDropShadowEffect;
+ dropShadow->setOffset(25, 25);
+ child->setGraphicsEffect(dropShadow);
+ parent->setGraphicsEffect(new QGraphicsOpacityEffect);
+
+ QVERIFY(parent->childrenBoundingRect() != expectedChildrenBoundingRect);
+ expectedChildrenBoundingRect |= dropShadow->boundingRect();
+ QCOMPARE(parent->childrenBoundingRect(), expectedChildrenBoundingRect);
+}
+
void tst_QGraphicsItem::group()
{
QGraphicsScene scene;
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 100e195..617c183 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -84,6 +84,7 @@ private slots:
void jsActivationObject();
void qobjectAsActivationObject();
void parentContextCallee_QT2270();
+ void popNativeContextScope();
};
tst_QScriptContext::tst_QScriptContext()
@@ -539,6 +540,50 @@ void tst_QScriptContext::pushAndPopContext()
}
}
+void tst_QScriptContext::popNativeContextScope()
+{
+ QScriptEngine eng;
+ QScriptContext *ctx = eng.pushContext();
+ QVERIFY(ctx->popScope().isObject()); // the activation object
+
+ QCOMPARE(ctx->scopeChain().size(), 1);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(eng.globalObject()));
+ // This was different in 4.5: scope and activation were decoupled
+ QVERIFY(ctx->activationObject().strictlyEquals(eng.globalObject()));
+
+ QVERIFY(!eng.evaluate("var foo = 123; function bar() {}").isError());
+ QVERIFY(eng.globalObject().property("foo").isNumber());
+ QVERIFY(eng.globalObject().property("bar").isFunction());
+
+ QScriptValue customScope = eng.newObject();
+ ctx->pushScope(customScope);
+ QCOMPARE(ctx->scopeChain().size(), 2);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(customScope));
+ QVERIFY(ctx->scopeChain().at(1).strictlyEquals(eng.globalObject()));
+ QVERIFY(ctx->activationObject().strictlyEquals(eng.globalObject()));
+ ctx->setActivationObject(customScope);
+ QVERIFY(ctx->activationObject().strictlyEquals(customScope));
+ QCOMPARE(ctx->scopeChain().size(), 2);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(customScope));
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(ctx->scopeChain().at(1).strictlyEquals(eng.globalObject()));
+
+ QVERIFY(!eng.evaluate("baz = 456; var foo = 789; function barbar() {}").isError());
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(eng.globalObject().property("baz").isNumber());
+ QVERIFY(customScope.property("foo").isNumber());
+ QVERIFY(customScope.property("barbar").isFunction());
+
+ QVERIFY(ctx->popScope().strictlyEquals(customScope));
+ QCOMPARE(ctx->scopeChain().size(), 1);
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(eng.globalObject()));
+
+ // Need to push another object, otherwise we crash in popContext() (QTBUG-11012)
+ ctx->pushScope(customScope);
+ eng.popContext();
+}
+
void tst_QScriptContext::lineNumber()
{
QScriptEngine eng;
diff --git a/tools/assistant/lib/qhelpsearchindexreader_default_p.h b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
index b30fa4b..27764db 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_default_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
@@ -61,9 +61,6 @@
QT_BEGIN_NAMESPACE
-struct Entry;
-struct PosEntry;
-
namespace fulltextsearch {
namespace std {
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index ee49bbf..c2b3a57 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -392,11 +392,19 @@ Configure::~Configure()
}
}
-QString Configure::fixSeparators(QString somePath)
+QString Configure::fixSeparators(const QString &somePath, bool escape)
{
- return useUnixSeparators ?
- QDir::fromNativeSeparators(somePath) :
- QDir::toNativeSeparators(somePath);
+ if (useUnixSeparators)
+ return QDir::fromNativeSeparators(somePath);
+ QString ret = QDir::toNativeSeparators(somePath);
+ return escape ? escapeSeparators(ret) : ret;
+}
+
+QString Configure::escapeSeparators(const QString &somePath)
+{
+ QString out = somePath;
+ out.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
+ return out;
}
// We could use QDir::homePath() + "/.qt-license", but
@@ -2573,10 +2581,10 @@ void Configure::generateOutputVars()
qtConfig += "accessibility";
if( !qmakeLibs.isEmpty() )
- qmakeVars += "LIBS += " + qmakeLibs.join( " " );
+ qmakeVars += "LIBS += " + escapeSeparators(qmakeLibs.join( " " ));
if( !dictionary["QT_LFLAGS_SQLITE"].isEmpty() )
- qmakeVars += "QT_LFLAGS_SQLITE += " + dictionary["QT_LFLAGS_SQLITE"];
+ qmakeVars += "QT_LFLAGS_SQLITE += " + escapeSeparators(dictionary["QT_LFLAGS_SQLITE"]);
if (dictionary[ "QT3SUPPORT" ] == "yes")
qtConfig += "qt3support";
@@ -2721,14 +2729,14 @@ void Configure::generateOutputVars()
if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux"))
dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ];
- qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators( "tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ] );
- qmakeVars += QString("MOC_DIR = ") + fixSeparators( "tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ] );
- qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"]);
+ qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators("tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ], true);
+ qmakeVars += QString("MOC_DIR = ") + fixSeparators("tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ], true);
+ qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"], true);
if (!qmakeDefines.isEmpty())
qmakeVars += QString("DEFINES += ") + qmakeDefines.join( " " );
if (!qmakeIncludes.isEmpty())
- qmakeVars += QString("INCLUDEPATH += ") + qmakeIncludes.join( " " );
+ qmakeVars += QString("INCLUDEPATH += ") + escapeSeparators(qmakeIncludes.join( " " ));
if (!opensslLibs.isEmpty())
qmakeVars += opensslLibs;
else if (dictionary[ "OPENSSL" ] == "linked") {
@@ -2800,27 +2808,27 @@ void Configure::generateCachefile()
QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ];
QString mkspec_path = fixSeparators(sourcePath + "/mkspecs/" + targetSpec);
if(QFile::exists(mkspec_path))
- cacheStream << "QMAKESPEC = " << mkspec_path << endl;
+ cacheStream << "QMAKESPEC = " << escapeSeparators(mkspec_path) << endl;
else
- cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec) << endl;
- cacheStream << "ARCH = " << fixSeparators(dictionary[ "ARCHITECTURE" ]) << endl;
- cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ]) << endl;
- cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ]) << endl;
+ cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec, true) << endl;
+ cacheStream << "ARCH = " << dictionary[ "ARCHITECTURE" ] << endl;
+ cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl;
+ cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl;
if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE")
cacheStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl;
//so that we can build without an install first (which would be impossible)
- cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe") << endl;
- cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe") << endl;
- cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe") << endl;
- cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe") << endl;
- cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe") << endl;
- cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include") << endl;
- cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib") << endl;
+ cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe", true) << endl;
+ cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe", true) << endl;
+ cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe", true) << endl;
+ cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe", true) << endl;
+ cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe", true) << endl;
+ cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include", true) << endl;
+ cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib", true) << endl;
if (dictionary["CETEST"] == "yes") {
- cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ]) << endl;
- cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ]) << endl;
+ cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ], true) << endl;
+ cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ], true) << endl;
}
// embedded
@@ -2896,7 +2904,7 @@ void Configure::generateCachefile()
<< "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl;
configStream << "#Qt for Windows CE c-runtime deployment" << endl
- << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ]) << endl;
+ << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ], true) << endl;
if(dictionary["CE_SIGNATURE"] != QLatin1String("no"))
configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl;
@@ -3213,32 +3221,32 @@ void Configure::generateConfigfiles()
<< endl;
if(!dictionary[ "QT_HOST_PREFIX" ].isNull())
tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl;
- tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary["QT_INSTALL_PREFIX"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << QString(dictionary["QT_INSTALL_DOCS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << QString(dictionary["QT_INSTALL_HEADERS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << QString(dictionary["QT_INSTALL_LIBS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << QString(dictionary["QT_INSTALL_BINS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << QString(dictionary["QT_INSTALL_PLUGINS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << QString(dictionary["QT_INSTALL_IMPORTS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << QString(dictionary["QT_INSTALL_DATA"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << QString(dictionary["QT_INSTALL_TRANSLATIONS"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << QString(dictionary["QT_INSTALL_EXAMPLES"]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << QString(dictionary["QT_INSTALL_DEMOS"]).replace( "\\", "\\\\" ) << "\";" << endl
- //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << QString(dictionary["QT_INSTALL_SETTINGS"]).replace( "\\", "\\\\" ) << "\";" << endl
+ tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\";" << endl
+ << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\";" << endl
+ << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\";" << endl
+ << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << escapeSeparators(dictionary["QT_INSTALL_LIBS"]) << "\";" << endl
+ << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << escapeSeparators(dictionary["QT_INSTALL_BINS"]) << "\";" << endl
+ << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << escapeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << "\";" << endl
+ << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << escapeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << "\";" << endl
+ << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl
+ << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl
+ << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl
+ << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << escapeSeparators(dictionary["QT_INSTALL_DEMOS"]) << "\";" << endl
+ //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl
;
if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) {
tmpStream << "#else" << endl
- << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) << "\";" << endl
- << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example").replace( "\\", "\\\\" ) <<"\";" << endl
- << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos").replace( "\\", "\\\\" ) <<"\";" << endl
+ << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary[ "QT_HOST_PREFIX" ]) << "\";" << endl
+ << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc", true) <<"\";" << endl
+ << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include", true) <<"\";" << endl
+ << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib", true) <<"\";" << endl
+ << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin", true) <<"\";" << endl
+ << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins", true) <<"\";" << endl
+ << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports", true) <<"\";" << endl
+ << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl
+ << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl
+ << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl
+ << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos", true) <<"\";" << endl
<< "#endif //QT_BOOTSTRAPPED" << endl;
}
tmpStream << "/* strlen( \"qt_lcnsxxxx\" ) == 12 */" << endl
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index c441129..6c10dd8 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -147,7 +147,8 @@ private:
int outputWidth;
bool useUnixSeparators;
- QString fixSeparators(QString somePath);
+ QString fixSeparators(const QString &somePath, bool escape = false);
+ QString escapeSeparators(const QString &somePath);
bool filesDiffer(const QString &file1, const QString &file2);
bool findFile(const QString &fileName);