summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-03-10 02:09:43 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-03-10 02:09:43 (GMT)
commit0eb2aa1de730b0223bb0e2aa9cc53b6ee608b6bf (patch)
tree36397a3c7d75a814327492e9450f546db016e643
parent346b0f6247f1f8ca967f6686a849aa7464cb6b87 (diff)
parenta2427d2d9355e72a667ec2fd1a4cc018df43ec86 (diff)
downloadQt-0eb2aa1de730b0223bb0e2aa9cc53b6ee608b6bf.zip
Qt-0eb2aa1de730b0223bb0e2aa9cc53b6ee608b6bf.tar.gz
Qt-0eb2aa1de730b0223bb0e2aa9cc53b6ee608b6bf.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.6
-rw-r--r--dist/changes-4.5.410
-rw-r--r--examples/network/qftp/sym_iap_util.h16
-rw-r--r--examples/openvg/star/starwidget.cpp5
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog13
-rw-r--r--src/corelib/codecs/qiconvcodec.cpp41
-rw-r--r--src/corelib/global/qnamespace.qdoc34
-rw-r--r--src/corelib/io/qprocess_symbian.cpp2
-rw-r--r--src/gui/dialogs/qdialog.cpp6
-rw-r--r--src/gui/dialogs/qmessagebox.cpp2
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp38
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp13
-rw-r--r--src/gui/egl/qegl_wince.cpp4
-rw-r--r--src/gui/egl/qeglproperties.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.h10
-rw-r--r--src/gui/itemviews/qtableview.cpp16
-rw-r--r--src/gui/kernel/qapplication_s60.cpp3
-rw-r--r--src/gui/kernel/qcursor.cpp3
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp6
-rw-r--r--src/gui/kernel/qwidget_s60.cpp6
-rw-r--r--src/gui/painting/qgraphicssystem_raster.cpp13
-rw-r--r--src/gui/painting/qregion.cpp4
-rw-r--r--src/gui/styles/qs60style.cpp48
-rw-r--r--src/gui/text/qtextformat.cpp3
-rw-r--r--src/gui/widgets/qdockarealayout.cpp17
-rw-r--r--src/gui/widgets/qlineedit_p.cpp2
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp8
-rw-r--r--src/gui/widgets/qmenu_wince.cpp1
-rw-r--r--src/network/kernel/qhostinfo.cpp2
-rw-r--r--src/openvg/qpaintengine_vg.cpp24
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp32
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp29
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h1
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp17
-rw-r--r--src/sql/kernel/qsqlquery.cpp3
-rw-r--r--src/sql/kernel/qsqlresult.cpp3
-rw-r--r--src/xml/dom/qdom.cpp1
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp48
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser_p.h22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp60
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result24
-rw-r--r--tests/auto/qdom/tst_qdom.cpp25
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp101
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp40
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd6
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd5
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd5
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd5
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd4
-rw-r--r--tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp15
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp92
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro18
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/n900.jpegbin0 -> 19016 bytes
-rw-r--r--tools/linguist/lupdate/cpp.cpp28
-rw-r--r--translations/qtconfig_ru.ts2
-rw-r--r--translations/translations.pro1
65 files changed, 821 insertions, 160 deletions
diff --git a/dist/changes-4.5.4 b/dist/changes-4.5.4
index abaf4f0..ac91edb 100644
--- a/dist/changes-4.5.4
+++ b/dist/changes-4.5.4
@@ -9,12 +9,12 @@ The Qt version 4.5 series is binary compatible with the 4.4.x series.
Applications compiled for 4.4 will continue to run with 4.5.
Some of the changes listed in this file include issue tracking numbers
-corresponding to tasks in the Task Tracker:
+corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task
+Tracker, or the Merge Request queue of the public source repository.
- http://www.qtsoftware.com/developer/task-tracker
-
-Each of these identifiers can be entered in the task tracker to obtain more
-information about a particular change.
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Task Tracker: http://qt.nokia.com/developer/task-tracker
+Merge Request: http://qt.gitorious.org
****************************************************************************
* General *
diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
index 41e43a9..445036a 100644
--- a/examples/network/qftp/sym_iap_util.h
+++ b/examples/network/qftp/sym_iap_util.h
@@ -60,6 +60,7 @@
//#include <QTextCodec>
_LIT(KIapNameSetting, "IAP\\Name"); // text - mandatory
+_LIT(KIapTableIdField, "IAP\Id");
_LIT(KIapDialogPref, "IAP\\DialogPref"); // TUnit32 - optional
_LIT(KIapService, "IAP\\IAPService"); // TUnit32 - mandatory
_LIT(KIapServiceType, "IAP\\IAPServiceType"); // text - mandatory
@@ -367,20 +368,25 @@ static QString qt_OfferIapDialog() {
CleanupClosePushL(connection);
socketServ.Connect();
+
+ TCommDbConnPref prefs;
+ prefs.SetDialogPreference(ECommDbDialogPrefPrompt);
+
connection.Open(socketServ);
- connection.Start();
+ connection.Start(prefs);
connection.GetDesSetting(TPtrC(KIapNameSetting), iapName);
-
//connection.Stop();
iapName.ZeroTerminate();
QString strIapName((char*)iapName.Ptr());
int error = 0;
- if(!qt_SetDefaultIapName(strIapName, error)) {
- //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
- strIapName = QString("");
+ if(!strIapName.isEmpty()) {
+ if(!qt_SetDefaultIapName(strIapName, error)) {
+ //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error);
+ strIapName = QString("");
+ }
}
CleanupStack::PopAndDestroy(&connection);
diff --git a/examples/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp
index bde0719..794ede9 100644
--- a/examples/openvg/star/starwidget.cpp
+++ b/examples/openvg/star/starwidget.cpp
@@ -93,8 +93,9 @@ void StarWidget::paintEvent(QPaintEvent *)
// and prepare to perform raw OpenVG calls.
painter.beginNativePainting();
- // Cache the path if we haven't already.
- if (path == VG_INVALID_HANDLE) {
+ // Cache the path if we haven't already or if the path has
+ // become invalid because the window's context has changed.
+ if (path == VG_INVALID_HANDLE || !vgGetPathCapabilities(path)) {
path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
VG_PATH_DATATYPE_F,
1.0f, // scale
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index cc0e04f..6a2e75f 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- ffae5e11181a3961193fa21ea405851cad714d4b
+ f3110d2f94c825477afac054ed448e45d47f5670
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index c9b622a..5654a18 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -26,7 +26,7 @@ symbian: {
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
+ MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
index 714cac9..d13c9a9 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
@@ -39,7 +39,7 @@
#include <QGraphicsProxyWidget>
#include <QGraphicsScene>
#include <QGraphicsView>
-#include <QGraphicsWebView>
+#include <qgraphicswebview.h>
#include <QListWidget>
#include <QListWidgetItem>
#include <QMenu>
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
index 3833070..13c341c 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
@@ -20,11 +20,11 @@
#ifndef QWEBELEMENT_H
#define QWEBELEMENT_H
-#include <QString>
-#include <QStringList>
-#include <QRect>
-#include <QVariant>
-#include <QExplicitlySharedDataPointer>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qshareddata.h>
#include "qwebkitglobal.h"
namespace WebCore {
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 1026ac5..e54c176 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-04 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] qwebelement.h does not include QtCore headers correctly
+ https://bugs.webkit.org/show_bug.cgi?id=35748
+
+ The header files of QtCore must be included as QtCore/foo.h.
+
+ See also http://bugreports.qt.nokia.com/browse/QTBUG-8661
+
+ * Api/qwebelement.h:
+
2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Simon Hausmann.
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
index 0f73d9b..0fcdf96 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
@@ -299,6 +299,32 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
Q_GLOBAL_STATIC(QThreadStorage<QIconvCodec::IconvState *>, fromUnicodeState)
+static bool setByteOrder(iconv_t cd)
+{
+#if !defined(NO_BOM)
+ // give iconv() a BOM
+ char buf[4];
+ ushort bom[] = { QChar::ByteOrderMark };
+
+ char *outBytes = buf;
+ char *inBytes = reinterpret_cast<char *>(bom);
+ size_t outBytesLeft = sizeof buf;
+ size_t inBytesLeft = sizeof bom;
+
+#if defined(GNU_LIBICONV)
+ const char **inBytesPtr = const_cast<const char **>(&inBytes);
+#else
+ char **inBytesPtr = &inBytes;
+#endif
+
+ if (iconv(cd, inBytesPtr, &inBytesLeft, &outBytes, &outBytesLeft) == (size_t) -1) {
+ return false;
+ }
+#endif // NO_BOM
+
+ return true;
+}
+
QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterState *convState) const
{
char *inBytes;
@@ -325,17 +351,8 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
IconvState *&state = ts->localData();
if (!state) {
state = new IconvState(QIconvCodec::createIconv_t(0, UTF16));
- if (state->cd != reinterpret_cast<iconv_t>(-1)) {
- size_t outBytesLeft = len + 3; // +3 for the BOM
- QByteArray ba(outBytesLeft, Qt::Uninitialized);
- outBytes = ba.data();
-
-#if !defined(NO_BOM)
- // give iconv() a BOM
- QChar bom[] = { QChar(QChar::ByteOrderMark) };
- inBytes = reinterpret_cast<char *>(bom);
- inBytesLeft = sizeof(bom);
- if (iconv(state->cd, inBytesPtr, &inBytesLeft, &outBytes, &outBytesLeft) == (size_t) -1) {
+ if (state->cd == reinterpret_cast<iconv_t>(-1)) {
+ if (!setByteOrder(state->cd)) {
perror("QIconvCodec::convertFromUnicode: using ASCII for conversion, iconv failed for BOM");
iconv_close(state->cd);
@@ -343,7 +360,6 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
return QString(uc, len).toAscii();
}
-#endif // NO_BOM
}
}
if (state->cd == reinterpret_cast<iconv_t>(-1)) {
@@ -422,6 +438,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
// reset to initial state
iconv(state->cd, 0, &inBytesLeft, 0, &outBytesLeft);
+ setByteOrder(state->cd);
ba.resize(ba.size() - outBytesLeft);
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 6968773..a756565 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1622,22 +1622,22 @@
\value Key_OpenUrl
\value Key_LaunchMail
\value Key_LaunchMedia
- \value Key_Launch0
- \value Key_Launch1
- \value Key_Launch2
- \value Key_Launch3
- \value Key_Launch4
- \value Key_Launch5
- \value Key_Launch6
- \value Key_Launch7
- \value Key_Launch8
- \value Key_Launch9
- \value Key_LaunchA
- \value Key_LaunchB
- \value Key_LaunchC
- \value Key_LaunchD
- \value Key_LaunchE
- \value Key_LaunchF
+ \value Key_Launch0 On X11 this key is mapped to "My Computer" (XF86XK_MyComputer) key for legacy reasons.
+ \value Key_Launch1 On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons.
+ \value Key_Launch2 On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons.
+ \value Key_Launch3 On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons.
+ \value Key_Launch4 On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons.
+ \value Key_Launch5 On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons.
+ \value Key_Launch6 On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons.
+ \value Key_Launch7 On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons.
+ \value Key_Launch8 On X11 this key is mapped to XF86XK_Launch6 key for legacy reasons.
+ \value Key_Launch9 On X11 this key is mapped to XF86XK_Launch7 key for legacy reasons.
+ \value Key_LaunchA On X11 this key is mapped to XF86XK_Launch8 key for legacy reasons.
+ \value Key_LaunchB On X11 this key is mapped to XF86XK_Launch9 key for legacy reasons.
+ \value Key_LaunchC On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons.
+ \value Key_LaunchD On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons.
+ \value Key_LaunchE On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons.
+ \value Key_LaunchF On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons.
\value Key_MonBrightnessUp
\value Key_MonBrightnessDown
\value Key_KeyboardLightOnOff
@@ -1663,7 +1663,7 @@
\value Key_ApplicationRight
\value Key_Book
\value Key_CD
- \value Key_Calculator
+ \value Key_Calculator On X11 this key is not mapped for legacy reasons. Use Qt::Key_Launch1 instead.
\value Key_ToDoList
\value Key_ClearGrab
\value Key_Close
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index 75cde51..e37bdda 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -371,6 +371,7 @@ QProcessActive::QProcessActive()
// Called from ProcessManagerThread
QProcessActive::~QProcessActive()
{
+ Cancel();
process = NULL;
pproc = NULL;
}
@@ -477,6 +478,7 @@ QProcessManagerMediator::QProcessManagerMediator()
// Called from ProcessManagerThread
QProcessManagerMediator::~QProcessManagerMediator()
{
+ Cancel();
processManagerThread.Close();
currentCommand = ENoCommand;
currentObserver = NULL;
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 9ff2ad8..d86d63e 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -807,11 +807,11 @@ void QDialog::setVisible(bool visible)
void QDialog::showEvent(QShowEvent *event)
{
if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) {
- Qt::WindowStates state = windowState();
+ Qt::WindowStates state = windowState();
adjustPosition(parentWidget());
setAttribute(Qt::WA_Moved, false); // not really an explicit position
- if (state != windowState())
- setWindowState(state);
+ if (state != windowState())
+ setWindowState(state);
}
}
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index d1b2e3f..bd2df9c 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -314,6 +314,7 @@ void QMessageBoxPrivate::updateSize()
}
width = hardLimit;
}
+ }
#ifdef Q_WS_S60
// in S60 portait messageBoxes should always occupy maximum width
if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){
@@ -323,7 +324,6 @@ void QMessageBoxPrivate::updateSize()
width = qMin(QApplication::desktop()->size().height(), hardLimit);
}
#endif
- }
if (informativeLabel) {
label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 23f5831..00dc3e6 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -154,6 +154,9 @@ public:
bool checkFields();
void setupPrinter();
void setOptionsPane(QPrintDialogPrivate *pane);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ void setCupsProperties();
+#endif
// slots
void _q_printerChanged(int index);
@@ -942,7 +945,7 @@ bool QUnixPrintWidgetPrivate::checkFields()
void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
{
- if (propertiesDialog == 0) {
+ if (!propertiesDialog) {
propertiesDialog = new QPrintPropertiesDialog(q);
propertiesDialog->setResult(QDialog::Rejected);
}
@@ -962,6 +965,35 @@ void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
propertiesDialog->exec();
}
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+void QUnixPrintWidgetPrivate::setCupsProperties()
+{
+ if (cups && QCUPSSupport::isAvailable()) {
+ QPrintEngine *engine = printer->printEngine();
+ const ppd_option_t* pageSizes = cups->pageSizes();
+ QByteArray cupsPageSize;
+ for (int i = 0; i < pageSizes->num_choices; ++i) {
+ if (static_cast<int>(pageSizes->choices[i].marked) == 1)
+ cupsPageSize = pageSizes->choices[i].choice;
+ }
+ engine->setProperty(PPK_CupsStringPageSize, QString::fromLatin1(cupsPageSize));
+ engine->setProperty(PPK_CupsOptions, cups->options());
+
+ QRect pageRect = cups->pageRect(cupsPageSize);
+ engine->setProperty(PPK_CupsPageRect, pageRect);
+
+ QRect paperRect = cups->paperRect(cupsPageSize);
+ engine->setProperty(PPK_CupsPaperRect, paperRect);
+
+ for (int ps = 0; ps < QPrinter::NPaperSize; ++ps) {
+ QPdf::PaperSize size = QPdf::paperSize(QPrinter::PaperSize(ps));
+ if (size.width == paperRect.width() && size.height == paperRect.height())
+ printer->setPaperSize(static_cast<QPrinter::PaperSize>(ps));
+ }
+ }
+}
+#endif
+
void QUnixPrintWidgetPrivate::setupPrinter()
{
const int printerCount = widget.printers->count();
@@ -986,6 +1018,10 @@ void QUnixPrintWidgetPrivate::setupPrinter()
if (propertiesDialog && propertiesDialog->result() == QDialog::Accepted)
propertiesDialog->setupPrinter();
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ if (!propertiesDialog)
+ setCupsProperties();
+#endif
}
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index 6723b53..f21343e 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -273,7 +273,20 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
QWidget *pageEdit = new QWidget(toolbar);
QVBoxLayout *vboxLayout = new QVBoxLayout;
vboxLayout->setContentsMargins(0, 0, 0, 0);
+#ifdef Q_WS_MAC
+ // We query the widgets about their size and then we fix the size.
+ // This should do the trick for the laying out part...
+ QSize pageNumEditSize, pageNumLabelSize;
+ pageNumEditSize = pageNumEdit->minimumSizeHint();
+ pageNumLabelSize = pageNumLabel->minimumSizeHint();
+ pageNumEdit->resize(pageNumEditSize);
+ pageNumLabel->resize(pageNumLabelSize);
+#endif
QFormLayout *formLayout = new QFormLayout;
+#ifdef Q_WS_MAC
+ // We have to change the growth policy in Mac.
+ formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
+#endif
formLayout->setWidget(0, QFormLayout::LabelRole, pageNumEdit);
formLayout->setWidget(0, QFormLayout::FieldRole, pageNumLabel);
vboxLayout->addLayout(formLayout);
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index dfef39f..87ec648 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -89,9 +89,7 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties
EGLNativeDisplayType QEglContext::nativeDisplay()
{
- //HWND win = (static_cast<QWidget*>(device))->winId();
- //HDC myDc = GetDC(win);
- HDC myDc = GetWindowDC(0);
+ HDC myDc = GetDC(0);
if (!myDc) {
qWarning("QEglContext::nativeDisplay(): WinCE display is not open");
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 236ec37..d0d5de7 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -39,13 +39,13 @@
**
****************************************************************************/
+#include <QtCore/qdebug.h>
+#include <QtCore/qstringlist.h>
+
#include "qeglproperties_p.h"
QT_BEGIN_NAMESPACE
-#include <QtCore/qdebug.h>
-#include <QtCore/qstringlist.h>
-
#include "qegl_p.h"
diff --git a/src/gui/graphicsview/qgraphicssceneevent.h b/src/gui/graphicsview/qgraphicssceneevent.h
index 033a996..c8a0028 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.h
+++ b/src/gui/graphicsview/qgraphicssceneevent.h
@@ -77,6 +77,8 @@ protected:
QGraphicsSceneEvent(QGraphicsSceneEventPrivate &dd, Type type = None);
QScopedPointer<QGraphicsSceneEventPrivate> d_ptr;
Q_DECLARE_PRIVATE(QGraphicsSceneEvent)
+private:
+ Q_DISABLE_COPY(QGraphicsSceneEvent)
};
class QGraphicsSceneMouseEventPrivate;
@@ -124,6 +126,7 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneMouseEvent)
+ Q_DISABLE_COPY(QGraphicsSceneMouseEvent)
};
class QGraphicsSceneWheelEventPrivate;
@@ -156,6 +159,7 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneWheelEvent)
+ Q_DISABLE_COPY(QGraphicsSceneWheelEvent)
};
class QGraphicsSceneContextMenuEventPrivate;
@@ -184,6 +188,7 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneContextMenuEvent)
+ Q_DISABLE_COPY(QGraphicsSceneContextMenuEvent)
};
class QGraphicsSceneHoverEventPrivate;
@@ -216,6 +221,7 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneHoverEvent)
+ Q_DISABLE_COPY(QGraphicsSceneHoverEvent)
};
class QGraphicsSceneHelpEventPrivate;
@@ -233,6 +239,7 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneHelpEvent)
+ Q_DISABLE_COPY(QGraphicsSceneHelpEvent)
};
class QGraphicsSceneDragDropEventPrivate;
@@ -275,12 +282,14 @@ public:
private:
Q_DECLARE_PRIVATE(QGraphicsSceneDragDropEvent)
+ Q_DISABLE_COPY(QGraphicsSceneDragDropEvent)
};
class QGraphicsSceneResizeEventPrivate;
class Q_GUI_EXPORT QGraphicsSceneResizeEvent : public QGraphicsSceneEvent
{
Q_DECLARE_PRIVATE(QGraphicsSceneResizeEvent)
+ Q_DISABLE_COPY(QGraphicsSceneResizeEvent)
public:
QGraphicsSceneResizeEvent();
~QGraphicsSceneResizeEvent();
@@ -296,6 +305,7 @@ class QGraphicsSceneMoveEventPrivate;
class Q_GUI_EXPORT QGraphicsSceneMoveEvent : public QGraphicsSceneEvent
{
Q_DECLARE_PRIVATE(QGraphicsSceneMoveEvent)
+ Q_DISABLE_COPY(QGraphicsSceneMoveEvent)
public:
QGraphicsSceneMoveEvent();
~QGraphicsSceneMoveEvent();
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 3111896..c824a8a 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -1908,6 +1908,7 @@ QRegion QTableView::visualRegionForSelection(const QItemSelection &selection) co
width, rowHeight(r)));
}
} else { // nothing moved
+ const int gridAdjust = showGrid() ? 1 : 0;
for (int i = 0; i < selection.count(); ++i) {
QItemSelectionRange range = selection.at(i);
if (range.parent() != d->root || !range.isValid())
@@ -1916,9 +1917,16 @@ QRegion QTableView::visualRegionForSelection(const QItemSelection &selection) co
const int rtop = rowViewportPosition(range.top());
const int rbottom = rowViewportPosition(range.bottom()) + rowHeight(range.bottom());
- const int rleft = columnViewportPosition(range.left());
- const int rright = columnViewportPosition(range.right()) + columnWidth(range.right());
- selectionRegion += QRect(QPoint(rleft, rtop), QPoint(rright, rbottom));
+ int rleft;
+ int rright;
+ if (isLeftToRight()) {
+ rleft = columnViewportPosition(range.left());
+ rright = columnViewportPosition(range.right()) + columnWidth(range.right());
+ } else {
+ rleft = columnViewportPosition(range.right());
+ rright = columnViewportPosition(range.left()) + columnWidth(range.left());
+ }
+ selectionRegion += QRect(QPoint(rleft, rtop), QPoint(rright - 1 - gridAdjust, rbottom - 1 - gridAdjust));
if (d->hasSpans()) {
foreach (QSpanCollection::Span *s,
d->spans.spansInRect(range.left(), range.top(), range.width(), range.height())) {
@@ -2546,7 +2554,7 @@ void QTableView::scrollTo(const QModelIndex &index, ScrollHint hint)
// check if we really need to do anything
if (!d->isIndexValid(index)
|| (d->model->parent(index) != d->root)
- || isIndexHidden(index))
+ || isRowHidden(index.row()) || isColumnHidden(index.column()))
return;
QSpanCollection::Span span;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 2a90ba6..395ceca 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1473,6 +1473,9 @@ void QApplicationPrivate::closePopup(QWidget *popup)
QWidget *fw = QApplicationPrivate::active_window ? QApplicationPrivate::active_window->focusWidget()
: q_func()->focusWidget();
if (fw) {
+ if(fw->window()->isModal()) // restore pointer capture for modal window
+ fw->effectiveWinId()->SetPointerCapture(true);
+
if (fw != q_func()->focusWidget()) {
fw->setFocus(Qt::PopupFocusReason);
} else {
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index 0f0470c..6b21d56 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -342,7 +342,8 @@ QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
\o B=1 and M=1 gives black.
\o B=0 and M=1 gives white.
\o B=0 and M=0 gives transparent.
- \o B=1 and M=0 gives an XOR'd result.
+ \o B=1 and M=0 gives an XOR'd result under Windows, undefined
+ results on all other platforms.
\endlist
Use the global Qt color Qt::color0 to draw 0-pixels and Qt::color1 to
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 4e6c847..b32b626 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -1073,8 +1073,8 @@ static const unsigned int KeyTbl[] = {
XF86XK_AudioNext, Qt::Key_MediaNext,
XF86XK_AudioRecord, Qt::Key_MediaRecord,
XF86XK_Mail, Qt::Key_LaunchMail,
- XF86XK_MyComputer, Qt::Key_Launch0,
- XF86XK_Calculator, Qt::Key_Calculator,
+ XF86XK_MyComputer, Qt::Key_Launch0, // ### Qt 5: remap properly
+ XF86XK_Calculator, Qt::Key_Launch1,
XF86XK_Memo, Qt::Key_Memo,
XF86XK_ToDoList, Qt::Key_ToDoList,
XF86XK_Calendar, Qt::Key_Calendar,
@@ -1172,7 +1172,7 @@ static const unsigned int KeyTbl[] = {
XF86XK_Bluetooth, Qt::Key_Bluetooth,
XF86XK_Suspend, Qt::Key_Suspend,
XF86XK_Hibernate, Qt::Key_Hibernate,
- XF86XK_Launch0, Qt::Key_Launch2,
+ XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 5: remap properly
XF86XK_Launch1, Qt::Key_Launch3,
XF86XK_Launch2, Qt::Key_Launch4,
XF86XK_Launch3, Qt::Key_Launch5,
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 7bbc142..7fb21d2 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1237,8 +1237,10 @@ void QWidget::releaseMouse()
{
if (!qt_nograb() && QWidgetPrivate::mouseGrabber == this) {
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
- WId id = effectiveWinId();
- id->SetPointerCapture(false);
+ if(!window()->isModal()) {
+ WId id = effectiveWinId();
+ id->SetPointerCapture(false);
+ }
QWidgetPrivate::mouseGrabber = 0;
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
diff --git a/src/gui/painting/qgraphicssystem_raster.cpp b/src/gui/painting/qgraphicssystem_raster.cpp
index f90aea0..909508e 100644
--- a/src/gui/painting/qgraphicssystem_raster.cpp
+++ b/src/gui/painting/qgraphicssystem_raster.cpp
@@ -41,19 +41,32 @@
#include "qgraphicssystem_raster_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "private/qpixmap_s60_p.h"
+#include "private/qwindowsurface_s60_p.h"
+#else
#include "private/qpixmap_raster_p.h"
#include "private/qwindowsurface_raster_p.h"
+#endif
QT_BEGIN_NAMESPACE
QPixmapData *QRasterGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
{
+#ifdef Q_OS_SYMBIAN
+ return new QS60PixmapData(type);
+#else
return new QRasterPixmapData(type);
+#endif
}
QWindowSurface *QRasterGraphicsSystem::createWindowSurface(QWidget *widget) const
{
+#ifdef Q_OS_SYMBIAN
+ return new QS60WindowSurface(widget);
+#else
return new QRasterWindowSurface(widget);
+#endif
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 614d2c0..bea2b6e 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -3134,8 +3134,8 @@ SOFTWARE.
************************************************************************/
/* $XFree86: xc/lib/X11/PolyReg.c,v 1.1.1.2.8.2 1998/10/04 15:22:49 hohndel Exp $ */
-#define LARGE_COORDINATE 1000000
-#define SMALL_COORDINATE -LARGE_COORDINATE
+#define LARGE_COORDINATE INT_MAX
+#define SMALL_COORDINATE INT_MIN
/*
* InsertEdgeInET
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 565cc2c..bf5a62e 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -759,13 +759,29 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const
QApplication::setPalette(widgetPalette, "QMenuBar");
widgetPalette = *palette;
+ widgetPalette.setColor(QPalette::Text,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 22, 0));
+ widgetPalette.setColor(QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 11, 0));
+ QApplication::setPalette(widgetPalette, "QMenu");
+ widgetPalette = *palette;
+
widgetPalette.setColor(QPalette::WindowText,
s60Color(QS60StyleEnums::CL_QsnTextColors, 4, 0));
+ widgetPalette.setColor(QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 3, 0));
QApplication::setPalette(widgetPalette, "QTabBar");
widgetPalette = *palette;
+ widgetPalette.setColor(QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 10, 0));
+ QApplication::setPalette(widgetPalette, "QListView");
+ widgetPalette = *palette;
+
widgetPalette.setColor(QPalette::Text,
s60Color(QS60StyleEnums::CL_QsnTextColors, 22, 0));
+ widgetPalette.setColor(QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 11, 0));
QApplication::setPalette(widgetPalette, "QTableView");
widgetPalette = *palette;
@@ -789,6 +805,8 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const
widgetPalette = *palette;
widgetPalette.setColor(QPalette::WindowText, s60Color(QS60StyleEnums::CL_QsnTextColors, 7, 0));
+ widgetPalette.setColor(QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 11, 0));
QApplication::setPalette(widgetPalette, "QRadioButton");
QApplication::setPalette(widgetPalette, "QCheckBox");
widgetPalette = *palette;
@@ -1241,6 +1259,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_RadioButton:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
bool isRadio = (element == CE_RadioButton);
+ QStyleOptionButton subopt = *btn;
+
// Highlight needs to be drawn first, as it goes "underneath" the text and indicator.
if (btn->state & State_HasFocus) {
QStyleOptionFocusRect fropt;
@@ -1248,8 +1268,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect
: SE_CheckBoxFocusRect, btn, widget);
drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget);
+
+ subopt.palette.setColor(QPalette::Active, QPalette::WindowText,
+ subopt.palette.highlightedText().color());
}
- QStyleOptionButton subopt = *btn;
subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator
: SE_CheckBoxIndicator, btn, widget);
@@ -1408,7 +1430,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
} else { QCommonStyle::drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget);}
// draw the focus rect
- if (isSelected | hasFocus) {
+ if (isSelected || hasFocus ) {
QRect highlightRect = option->rect.adjusted(1,1,-1,-1);
QAbstractItemView::SelectionBehavior selectionBehavior =
itemView ? itemView->selectionBehavior() : QAbstractItemView::SelectItems;
@@ -1480,15 +1502,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
// draw the text
if (!voptAdj.text.isEmpty()) {
- if (isSelected) {
- if (qobject_cast<const QTableView *>(widget))
- voptAdj.palette.setColor(
- QPalette::Text, QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 11, 0));
- else
- voptAdj.palette.setColor(
- QPalette::Text, QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 10, 0));
- }
- painter->setPen(voptAdj.palette.text().color());
+ if (isSelected || hasFocus )
+ painter->setPen(voptAdj.palette.highlightedText().color());
+ else
+ painter->setPen(voptAdj.palette.text().color());
d->viewItemDrawText(painter, &voptAdj, textRect);
}
painter->restore();
@@ -1590,7 +1607,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const bool selected = optionTab.state & State_Selected;
if (selected)
optionTab.palette.setColor(QPalette::Active, QPalette::WindowText,
- QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 3, option));
+ optionTab.palette.highlightedText().color());
const bool verticalTabs = optionTab.shape == QTabBar::RoundedEast
|| optionTab.shape == QTabBar::RoundedWest
@@ -1723,7 +1740,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
if (!styleHint(SH_UnderlineShortcut, menuItem, widget))
text_flags |= Qt::TextHideMnemonic;
- if ((option->state & State_Selected) && (option->state & State_Enabled))
+ const bool selected = (option->state & State_Selected) && (option->state & State_Enabled);
+ if (selected)
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &optionMenuItem, widget);
@@ -1793,6 +1811,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
painter->save();
painter->setOpacity(0.5);
}
+ if (selected)
+ optionMenuItem.palette.setColor(
+ QPalette::Active, QPalette::Text, optionMenuItem.palette.highlightedText().color());
+
QCommonStyle::drawItemText(painter, textRect, text_flags,
optionMenuItem.palette, enabled,
optionMenuItem.text, QPalette::Text);
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index dca2da5..140cf43 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -3085,7 +3085,8 @@ int QTextFormatCollection::indexForFormat(const QTextFormat &format)
f.d = new QTextFormatPrivate;
f.d->resolveFont(defaultFnt);
- hashes.insert(hash, idx);
+ if (!hashes.contains(hash, idx))
+ hashes.insert(hash, idx);
} QT_CATCH(...) {
formats.pop_back();
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index 0c39f42..794863b 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -1990,16 +1990,19 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
#ifdef QT_NO_TABBAR
const int tabBarShape = 0;
#endif
- QDockAreaLayoutInfo *info = new QDockAreaLayoutInfo(sep, dockPos, o,
- tabBarShape, mainWindow);
- QDockAreaLayoutItem item(info);
+ QDockAreaLayoutItem item(new QDockAreaLayoutInfo(sep, dockPos, o,
+ tabBarShape, mainWindow));
stream >> item.pos >> item.size >> dummy >> dummy;
- if (!info->restoreState(stream, widgets, testing))
+ //we need to make sure the element is in the list so the dock widget can eventually be docked correctly
+ if (!testing)
+ item_list.append(item);
+
+ //here we need to make sure we change the item in the item_list
+ QDockAreaLayoutItem &lastItem = testing ? item : item_list.last();
+
+ if (!lastItem.subinfo->restoreState(stream, widgets, testing))
return false;
- if (!testing) {
- item_list.append(item);
- }
} else {
return false;
}
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 2c76a5c..468c111 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -134,7 +134,7 @@ void QLineEditPrivate::_q_selectionChanged()
q->initStyleOption(&opt);
bool showCursor = control->hasSelectedText() ?
q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q):
- true;
+ q->hasFocus();
setCursorVisible(showCursor);
}
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index eae97a6..e46688c 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -256,6 +256,14 @@ void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id)
{
SymbianMenuItem* menu = qt_symbian_find_menu(id, symbianMenus);
if (menu) {
+ // Normally first AddMenuItemL call for menuPane will create the item array.
+ // However if we don't have any items, we still need the item array. Otherwise
+ // menupane will crash. That's why we create item array here manually, and
+ // AddMenuItemL will then use the existing array.
+ CEikMenuPane::CItemArray* itemArray = q_check_ptr(new CEikMenuPane::CItemArray);
+ menuPane->SetItemArray(itemArray);
+ menuPane->SetItemArrayOwnedExternally(EFalse);
+
for (int i = 0; i < menu->children.count(); ++i)
QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData));
}
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp
index 28b6b8b..edef466 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -101,7 +101,6 @@ struct qt_SHMENUBARINFO
COLORREF clrBk;
};
-typedef int (WINAPI *superfunc)(int, int);
typedef BOOL (WINAPI *AygCreateMenuBar)(qt_SHMENUBARINFO*);
typedef HRESULT (WINAPI *AygEnableSoftKey)(HWND,UINT,BOOL,BOOL);
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 9092ad6..7150fb7 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -639,7 +639,7 @@ void qt_qhostinfo_clear_cache()
}
}
-void Q_NETWORK_EXPORT qt_qhostinfo_enable_cache(bool e)
+void Q_AUTOTEST_EXPORT qt_qhostinfo_enable_cache(bool e)
{
QHostInfoLookupManager* manager = theHostInfoLookupManager();
if (manager) {
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index da47f06..4a97a6f 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -516,14 +516,11 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
0.0f, -1.0f, 0.0f,
0.5f, devh + 0.5f, 1.0f);
- // The image transform is always the full transformation,
- // because it can be projective.
- imageTransform = transform * viewport;
-
- // Determine if the transformation is projective.
- bool projective = (imageTransform.m13() != 0.0f ||
- imageTransform.m23() != 0.0f ||
- imageTransform.m33() != 1.0f);
+ // Compute the path transform and determine if it is projective.
+ pathTransform = transform * viewport;
+ bool projective = (pathTransform.m13() != 0.0f ||
+ pathTransform.m23() != 0.0f ||
+ pathTransform.m33() != 1.0f);
if (projective) {
// The engine cannot do projective path transforms for us,
// so we will have to convert the co-ordinates ourselves.
@@ -531,11 +528,19 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
pathTransform = viewport;
simpleTransform = false;
} else {
- pathTransform = imageTransform;
simpleTransform = true;
}
pathTransformSet = false;
+ // The image transform is always the full transformation,
+ // because it can be projective. It also does not need the
+ // (0.5, -0.5) translation because vgDrawImage() implicitly
+ // adds 0.5 to each co-ordinate.
+ QTransform viewport2(1.0f, 0.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, devh, 1.0f);
+ imageTransform = transform * viewport2;
+
// Calculate the scaling factor to use for turning cosmetic pens
// into ordinary non-cosmetic pens.
qt_scaleForTransform(transform, &penScale);
@@ -2062,6 +2067,7 @@ void QVGPaintEngine::clip(const QPainterPath &path, Qt::ClipOperation op)
void QVGPaintEnginePrivate::ensureMask
(QVGPaintEngine *engine, int width, int height)
{
+ scissorMask = false;
if (maskIsSet) {
vgMask(VG_INVALID_HANDLE, VG_FILL_MASK, 0, 0, width, height);
maskRect = QRect();
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 537baf5..b76c6a7 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -204,21 +204,36 @@ static void initRasterFallbacksMasks(int *warningMask, int *disableMask)
{ 0, ALL }
};
- const QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'));
- const QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'));
+ QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
*warningMask = 0;
*disableMask = 0;
if (!warning.isEmpty() || !disable.isEmpty()) {
for (int i=0; operations[i].name; ++i) {
const QString name = QString::fromLatin1(operations[i].name);
- if (warning.contains(name)) {
+ int idx = warning.indexOf(name);
+ if (idx != -1) {
*warningMask |= operations[i].operation;
+ warning.erase(warning.begin() + idx);
}
- if (disable.contains(name)) {
+ idx = disable.indexOf(name);
+ if (idx != -1) {
*disableMask |= operations[i].operation;
+ disable.erase(disable.begin() + idx);
}
}
}
+ if (!warning.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(warning.join(QLatin1String("|"))));
+ }
+ if (!disable.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(disable.join(QLatin1String("|"))));
+ }
+
}
#endif
@@ -790,13 +805,14 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) {
switch (brush.style()) {
case Qt::SolidPattern: {
+ const QColor color = brush.color();
+ if (!color.isValid())
+ return;
+
if (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported
|| !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
break;
}
- const QColor color = brush.color();
- if (!color.isValid())
- return;
d->setDFBColor(color);
const QRect r = state()->matrix.mapRect(rect).toRect();
CLIPPED_PAINT(d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height()));
@@ -989,7 +1005,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
-#if (Q_DIRECTFB_VERSION >= 0x010200)
+#if (Q_DIRECTFB_VERSION >= 0x010209)
case QPainter::CompositionMode_Destination:
surface->SetPorterDuff(surface, DSPD_DST);
break;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index b5ac67d..4219f6f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -174,6 +174,8 @@ bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img)
bool QDirectFBPixmapData::fromFile(const QString &filename, const char *format,
Qt::ImageConversionFlags flags)
{
+ if (!QFile::exists(filename))
+ return false;
if (flags == Qt::AutoColor) {
if (filename.startsWith(QLatin1Char(':'))) { // resource
QFile file(filename);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index a8bdb65..51969fc 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -61,6 +61,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect
#endif
, flipFlags(flip)
, boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip)
+ , flushPending(false)
{
#ifdef QT_NO_DIRECTFB_WM
mode = Offscreen;
@@ -80,6 +81,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect
#endif
, flipFlags(flip)
, boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip)
+ , flushPending(false)
{
SurfaceFlags flags = 0;
if (!widget || widget->window()->windowOpacity() == 0xff)
@@ -299,28 +301,19 @@ void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
}
}
-static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy)
-{
- const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
- surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy);
- const DFBRegion region = { rect.x + dx, rect.y + dy, r.right() + dx, r.bottom() + dy };
- surface->Flip(surface, &region, DSFLIP_BLIT);
-}
-
bool QDirectFBWindowSurface::scroll(const QRegion &region, int dx, int dy)
{
- if (!dfbSurface || !(flipFlags & DSFLIP_BLIT) || region.isEmpty())
+ if (!dfbSurface || !(flipFlags & DSFLIP_BLIT) || region.rectCount() != 1)
return false;
- dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
- if (region.rectCount() == 1) {
- scrollSurface(dfbSurface, region.boundingRect(), dx, dy);
+ if (flushPending) {
+ dfbSurface->Flip(dfbSurface, 0, DSFLIP_BLIT);
} else {
- const QVector<QRect> rects = region.rects();
- const int n = rects.size();
- for (int i=0; i<n; ++i) {
- scrollSurface(dfbSurface, rects.at(i), dx, dy);
- }
+ flushPending = true;
}
+ dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
+ const QRect r = region.boundingRect();
+ const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
+ dfbSurface->Blit(dfbSurface, dfbSurface, &rect, r.x() + dx, r.y() + dy);
return true;
}
@@ -384,6 +377,7 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
timer.restart();
}
#endif
+ flushPending = false;
}
void QDirectFBWindowSurface::beginPaint(const QRegion &)
@@ -391,6 +385,7 @@ void QDirectFBWindowSurface::beginPaint(const QRegion &)
if (!engine) {
engine = new QDirectFBPaintEngine(this);
}
+ flushPending = true;
}
void QDirectFBWindowSurface::endPaint(const QRegion &)
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
index a6138f6..4370a8f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
@@ -114,6 +114,7 @@ private:
DFBSurfaceFlipFlags flipFlags;
bool boundingRectFlip;
+ bool flushPending;
#ifdef QT_DIRECTFB_TIMING
int frames;
QTime timer;
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index c0f866e..2261887 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -320,6 +320,16 @@ static bool qIsBlob(int t)
|| t == MYSQL_TYPE_LONG_BLOB;
}
+static bool qIsInteger(int t)
+{
+ return t == MYSQL_TYPE_TINY
+ || t == MYSQL_TYPE_SHORT
+ || t == MYSQL_TYPE_LONG
+ || t == MYSQL_TYPE_LONGLONG
+ || t == MYSQL_TYPE_INT24;
+}
+
+
void QMYSQLResultPrivate::bindBlobs()
{
int i;
@@ -368,6 +378,13 @@ bool QMYSQLResultPrivate::bindInValues()
fieldInfo->length = 0;
hasBlobs = true;
} else {
+ // fieldInfo->length specifies the display width, which may be too
+ // small to hold valid integer values (see
+ // http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html ), so
+ // always use the MAX_BIGINT_WIDTH for integer types
+ if (qIsInteger(fieldInfo->type)) {
+ fieldInfo->length = MAX_BIGINT_WIDTH;
+ }
fieldInfo->type = MYSQL_TYPE_STRING;
}
bind = &inBinds[i];
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index 430cf1a..f253c82 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -822,6 +822,9 @@ bool QSqlQuery::isForwardOnly() const
scrollable. isForwardOnly() will always return the correct status of
the result set.
+ \note Calling setForwardOnly after execution of the query will result
+ in unexpected results at best, and crashes at worst.
+
\sa isForwardOnly(), next(), seek(), QSqlResult::setForwardOnly()
*/
void QSqlQuery::setForwardOnly(bool forward)
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 0c0c31c..6382b42 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -564,6 +564,9 @@ bool QSqlResult::isForwardOnly() const
scrollable. isForwardOnly() will always return the correct status of
the result set.
+ \note Calling setForwardOnly after execution of the query will result
+ in unexpected results at best, and crashes at worst.
+
\sa isForwardOnly(), fetchNext(), QSqlQuery::setForwardOnly()
*/
void QSqlResult::setForwardOnly(bool forward)
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 8d9ae4f..0150515 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -3487,6 +3487,7 @@ QDomDocumentTypePrivate::QDomDocumentTypePrivate(QDomDocumentTypePrivate* n, boo
if (p->isNotation())
// Dont use normal insert function since we would create infinite recursion
notations->map.insertMulti(p->nodeName(), p);
+ p = p->next;
}
}
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 6ed28af..fd0b95c 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -264,16 +264,31 @@ XsdSchemaParser::XsdSchemaParser(const XsdSchemaContext::Ptr &context, const Xsd
setupBuiltinTypeNames();
}
+void XsdSchemaParser::addIncludedSchemas(const NamespaceSet &schemas)
+{
+ m_includedSchemas += schemas;
+}
+
void XsdSchemaParser::setIncludedSchemas(const NamespaceSet &schemas)
{
m_includedSchemas = schemas;
}
+void XsdSchemaParser::addImportedSchemas(const NamespaceSet &schemas)
+{
+ m_importedSchemas += schemas;
+}
+
void XsdSchemaParser::setImportedSchemas(const NamespaceSet &schemas)
{
m_importedSchemas = schemas;
}
+void XsdSchemaParser::addRedefinedSchemas(const NamespaceSet &schemas)
+{
+ m_redefinedSchemas += schemas;
+}
+
void XsdSchemaParser::setRedefinedSchemas(const NamespaceSet &schemas)
{
m_redefinedSchemas = schemas;
@@ -297,6 +312,7 @@ void XsdSchemaParser::setDocumentURI(const QUrl &uri)
// prevent to get included/imported/redefined twice
m_includedSchemas.insert(uri);
m_importedSchemas.insert(uri);
+ m_redefinedSchemas.insert(uri);
}
QUrl XsdSchemaParser::documentURI() const
@@ -594,8 +610,14 @@ void XsdSchemaParser::parseInclude()
parser.setIncludedSchemas(m_includedSchemas);
parser.setImportedSchemas(m_importedSchemas);
parser.setRedefinedSchemas(m_redefinedSchemas);
- if (!parser.parse(XsdSchemaParser::IncludeParser))
+ if (!parser.parse(XsdSchemaParser::IncludeParser)) {
return;
+ } else {
+ // add indirectly loaded schemas to the list of already loaded ones
+ addIncludedSchemas(parser.m_includedSchemas);
+ addImportedSchemas(parser.m_importedSchemas);
+ addRedefinedSchemas(parser.m_redefinedSchemas);
+ }
}
}
@@ -684,8 +706,14 @@ void XsdSchemaParser::parseImport()
parser.setIncludedSchemas(m_includedSchemas);
parser.setImportedSchemas(m_importedSchemas);
parser.setRedefinedSchemas(m_redefinedSchemas);
- if (!parser.parse(XsdSchemaParser::ImportParser))
+ if (!parser.parse(XsdSchemaParser::ImportParser)) {
return;
+ } else {
+ // add indirectly loaded schemas to the list of already loaded ones
+ addIncludedSchemas(parser.m_includedSchemas);
+ addImportedSchemas(parser.m_importedSchemas);
+ addRedefinedSchemas(parser.m_redefinedSchemas);
+ }
}
}
} else {
@@ -702,8 +730,14 @@ void XsdSchemaParser::parseImport()
parser.setIncludedSchemas(m_includedSchemas);
parser.setImportedSchemas(m_importedSchemas);
parser.setRedefinedSchemas(m_redefinedSchemas);
- if (!parser.parse(XsdSchemaParser::ImportParser))
+ if (!parser.parse(XsdSchemaParser::ImportParser)) {
return;
+ } else {
+ // add indirectly loaded schemas to the list of already loaded ones
+ addIncludedSchemas(parser.m_includedSchemas);
+ addImportedSchemas(parser.m_importedSchemas);
+ addRedefinedSchemas(parser.m_redefinedSchemas);
+ }
}
}
} else {
@@ -839,8 +873,14 @@ void XsdSchemaParser::parseRedefine()
parser.setIncludedSchemas(m_includedSchemas);
parser.setImportedSchemas(m_importedSchemas);
parser.setRedefinedSchemas(m_redefinedSchemas);
- if (!parser.parse(XsdSchemaParser::RedefineParser))
+ if (!parser.parse(XsdSchemaParser::RedefineParser)) {
return;
+ } else {
+ // add indirectly loaded schemas to the list of already loaded ones
+ addIncludedSchemas(parser.m_includedSchemas);
+ addImportedSchemas(parser.m_importedSchemas);
+ addRedefinedSchemas(parser.m_redefinedSchemas);
+ }
delete reply;
}
diff --git a/src/xmlpatterns/schema/qxsdschemaparser_p.h b/src/xmlpatterns/schema/qxsdschemaparser_p.h
index ad5e9ce..80d44a5 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser_p.h
+++ b/src/xmlpatterns/schema/qxsdschemaparser_p.h
@@ -120,20 +120,38 @@ namespace QPatternist
typedef QSet<QUrl> NamespaceSet;
/**
+ * Adds @p schemas to the list of already included schemas, so the parser
+ * can detect multiple includes of the same schema.
+ */
+ void addIncludedSchemas(const NamespaceSet &schemas);
+
+ /**
* Sets which @p schemas have been included already, so the parser
- * can detect circular includes.
+ * can detect multiple includes of the same schema.
*/
void setIncludedSchemas(const NamespaceSet &schemas);
/**
+ * Adds @p schemas to the list of already imported schemas, so the parser
+ * can detect multiple imports of the same schema.
+ */
+ void addImportedSchemas(const NamespaceSet &schemas);
+
+ /**
* Sets which @p schemas have been imported already, so the parser
* can detect circular imports.
*/
void setImportedSchemas(const NamespaceSet &schemas);
/**
+ * Adds @p schemas to the list of already redefined schemas, so the parser
+ * can detect multiple redefines of the same schema.
+ */
+ void addRedefinedSchemas(const NamespaceSet &schemas);
+
+ /**
* Sets which @p schemas have been redefined already, so the parser
- * can detect circular redefines.
+ * can detect multiple redefines of the same schema.
*/
void setRedefinedSchemas(const NamespaceSet &schemas);
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
index 42cc55b..a5b36ca 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
@@ -135,4 +135,64 @@ Q_OBJECT
}
};
+// QTBUG-8360
+namespace A {
+
+void foo()
+{
+ using namespace A;
+}
+
+void goo()
+{
+ return QObject::tr("Bla");
+}
+
+}
+
+
+namespace AA {
+namespace B {
+
+using namespace AA;
+
+namespace C {
+
+class Test : public QObject {
+ Q_OBJECT
+};
+
+}
+
+}
+
+using namespace B;
+using namespace C;
+
+void goo()
+{
+ AA::Test::tr("howdy?");
+}
+
+}
+
+
+namespace A1 {
+namespace B {
+
+class Test : public QObject {
+ Q_OBJECT
+};
+
+using namespace A1;
+
+void foo()
+{
+ B::B::B::Test::tr("yeeee-ha!");
+}
+
+}
+}
+
+
#include "main.moc"
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
index c1a34bd..94df9d3 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
@@ -2,6 +2,22 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name>A1::B::Test</name>
+ <message>
+ <location filename="main.cpp" line="191"/>
+ <source>yeeee-ha!</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>AA::B::C::Test</name>
+ <message>
+ <location filename="main.cpp" line="174"/>
+ <source>howdy?</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Class</name>
<message>
<location filename="main.cpp" line="52"/>
@@ -79,4 +95,12 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="148"/>
+ <source>Bla</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index d1b2ea5..caf08d6 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -131,6 +131,7 @@ private slots:
void setContentWhitespace_data() const;
void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const;
+ void cloneDTD_QTBUG8398() const;
void cleanupTestCase() const;
@@ -1912,5 +1913,29 @@ void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() co
QVERIFY(true);
}
+void tst_QDom::cloneDTD_QTBUG8398() const
+{
+ QString dtd("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!ENTITY secondFile SYSTEM 'second.xml'>\n"
+ "<!ENTITY thirdFile SYSTEM 'third.xml'>\n"
+ "]>\n"
+ "<first/>\n");
+ QDomDocument domDocument;
+ QVERIFY(domDocument.setContent(dtd));
+ QDomDocument domDocument2 = domDocument.cloneNode(true).toDocument();
+
+ // for some reason, our DOM implementation reverts the order of entities
+ QString expected("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!ENTITY thirdFile SYSTEM 'third.xml'>\n"
+ "<!ENTITY secondFile SYSTEM 'second.xml'>\n"
+ "]>\n"
+ "<first/>\n");
+ QString output;
+ QTextStream stream(&output);
+ domDocument2.save(stream, 0);
+ QCOMPARE(output, expected);
+}
QTEST_MAIN(tst_QDom)
#include "tst_qdom.moc"
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 41b9734..5339132 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -205,6 +205,13 @@ private slots:
void QTBUG_6618();
void QTBUG_6852_data() { generic_data("QMYSQL"); }
void QTBUG_6852();
+ void QTBUG_5765_data() { generic_data("QMYSQL"); }
+ void QTBUG_5765();
+
+#if 0
+ void benchmark_data() { generic_data(); }
+ void benchmark();
+#endif
private:
// returns all database connections
@@ -309,7 +316,14 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
<< qTableName( "blobstest" )
<< qTableName( "oraRowId" )
<< qTableName( "qtest_batch" )
- << qTableName(QLatin1String("bug6421")).toUpper();
+ << qTableName("bug6421").toUpper()
+ << qTableName("bug5765")
+ << qTableName("bug6852")
+ << qTableName( "qtest_lockedtable" )
+ << qTableName( "Planet" )
+ << qTableName( "task_250026" )
+ << qTableName( "task_234422" )
+ << qTableName("test141895");
if ( db.driverName().startsWith("QPSQL") )
tablenames << qTableName("task_233829");
@@ -320,19 +334,11 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
if ( tst_Databases::isSqlServer( db ) || db.driverName().startsWith( "QOCI" ) )
tablenames << qTableName( "qtest_longstr" );
- tablenames << qTableName( "qtest_lockedtable" );
-
- tablenames << qTableName( "Planet" );
+ if (tst_Databases::isSqlServer( db ))
+ db.exec("DROP PROCEDURE " + qTableName("test141895_proc"));
- tablenames << qTableName( "task_250026" );
- tablenames << qTableName( "task_234422" );
-
- if (tst_Databases::isSqlServer( db )) {
- QSqlQuery q( db );
- q.exec("DROP PROCEDURE " + qTableName("test141895_proc"));
- }
-
- tablenames << qTableName("test141895");
+ if (tst_Databases::isMySQL( db ))
+ db.exec("DROP PROCEDURE IF EXISTS "+qTableName("bug6852_proc"));
tst_Databases::safeDropTables( db, tablenames );
@@ -2996,10 +3002,9 @@ void tst_QSqlQuery::QTBUG_6852()
QSKIP( "Test requires MySQL >= 5.0", SkipSingle );
QSqlQuery q(db);
- QString tableName(qTableName(QLatin1String("bug6421"))), procName(qTableName(QLatin1String("bug6421_proc")));
+ QString tableName(qTableName(QLatin1String("bug6852"))), procName(qTableName(QLatin1String("bug6852_proc")));
QVERIFY_SQL(q, exec("DROP PROCEDURE IF EXISTS "+procName));
- tst_Databases::safeDropTable(db, tableName);
QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(\n"
"MainKey INT NOT NULL,\n"
"OtherTextCol VARCHAR(45) NOT NULL,\n"
@@ -3022,6 +3027,72 @@ void tst_QSqlQuery::QTBUG_6852()
QCOMPARE(q.value(1).toString(), QLatin1String("Disabled"));
}
+void tst_QSqlQuery::QTBUG_5765()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+ if ( tst_Databases::getMySqlVersion( db ).section( QChar('.'), 0, 1 ).toFloat()<4.1 )
+ QSKIP( "Test requires MySQL >= 4.1", SkipSingle );
+
+ QSqlQuery q(db);
+ QString tableName(qTableName(QLatin1String("bug5765")));
+
+ QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(testval TINYINT(1) DEFAULT 0)"));
+ q.prepare("INSERT INTO "+tableName+" SET testval = :VALUE");
+ q.bindValue(":VALUE", 1);
+ QVERIFY_SQL(q, exec());
+ q.bindValue(":VALUE", 12);
+ QVERIFY_SQL(q, exec());
+ q.bindValue(":VALUE", 123);
+ QVERIFY_SQL(q, exec());
+ QString sql="select testval from "+tableName;
+ QVERIFY_SQL(q, exec(sql));
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 1);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 12);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 123);
+ QVERIFY_SQL(q, prepare(sql));
+ QVERIFY_SQL(q, exec());
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 1);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 12);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 123);
+}
+
+#if 0
+void tst_QSqlQuery::benchmark()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+ if ( tst_Databases::getMySqlVersion( db ).section( QChar('.'), 0, 0 ).toInt()<5 )
+ QSKIP( "Test requires MySQL >= 5.0", SkipSingle );
+
+ QSqlQuery q(db);
+ QString tableName(qTableName(QLatin1String("benchmark")));
+
+ tst_Databases::safeDropTable( db, tableName );
+
+ QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(\n"
+ "MainKey INT NOT NULL,\n"
+ "OtherTextCol VARCHAR(45) NOT NULL,\n"
+ "PRIMARY KEY(`MainKey`))"));
+
+ int i=1;
+
+ QBENCHMARK {
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES("+QString::number(i)+", \"Value"+QString::number(i)+"\")"));
+ i++;
+ }
+
+ tst_Databases::safeDropTable( db, tableName );
+}
+#endif
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index a5cbbd4..54e32218 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -200,6 +200,8 @@ private slots:
void taskQTBUG_4516_clickOnRichTextLabel();
void taskQTBUG_5237_wheelEventOnHeader();
void taskQTBUG_8585_crashForNoGoodReason();
+ void taskQTBUG_7774_RtoLVisualRegionForSelection();
+ void taskQTBUG_8777_scrollToSpans();
void mouseWheel_data();
void mouseWheel();
@@ -3993,6 +3995,44 @@ void tst_QTableView::taskQTBUG_8585_crashForNoGoodReason()
}
}
+class TableView7774 : public QTableView
+{
+public:
+ QRegion visualRegionForSelection(const QItemSelection &selection) const
+ {
+ return QTableView::visualRegionForSelection(selection);
+ }
+};
+
+void tst_QTableView::taskQTBUG_7774_RtoLVisualRegionForSelection()
+{
+ TableView7774 view;
+ QStandardItemModel model(5,5);
+ view.setModel(&model);
+ view.setLayoutDirection(Qt::RightToLeft);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QItemSelectionRange range(model.index(2, 0), model.index(2, model.columnCount() - 1));
+ QItemSelection selection;
+ selection << range;
+ QRegion region = view.visualRegionForSelection(selection);
+ QCOMPARE(region.rects().at(0), view.visualRect(range.topLeft()) | view.visualRect(range.bottomRight()));
+}
+
+void tst_QTableView::taskQTBUG_8777_scrollToSpans()
+{
+ QTableWidget table(75,5);
+ for (int i=0; i<50; i++)
+ table.setSpan(2+i, 0, 1, 5);
+ table.setCurrentCell(0,2);
+ table.show();
+
+ for (int i = 0; i < 45; ++i)
+ QTest::keyClick(&table, Qt::Key_Down);
+
+ QVERIFY(table.verticalScrollBar()->value() > 10);
+}
QTEST_MAIN(tst_QTableView)
#include "tst_qtableview.moc"
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd
new file mode 100644
index 0000000..60f3e4f
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:simpleType name="testType">
+ <xsd:list itemType="xsd:int" />
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd
new file mode 100644
index 0000000..e6da433
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:import schemaLocation="indirect-import-b.xsd" namespace="http://qt.nokia.com/test2" />
+ <xsd:import schemaLocation="indirect-import-c.xsd" namespace="http://qt.nokia.com/test2" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd
new file mode 100644
index 0000000..88be377
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test2">
+ <xsd:import schemaLocation="indirect-datatype.xsd" namespace="http://qt.nokia.com/test" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd
new file mode 100644
index 0000000..88be377
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test2">
+ <xsd:import schemaLocation="indirect-datatype.xsd" namespace="http://qt.nokia.com/test" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd
new file mode 100644
index 0000000..02ca5c5
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:include schemaLocation="indirect-include-b.xsd" />
+ <xsd:include schemaLocation="indirect-include-c.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd
new file mode 100644
index 0000000..efaba74
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:include schemaLocation="indirect-datatype.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd
new file mode 100644
index 0000000..efaba74
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:include schemaLocation="indirect-datatype.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd
new file mode 100644
index 0000000..4f0804c
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:redefine schemaLocation="indirect-redefine-b.xsd" />
+ <xsd:redefine schemaLocation="indirect-redefine-c.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd
new file mode 100644
index 0000000..019a127
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:redefine schemaLocation="indirect-datatype.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd
new file mode 100644
index 0000000..019a127
--- /dev/null
+++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://qt.nokia.com/test" targetNamespace="http://qt.nokia.com/test">
+ <xsd:redefine schemaLocation="indirect-datatype.xsd" />
+</xsd:schema>
diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
index 6d4ed69..7aab47f 100644
--- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
+++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
@@ -196,6 +196,21 @@ void tst_XmlPatternsValidator::xsdSupport_data() const
<< 1
<< (QStringList() << QLatin1String("files/instance.xml"))
<< QString();
+
+ QTest::newRow("A schema with an indirectly included type")
+ << 0
+ << (QStringList() << QLatin1String("files/indirect-include-a.xsd"))
+ << QString();
+
+ QTest::newRow("A schema with an indirectly imported type")
+ << 0
+ << (QStringList() << QLatin1String("files/indirect-import-a.xsd"))
+ << QString();
+
+ QTest::newRow("A schema with an indirectly redefined type")
+ << 0
+ << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd"))
+ << QString();
}
QTEST_MAIN(tst_XmlPatternsValidator)
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
new file mode 100644
index 0000000..2cb9421
--- /dev/null
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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 test suite 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$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include <qtest.h>
+#include <QtTest/QtTest>
+#include <QFile>
+#include <QByteArray>
+#include <QBuffer>
+#include <QImageReader>
+#include <QSize>
+
+#if defined(Q_OS_SYMBIAN)
+# define SRCDIR ""
+#endif
+
+class tst_jpeg : public QObject
+{
+ Q_OBJECT
+private slots:
+ void jpegDecodingQtWebkitStyle();
+};
+
+void tst_jpeg::jpegDecodingQtWebkitStyle()
+{
+ // QtWebkit currently calls size() to get the image size for layouting purposes.
+ // Then when it is in the viewport (we assume that here) it actually gets decoded.
+ QFile inputJpeg(SRCDIR "n900.jpeg");
+ QVERIFY(inputJpeg.exists());
+ inputJpeg.open(QIODevice::ReadOnly);
+ QByteArray imageData = inputJpeg.readAll();
+ QBuffer buffer;
+ buffer.setData(imageData);
+ buffer.open(QBuffer::ReadOnly);
+ QCOMPARE(buffer.size(), qint64(19016));
+
+
+ QBENCHMARK{
+ for (int i = 0; i < 50; i++) {
+ QImageReader reader(&buffer, "jpeg");
+ QSize size = reader.size();
+ QVERIFY(!size.isNull());
+ QByteArray format = reader.format();
+ QVERIFY(!format.isEmpty());
+ QImage img = reader.read();
+ QVERIFY(!img.isNull());
+ buffer.reset();
+ }
+ }
+}
+
+QTEST_MAIN(tst_jpeg)
+
+#include "jpeg.moc"
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro
new file mode 100644
index 0000000..e106f3e
--- /dev/null
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro
@@ -0,0 +1,18 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = jpeg
+DEPENDPATH += .
+INCLUDEPATH += .
+
+CONFIG += release
+
+wince*: {
+ DEFINES += SRCDIR=\\\"\\\"
+} else:symbian {
+ # SRCDIR and SVGFILE defined in code in symbian
+}else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+}
+
+# Input
+SOURCES += jpeg.cpp
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/n900.jpeg b/tests/benchmarks/plugins/imageformats/jpeg/n900.jpeg
new file mode 100644
index 0000000..681989a
--- /dev/null
+++ b/tests/benchmarks/plugins/imageformats/jpeg/n900.jpeg
Binary files differ
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 6bd9108..2d5620e 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -260,6 +260,8 @@ private:
bool qualifyOneCallbackOwn(const Namespace *ns, void *context) const;
bool qualifyOneCallbackUsing(const Namespace *ns, void *context) const;
bool qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
+ NamespaceList *resolved, QSet<HashStringList> *visitedUsings) const;
+ bool qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
NamespaceList *resolved) const;
bool fullyQualify(const NamespaceList &namespaces, int nsCnt,
const QList<HashString> &segments, bool isDeclaration,
@@ -1036,15 +1038,16 @@ QStringList CppParser::stringListifySegments(const QList<HashString> &segments)
}
struct QualifyOneData {
- QualifyOneData(const NamespaceList &ns, int nsc, const HashString &seg, NamespaceList *rslvd)
- : namespaces(ns), nsCount(nsc), segment(seg), resolved(rslvd)
+ QualifyOneData(const NamespaceList &ns, int nsc, const HashString &seg, NamespaceList *rslvd,
+ QSet<HashStringList> *visited)
+ : namespaces(ns), nsCount(nsc), segment(seg), resolved(rslvd), visitedUsings(visited)
{}
const NamespaceList &namespaces;
int nsCount;
const HashString &segment;
NamespaceList *resolved;
- QSet<HashStringList> visitedUsings;
+ QSet<HashStringList> *visitedUsings;
};
bool CppParser::qualifyOneCallbackOwn(const Namespace *ns, void *context) const
@@ -1078,18 +1081,19 @@ bool CppParser::qualifyOneCallbackUsing(const Namespace *ns, void *context) cons
{
QualifyOneData *data = (QualifyOneData *)context;
foreach (const HashStringList &use, ns->usings)
- if (!data->visitedUsings.contains(use)) {
- data->visitedUsings.insert(use);
- if (qualifyOne(use.value(), use.value().count(), data->segment, data->resolved))
+ if (!data->visitedUsings->contains(use)) {
+ data->visitedUsings->insert(use);
+ if (qualifyOne(use.value(), use.value().count(), data->segment, data->resolved,
+ data->visitedUsings))
return true;
}
return false;
}
bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
- NamespaceList *resolved) const
+ NamespaceList *resolved, QSet<HashStringList> *visitedUsings) const
{
- QualifyOneData data(namespaces, nsCnt, segment, resolved);
+ QualifyOneData data(namespaces, nsCnt, segment, resolved, visitedUsings);
if (visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackOwn, &data))
return true;
@@ -1097,6 +1101,14 @@ bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const Has
return visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackUsing, &data);
}
+bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
+ NamespaceList *resolved) const
+{
+ QSet<HashStringList> visitedUsings;
+
+ return qualifyOne(namespaces, nsCnt, segment, resolved, &visitedUsings);
+}
+
bool CppParser::fullyQualify(const NamespaceList &namespaces, int nsCnt,
const QList<HashString> &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const
diff --git a/translations/qtconfig_ru.ts b/translations/qtconfig_ru.ts
index 334a801..7be0f04 100644
--- a/translations/qtconfig_ru.ts
+++ b/translations/qtconfig_ru.ts
@@ -892,7 +892,7 @@ p, li { white-space: pre-wrap; }
&lt;a href=&quot;http://www.kde.org&quot;&gt;http://www.kde.org&lt;/a&gt;
&lt;/p&gt;</source>
<translation>&lt;p&gt;
-&lt;a href=&quot;http://qtsoftware.com&quot;&gt;http://qtsoftware.com&lt;/a&gt;
+&lt;a href=&quot;http://qt.nokia.com&quot;&gt;http://qt.nokia.com&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://www.kde.org&quot;&gt;http://www.kde.org&lt;/a&gt;
diff --git a/translations/translations.pro b/translations/translations.pro
index f1b9c99..8f37451 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -42,5 +42,6 @@ isEmpty(vcproj) {
translations.path = $$[QT_INSTALL_TRANSLATIONS]
translations.files = $$TRANSLATIONS
translations.files ~= s,\\.ts$,.qm,g
+translations.files ~= s,^,$$OUT_PWD/,g
translations.CONFIG += no_check_exist
INSTALLS += translations