summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-24 20:19:06 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-24 20:19:06 (GMT)
commit5a7c14af3c27089b0b8698da3c689637ffaa9cfa (patch)
tree6f2d1ad02bd9721af0fe7bd92ff7c9e2e4e078e9
parent2487b9d0e183047a26dcbeb87f58b771a8e12348 (diff)
parentc9d2f14b2a814fd29c858d9519e82fc5cbc2afdf (diff)
downloadQt-5a7c14af3c27089b0b8698da3c689637ffaa9cfa.zip
Qt-5a7c14af3c27089b0b8698da3c689637ffaa9cfa.tar.gz
Qt-5a7c14af3c27089b0b8698da3c689637ffaa9cfa.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: bin/syncqt configure demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h dist/README dist/changes-3.0.0 dist/changes-3.0.0-beta1 dist/changes-4.3.0 doc/src/desktop-integration.qdoc doc/src/development/designer-manual.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/index.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/porting/porting4.qdoc doc/src/porting4-obsoletedmechanism.qdocinc doc/src/qt-webpages.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/snippets/code/src_corelib_tools_qregexp.cpp doc/src/snippets/code/src_qt3support_network_q3ftp.cpp doc/src/snippets/qstring/main.cpp doc/src/snippets/textdocument-blocks/xmlwriter.cpp doc/src/snippets/textdocument-frames/xmlwriter.cpp doc/src/snippets/textdocument-tables/xmlwriter.cpp doc/src/tech-preview/known-issues.html doc/src/topics.qdoc doc/src/xml-processing/xml-processing.qdoc examples/xml/saxbookmarks/jennifer.xbel src/3rdparty/phonon/ds9/mediaobject.cpp src/3rdparty/phonon/ds9/mediaobject.h src/corelib/io/qurl.cpp src/corelib/tools/qdumper.cpp src/corelib/xml/qxmlstream.h src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qmotifdnd_x11.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qwindowsurface_d3d.cpp src/gui/styles/qmacstyle_mac.mm src/gui/text/qtextformat.cpp src/gui/text/qtextobject_p.h src/network/access/qhttp.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/plugins/codecs/kr/qeuckrcodec.cpp src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/qt3support/network/q3http.cpp src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h src/sql/drivers/sqlite/qsql_sqlite.cpp src/svg/qsvghandler.cpp src/svg/qsvgstyle.cpp src/xmlpatterns/expr/qcastingplatform_p.h src/xmlpatterns/iterators/qcachingiterator_p.h src/xmlpatterns/parser/qquerytransformparser_p.h tests/auto/q3uridrag/tst_q3uridrag.cpp tests/auto/qcombobox/tst_qcombobox.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tests/auto/qmainwindow/tst_qmainwindow.cpp tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qurl/tst_qurl.cpp tests/auto/qvariant/tst_qvariant.cpp tests/auto/qwidget/tst_qwidget.cpp tests/auto/uic/baseline/batchtranslation.ui tests/auto/uic/baseline/batchtranslation.ui.h tests/auto/uic/baseline/config.ui tests/auto/uic/baseline/config.ui.h tests/auto/uic/baseline/finddialog.ui tests/auto/uic/baseline/finddialog.ui.h tests/auto/uic/baseline/formwindowsettings.ui tests/auto/uic/baseline/formwindowsettings.ui.h tests/auto/uic/baseline/helpdialog.ui tests/auto/uic/baseline/helpdialog.ui.h tests/auto/uic/baseline/listwidgeteditor.ui tests/auto/uic/baseline/listwidgeteditor.ui.h tests/auto/uic/baseline/mainwindowbase.ui tests/auto/uic/baseline/mainwindowbase.ui.h tests/auto/uic/baseline/newactiondialog.ui tests/auto/uic/baseline/newactiondialog.ui.h tests/auto/uic/baseline/newform.ui tests/auto/uic/baseline/newform.ui.h tests/auto/uic/baseline/orderdialog.ui tests/auto/uic/baseline/orderdialog.ui.h tests/auto/uic/baseline/paletteeditor.ui tests/auto/uic/baseline/paletteeditor.ui.h tests/auto/uic/baseline/paletteeditoradvancedbase.ui tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h tests/auto/uic/baseline/phrasebookbox.ui tests/auto/uic/baseline/phrasebookbox.ui.h tests/auto/uic/baseline/plugindialog.ui tests/auto/uic/baseline/plugindialog.ui.h tests/auto/uic/baseline/previewwidget.ui tests/auto/uic/baseline/previewwidget.ui.h tests/auto/uic/baseline/previewwidgetbase.ui tests/auto/uic/baseline/previewwidgetbase.ui.h tests/auto/uic/baseline/qfiledialog.ui tests/auto/uic/baseline/qfiledialog.ui.h tests/auto/uic/baseline/qtgradientdialog.ui tests/auto/uic/baseline/qtgradientdialog.ui.h tests/auto/uic/baseline/qtgradientviewdialog.ui tests/auto/uic/baseline/qtgradientviewdialog.ui.h tests/auto/uic/baseline/saveformastemplate.ui tests/auto/uic/baseline/saveformastemplate.ui.h tests/auto/uic/baseline/statistics.ui tests/auto/uic/baseline/statistics.ui.h tests/auto/uic/baseline/stringlisteditor.ui tests/auto/uic/baseline/stringlisteditor.ui.h tests/auto/uic/baseline/tabbedbrowser.ui tests/auto/uic/baseline/tabbedbrowser.ui.h tests/auto/uic/baseline/tablewidgeteditor.ui tests/auto/uic/baseline/tablewidgeteditor.ui.h tests/auto/uic/baseline/translatedialog.ui tests/auto/uic/baseline/translatedialog.ui.h tests/auto/uic/baseline/treewidgeteditor.ui tests/auto/uic/baseline/treewidgeteditor.ui.h tests/auto/uic/baseline/trpreviewtool.ui tests/auto/uic/baseline/trpreviewtool.ui.h tests/auto/uic3/baseline/previewwidget.ui tests/auto/uic3/baseline/previewwidget.ui.4 tests/auto/uic3/baseline/previewwidgetbase.ui tests/auto/uic3/baseline/previewwidgetbase.ui.4 tests/auto/uic3/baseline/qactivexselect.ui tests/auto/uic3/baseline/qactivexselect.ui.4 tests/auto/uiloader/baseline/batchtranslation.ui tests/auto/uiloader/baseline/config.ui tests/auto/uiloader/baseline/finddialog.ui tests/auto/uiloader/baseline/formwindowsettings.ui tests/auto/uiloader/baseline/helpdialog.ui tests/auto/uiloader/baseline/listwidgeteditor.ui tests/auto/uiloader/baseline/mainwindowbase.ui tests/auto/uiloader/baseline/newactiondialog.ui tests/auto/uiloader/baseline/newform.ui tests/auto/uiloader/baseline/orderdialog.ui tests/auto/uiloader/baseline/paletteeditor.ui tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui tests/auto/uiloader/baseline/phrasebookbox.ui tests/auto/uiloader/baseline/plugindialog.ui tests/auto/uiloader/baseline/previewwidget.ui tests/auto/uiloader/baseline/previewwidgetbase.ui tests/auto/uiloader/baseline/qfiledialog.ui tests/auto/uiloader/baseline/qtgradientdialog.ui tests/auto/uiloader/baseline/qtgradienteditor.ui tests/auto/uiloader/baseline/qtgradientviewdialog.ui tests/auto/uiloader/baseline/saveformastemplate.ui tests/auto/uiloader/baseline/statistics.ui tests/auto/uiloader/baseline/stringlisteditor.ui tests/auto/uiloader/baseline/tabbedbrowser.ui tests/auto/uiloader/baseline/tablewidgeteditor.ui tests/auto/uiloader/baseline/translatedialog.ui tests/auto/uiloader/baseline/treewidgeteditor.ui tests/auto/uiloader/baseline/trpreviewtool.ui tests/auto/windowsmobile/test/test.pro tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp tools/doxygen/config/header.html tools/doxygen/config/phonon.doxyfile tools/installer/nsis/opensource.ini tools/linguist/phrasebooks/polish.qph tools/linguist/shared/cpp.cpp tools/linguist/shared/ts.dtd tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-inc.qdocconf tools/qdoc3/test/qt.qdocconf tools/qvfb/qtopiakeysym.h tools/qvfb/qvfbx11view.cpp tools/qvfb/qvfbx11view.h tools/qvfb/x11keyfaker.cpp tools/xmlpatterns/main.cpp tools/xmlpatterns/main.h tools/xmlpatterns/qcoloringmessagehandler_p.h tools/xmlpatterns/qcoloroutput.cpp tools/xmlpatterns/qcoloroutput_p.h translations/assistant_de.ts translations/qt_ar.ts translations/qt_da.ts translations/qt_de.ts translations/qt_fr.ts translations/qt_ja_JP.ts translations/qt_ru.ts translations/qt_uk.ts translations/qt_zh_CN.ts util/qlalr/compress.cpp util/qlalr/cppgenerator.cpp util/qlalr/dotgraph.cpp util/qlalr/grammar.cpp util/qlalr/lalr.cpp util/qlalr/main.cpp util/qlalr/parsetable.cpp util/qlalr/recognizer.cpp
-rw-r--r--demos/embedded/styledemo/main.cpp4
-rw-r--r--doc/src/examples/tablet.qdoc2
-rw-r--r--src/3rdparty/phonon/ds9/ds9.desktop2
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp2
-rw-r--r--src/gui/image/qnativeimage.cpp8
-rw-r--r--src/gui/image/qpixmapcache.cpp5
-rw-r--r--src/gui/kernel/qaction.cpp5
-rw-r--r--src/gui/kernel/qapplication_x11.cpp12
-rw-r--r--src/gui/kernel/qwidget_wince.cpp2
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp12
-rw-r--r--src/gui/widgets/qmenu_mac.mm4
-rw-r--r--src/network/ssl/qsslsocket.cpp9
-rw-r--r--src/plugins/codecs/jp/qjiscodec.cpp2
-rw-r--r--src/qt3support/tools/q3garray.cpp1
-rw-r--r--src/scripttools/debugging/qscriptcompletiontask.cpp1
-rw-r--r--src/scripttools/debugging/qscriptdebugger.cpp2
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent.cpp8
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend.cpp13
-rw-r--r--src/scripttools/debugging/qscriptdebuggerevent.cpp1
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp2
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp3
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp21
-rw-r--r--src/svg/qsvghandler.cpp21
-rw-r--r--src/testlib/qtestlog.cpp4
-rw-r--r--src/tools/moc/moc.h4
-rw-r--r--src/xml/dom/qdom.cpp6
-rw-r--r--src/xmlpatterns/acceltree/qacceltree_p.h3
-rw-r--r--src/xmlpatterns/api/qabstractxmlforwarditerator_p.h2
-rw-r--r--src/xmlpatterns/functions/qsequencegeneratingfns.cpp2
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/compiler/.gitignore (renamed from tests/auto/compile/.gitignore)0
-rw-r--r--tests/auto/compiler/baseclass.cpp (renamed from tests/auto/compile/baseclass.cpp)0
-rw-r--r--tests/auto/compiler/baseclass.h (renamed from tests/auto/compile/baseclass.h)0
-rw-r--r--tests/auto/compiler/compiler.pro (renamed from tests/auto/compile/compile.pro)2
-rw-r--r--tests/auto/compiler/derivedclass.cpp (renamed from tests/auto/compile/derivedclass.cpp)0
-rw-r--r--tests/auto/compiler/derivedclass.h (renamed from tests/auto/compile/derivedclass.h)0
-rw-r--r--tests/auto/compiler/tst_compiler.cpp (renamed from tests/auto/compile/tst_compile.cpp)2
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp82
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp3
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp3
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp29
-rw-r--r--tests/auto/qtwidgets/tst_qtwidgets.cpp6
-rw-r--r--tests/auto/windowsmobile/test/testSimpleWidget_current.pngbin21940 -> 22034 bytes
-rw-r--r--tests/auto/windowsmobile/test/tst_windowsmobile.cpp12
-rw-r--r--tests/auto/windowsmobile/testQMenuBar/main.cpp2
-rw-r--r--tools/designer/src/lib/shared/previewmanager.cpp1
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp7
-rw-r--r--tools/linguist/linguist/linguist.pro3
-rw-r--r--util/qlalr/cppgenerator.h11
-rw-r--r--util/xkbdatagen/main.cpp36
51 files changed, 276 insertions, 90 deletions
diff --git a/demos/embedded/styledemo/main.cpp b/demos/embedded/styledemo/main.cpp
index 7aab532..7cb6b7f 100644
--- a/demos/embedded/styledemo/main.cpp
+++ b/demos/embedded/styledemo/main.cpp
@@ -48,8 +48,8 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(styledemo);
app.setApplicationName("style");
- app.setOrganizationName("Trolltech");
- app.setOrganizationDomain("com.trolltech");
+ app.setOrganizationName("Nokia");
+ app.setOrganizationDomain("com.nokia.qt");
StyleWidget widget;
widget.showFullScreen();
diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc
index 3b2caf3..95acc69 100644
--- a/doc/src/examples/tablet.qdoc
+++ b/doc/src/examples/tablet.qdoc
@@ -48,7 +48,7 @@
\image tabletexample.png
When you use a tablet with Qt applications, \l{QTabletEvent}s are
- genarated. You need to reimplement the
+ generated. You need to reimplement the
\l{QWidget::}{tabletEvent()} event handler if you want to handle
tablet events. Events are generated when the device used for
drawing enters and leaves the proximity of the tablet (i.e., when
diff --git a/src/3rdparty/phonon/ds9/ds9.desktop b/src/3rdparty/phonon/ds9/ds9.desktop
index 370011e..ece3c9c 100644
--- a/src/3rdparty/phonon/ds9/ds9.desktop
+++ b/src/3rdparty/phonon/ds9/ds9.desktop
@@ -5,7 +5,7 @@ MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;app
X-KDE-Library=phonon_ds9
X-KDE-PhononBackendInfo-InterfaceVersion=1
X-KDE-PhononBackendInfo-Version=0.1
-X-KDE-PhononBackendInfo-Website=http://www.trolltech.com/
+X-KDE-PhononBackendInfo-Website=http://qt.nokia.com/
InitialPreference=15
Name=DirectShow9
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 157fbe5..e459e67 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -379,6 +379,8 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
QSizeF oldSize = size();
QGraphicsLayoutItem::setGeometry(newGeom);
+ wd->invalidateCachedClipPathRecursively();
+
// Send resize event
bool resized = newGeom.size() != oldSize;
if (resized) {
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 1e1c7fd..f273c3c 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -148,11 +148,15 @@ QImage::Format QNativeImage::systemFormat()
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget)
+ : xshmimg(0), xshmpm(0)
{
if (!X11->use_mitshm) {
- xshmimg = 0;
- xshmpm = 0;
image = QImage(width, height, format);
+ // follow good coding practice and set xshminfo attributes, though values not used in this case
+ xshminfo.readOnly = true;
+ xshminfo.shmaddr = 0;
+ xshminfo.shmid = 0;
+ xshminfo.shmseg = 0;
return;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index b8d6ac1..81071ee 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -82,6 +82,11 @@ QT_BEGIN_NAMESPACE
A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of
memory.
+ The \e{Qt Quarterly} article
+ \l{http://qt.nokia.com/doc/qq/qq12-qpixmapcache.html}{Optimizing
+ with QPixmapCache} explains how to use QPixmapCache to speed up
+ applications by caching the results of painting.
+
\sa QCache, QPixmap
*/
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 00cba04..f5e1f29 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -262,6 +262,11 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
\c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}).
\value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu.
\value QuitRole This action should be placed where the Quit menu item is in the application menu.
+
+ Setting this value only has effect on items that are in the immediate menus
+ of the menubar, not the submenus of those menus. For example, if you have
+ File menu in your menubar and the File menu has a submenu, setting the
+ MenuRole for the actions in that submenu have no effect. They will never be moved.
*/
/*!
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 0d07a02..170224d 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1915,9 +1915,12 @@ void qt_init(QApplicationPrivate *priv, int,
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000
- && defaultVisual->green_mask == 0xff00
- && defaultVisual->blue_mask == 0xff);
+ X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000
+ || defaultVisual->red_mask == 0xf800)
+ && (defaultVisual->green_mask == 0xff00
+ || defaultVisual->green_mask == 0x7e0)
+ && (defaultVisual->blue_mask == 0xff
+ || defaultVisual->blue_mask == 0x1f));
}
}
#endif // QT_NO_MITSHM
@@ -5401,7 +5404,8 @@ class QSessionManagerPrivate : public QObjectPrivate
{
public:
QSessionManagerPrivate(QSessionManager* mgr, QString& id, QString& key)
- : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key), eventLoop(0) {}
+ : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key),
+ restartHint(QSessionManager::RestartIfRunning), eventLoop(0) {}
QSessionManager* sm;
QStringList restartCommand;
QStringList discardCommand;
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index bcc9cfd..fa71925 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -316,7 +316,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (desktop) {
q->setAttribute(Qt::WA_WState_Visible);
- } else if (topLevel) {
+ } else if (topLevel && !q->testAttribute(Qt::WA_DontShowOnScreen)) {
RECT cr;
GetClientRect(id, &cr);
// one cannot trust cr.left and cr.top, use a correction POINT instead
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index d1bed3e..d4488ec 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -918,7 +918,7 @@ QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItemV4 *option, in
widthUsed = qMax(widthUsed, line.naturalTextWidth());
}
textLayout.endLayout();
- const QSize size = QSizeF(widthUsed, height).toSize();
+ const QSize size(qCeil(widthUsed), qCeil(height));
return QSize(size.width() + 2 * textMargin, size.height());
}
break;
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index bf0d52b..b1e9c79 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -2449,7 +2449,16 @@ void QComboBox::showPopup()
&& !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen))
qScrollEffect(container, scrollDown ? QEffects::DownScroll : QEffects::UpScroll, 150);
#endif
+
+// Don't disable updates on Mac OS X. Windows are displayed immediately on this platform,
+// which means that the window will be visible before the call to container->show() returns.
+// If updates are disabled at this point we'll miss our chance at painting the popup
+// menu before it's shown, causing flicker since the window then displays the standard gray
+// background.
+#ifndef Q_WS_MAC
container->setUpdatesEnabled(false);
+#endif
+
container->raise();
container->show();
container->updateScrollers();
@@ -2460,7 +2469,10 @@ void QComboBox::showPopup()
? QAbstractItemView::PositionAtCenter
: QAbstractItemView::EnsureVisible);
+#ifndef Q_WS_MAC
container->setUpdatesEnabled(updatesEnabled);
+#endif
+
container->update();
#ifdef QT_KEYPAD_NAVIGATION
if (QApplication::keypadNavigationEnabled())
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index 8089473..d59e1c9 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -1361,7 +1361,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action)
if (!action->action->icon().isNull()
&& action->action->isIconVisibleInMenu()) {
data.iconType = kMenuIconRefType;
- data.iconHandle = (Handle)qt_mac_create_iconref(action->action->icon().pixmap(22, QIcon::Normal));
+ data.iconHandle = (Handle)qt_mac_create_iconref(action->action->icon().pixmap(16, QIcon::Normal));
} else {
data.iconType = kMenuNoIcon;
}
@@ -1400,7 +1400,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action)
// Cocoa icon
NSImage *nsimage = 0;
if (!action->action->icon().isNull() && action->action->isIconVisibleInMenu()) {
- nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(action->action->icon().pixmap(22, QIcon::Normal)));
+ nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(action->action->icon().pixmap(16, QIcon::Normal)));
}
[item setImage:nsimage];
[nsimage release];
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index cdbcb86..e9f62b6 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -683,7 +683,16 @@ void QSslSocket::close()
#ifdef QSSLSOCKET_DEBUG
qDebug() << "QSslSocket::close()";
#endif
+ Q_D(QSslSocket);
QTcpSocket::close();
+
+ // must be cleared, reading/writing not possible on closed socket:
+ d->readBuffer.clear();
+ d->writeBuffer.clear();
+ // for QTcpSocket this is already done because it uses the readBuffer/writeBuffer
+ // if the QIODevice it is based on
+ // ### FIXME QSslSocket should probably do similar instead of having
+ // its own readBuffer/writeBuffer
}
/*!
diff --git a/src/plugins/codecs/jp/qjiscodec.cpp b/src/plugins/codecs/jp/qjiscodec.cpp
index a495dae..3e4d5a0 100644
--- a/src/plugins/codecs/jp/qjiscodec.cpp
+++ b/src/plugins/codecs/jp/qjiscodec.cpp
@@ -41,7 +41,7 @@
// Most of the code here was originally written by Serika Kurusugawa,
// a.k.a. Junji Takagi, and is included in Qt with the author's permission
-// and the grateful thanks of the Trolltech team.
+// and the grateful thanks of the Qt team.
/*! \class QJisCodec
\reentrant
diff --git a/src/qt3support/tools/q3garray.cpp b/src/qt3support/tools/q3garray.cpp
index e4aef3d..c1360a0 100644
--- a/src/qt3support/tools/q3garray.cpp
+++ b/src/qt3support/tools/q3garray.cpp
@@ -114,6 +114,7 @@ Q3GArray::Q3GArray()
*/
Q3GArray::Q3GArray(int, int)
+ : shd(0)
{
}
diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp
index d228745..1994fb6 100644
--- a/src/scripttools/debugging/qscriptcompletiontask.cpp
+++ b/src/scripttools/debugging/qscriptcompletiontask.cpp
@@ -76,6 +76,7 @@ public:
};
QScriptCompletionTaskPrivate::QScriptCompletionTaskPrivate()
+ : cursorPosition(0), frameIndex(0), frontend(0), console(0)
{
}
diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp
index c9bc650..a316894 100644
--- a/src/scripttools/debugging/qscriptdebugger.cpp
+++ b/src/scripttools/debugging/qscriptdebugger.cpp
@@ -1019,7 +1019,7 @@ class SyncBreakpointsJob : public QScriptDebuggerCommandSchedulerJob
public:
SyncBreakpointsJob(QScriptDebuggerPrivate *debugger)
: QScriptDebuggerCommandSchedulerJob(debugger),
- m_debugger(debugger) {}
+ m_debugger(debugger), m_index(-1) {}
void start()
{
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp
index 492b79f..3fc9d7b 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent.cpp
+++ b/src/scripttools/debugging/qscriptdebuggeragent.cpp
@@ -61,11 +61,11 @@ QT_BEGIN_NAMESPACE
*/
QScriptDebuggerAgentPrivate::QScriptDebuggerAgentPrivate()
+ : state(NoState), stepDepth(0), stepCount(0),
+ targetScriptId(-1), targetLineNumber(-1), returnCounter(0),
+ nextBreakpointId(1), hitBreakpointId(0),
+ nextContextId(0), statementCounter(0)
{
- state = NoState;
- nextBreakpointId = 1;
- nextContextId = 0;
- statementCounter = 0;
}
QScriptDebuggerAgentPrivate::~QScriptDebuggerAgentPrivate()
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
index d6f63ee..63382d0 100644
--- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
@@ -131,14 +131,13 @@ private:
QScriptDebuggerBackendPrivate::QScriptDebuggerBackendPrivate()
+ : agent(0), commandExecutor(0),
+ pendingEvaluateContextIndex(-1), pendingEvaluateLineNumber(-1),
+ ignoreExceptions(false),
+ nextScriptValueIteratorId(0), nextScriptObjectSnapshotId(0),
+ eventReceiver(0),
+ q_ptr(0) // q_ptr will be set later by QScriptDebuggerBackend constructor
{
- eventReceiver = 0;
- agent = 0;
- commandExecutor = 0;
- pendingEvaluateLineNumber = -1;
- ignoreExceptions = false;
- nextScriptValueIteratorId = 0;
- nextScriptObjectSnapshotId = 0;
}
QScriptDebuggerBackendPrivate::~QScriptDebuggerBackendPrivate()
diff --git a/src/scripttools/debugging/qscriptdebuggerevent.cpp b/src/scripttools/debugging/qscriptdebuggerevent.cpp
index 5fab17e..393f7a9 100644
--- a/src/scripttools/debugging/qscriptdebuggerevent.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerevent.cpp
@@ -60,6 +60,7 @@ public:
};
QScriptDebuggerEventPrivate::QScriptDebuggerEventPrivate()
+ : type(QScriptDebuggerEvent::None)
{
}
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
index 167053d..a6096f2 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
@@ -367,7 +367,7 @@ class QScriptDebuggerScriptedConsoleCommandJobPrivate
: public QScriptDebuggerConsoleCommandJobPrivate
{
public:
- QScriptDebuggerScriptedConsoleCommandJobPrivate() {}
+ QScriptDebuggerScriptedConsoleCommandJobPrivate() : command(0), commandCount(0) {}
~QScriptDebuggerScriptedConsoleCommandJobPrivate() {}
QScriptDebuggerScriptedConsoleCommandPrivate *command;
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 372ea13..94071c9 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -1150,12 +1150,13 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
case QVariant::Time:
#ifndef QT_NO_DATESTRING
if (field.value().toTime().isValid()) {
- r = field.value().toTime().toString(Qt::ISODate);
+ r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\'');
} else
#endif
{
r = QLatin1String("NULL");
}
+ break;
case QVariant::String:
{
// Escape '\' characters
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index f45a1d3..81afbf9 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -64,6 +64,17 @@ Q_DECLARE_METATYPE(sqlite3_stmt*)
QT_BEGIN_NAMESPACE
+static QString _q_escapeIdentifier(const QString &identifier)
+{
+ QString res = identifier;
+ if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) {
+ res.replace(QLatin1Char('"'), QLatin1String("\"\""));
+ res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
+ res.replace(QLatin1Char('.'), QLatin1String("\".\""));
+ }
+ return res;
+}
+
static QVariant::Type qGetColumnType(const QString &tpName)
{
const QString typeName = tpName.toLower();
@@ -629,7 +640,7 @@ static QSqlIndex qGetTableInfo(QSqlQuery &q, const QString &tableName, bool only
schema = tableName.left(indexOfSeparator).append(QLatin1Char('.'));
table = tableName.mid(indexOfSeparator + 1);
}
- q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info ('") + table + QLatin1String("')"));
+ q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") + _q_escapeIdentifier(table) + QLatin1String(")"));
QSqlIndex ind;
while (q.next()) {
@@ -684,13 +695,7 @@ QVariant QSQLiteDriver::handle() const
QString QSQLiteDriver::escapeIdentifier(const QString &identifier, IdentifierType type) const
{
- QString res = identifier;
- if(!identifier.isEmpty() && !isIdentifierEscaped(identifier, type) ) {
- res.replace(QLatin1Char('"'), QLatin1String("\"\""));
- res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
- res.replace(QLatin1Char('.'), QLatin1String("\".\""));
- }
- return res;
+ return _q_escapeIdentifier(identifier);
}
QT_END_NAMESPACE
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 5c0eda9..b2a2cb8 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2788,19 +2788,16 @@ static QSvgNode *createSvgNode(QSvgNode *parent,
node->setHeight(int(height), type == QSvgHandler::LT_PERCENT);
}
+ QStringList viewBoxValues;
if (!viewBoxStr.isEmpty()) {
- QStringList lst = viewBoxStr.split(QLatin1Char(' '), QString::SkipEmptyParts);
- if (lst.count() != 4)
- lst = viewBoxStr.split(QLatin1Char(','), QString::SkipEmptyParts);
- int count = lst.count();
- while (count < 4) {
- lst.append(QLatin1String(""));
- count++;
- }
- QString xStr = lst.at(0).trimmed();
- QString yStr = lst.at(1).trimmed();
- QString widthStr = lst.at(2).trimmed();
- QString heightStr = lst.at(3).trimmed();
+ viewBoxStr = viewBoxStr.replace(QLatin1Char(' '), QLatin1Char(','));
+ viewBoxValues = viewBoxStr.split(QLatin1Char(','), QString::SkipEmptyParts);
+ }
+ if (viewBoxValues.count() == 4) {
+ QString xStr = viewBoxValues.at(0).trimmed();
+ QString yStr = viewBoxValues.at(1).trimmed();
+ QString widthStr = viewBoxValues.at(2).trimmed();
+ QString heightStr = viewBoxValues.at(3).trimmed();
QSvgHandler::LengthType lt;
qreal x = parseLength(xStr, lt, handler);
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 130b565..c9322e9 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -309,6 +309,7 @@ void QTestLog::stopLogging()
void QTestLog::warn(const char *msg)
{
+ QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
QTest::testLogger->addMessage(QAbstractTestLogger::Warn, msg);
@@ -316,9 +317,10 @@ void QTestLog::warn(const char *msg)
void QTestLog::info(const char *msg, const char *file, int line)
{
+ QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
+ QTEST_ASSERT(file);
- if (QTest::testLogger)
QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line);
}
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index c03e874..0f3193d 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -58,7 +58,7 @@ struct Type
enum ReferenceType { NoReference, Reference, Pointer };
inline Type() : isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {}
- inline explicit Type(const QByteArray &_name) : name(_name), isVolatile(false), firstToken(NOTOKEN), referenceType(NoReference) {}
+ inline explicit Type(const QByteArray &_name) : name(_name), isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {}
QByteArray name;
uint isVolatile : 1;
uint isScoped : 1;
@@ -139,7 +139,7 @@ struct ClassInfoDef
struct ClassDef {
ClassDef():
- hasQObject(false), hasQGadget(false), notifyableProperties(0){}
+ hasQObject(false), hasQGadget(false), notifyableProperties(0), begin(0), end(0){}
QByteArray classname;
QByteArray qualified;
QList<QPair<QByteArray, FunctionDef::Access> > superclassList;
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 0f4f3c9..7709c28 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -7372,11 +7372,9 @@ QDomComment QDomNode::toComment() const
**************************************************************/
QDomHandler::QDomHandler(QDomDocumentPrivate* adoc, bool namespaceProcessing)
+ : errorLine(0), errorColumn(0), doc(adoc), node(adoc), cdata(false),
+ nsProcessing(namespaceProcessing), locator(0)
{
- doc = adoc;
- node = doc;
- cdata = false;
- nsProcessing = namespaceProcessing;
}
QDomHandler::~QDomHandler()
diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h
index 6dadf2f..a296213 100644
--- a/src/xmlpatterns/acceltree/qacceltree_p.h
+++ b/src/xmlpatterns/acceltree/qacceltree_p.h
@@ -121,6 +121,7 @@ namespace QPatternist
class BasicNodeData
{
public:
+ /* No need to initialize the members. See AccelTreeBuilder. */
inline BasicNodeData()
{
}
@@ -209,7 +210,7 @@ namespace QPatternist
Depth m_depth;
/**
- * Technically it is sufficient with 8 bits. However, at least MSVC
+ * Technically it is sufficient with 7 bits. However, at least MSVC
* 2005 miscompiles it such that QXmlNodeModelIndex::Text becomes
* -64 instead of 64 with hilarious crashes as result.
*
diff --git a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h
index fb58a61..cbc8f59 100644
--- a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h
+++ b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h
@@ -99,7 +99,7 @@ public:
typedef QList<QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<T> > > List;
typedef QVector<QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<T> > > Vector;
- inline QAbstractXmlForwardIterator() {}
+ inline QAbstractXmlForwardIterator() : d_ptr(0) {}
virtual ~QAbstractXmlForwardIterator() {}
virtual T next() = 0;
diff --git a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp
index dc653d2..9760bdb 100644
--- a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp
+++ b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp
@@ -83,7 +83,7 @@ Item IdFN::mapToItem(const QString &id,
* - Remove invalid @c NCName
* - Split IDREFs into individual NCNames
*
- * @author Frans Englich
+ * @author Frans Englich <frans.englich@nokia.com>
*/
class StringSplitter : public QAbstractXmlForwardIterator<QString>
{
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index e16eb75..80d540f 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -8,7 +8,7 @@ TEMPLATE = subdirs
SUBDIRS += \
bic \
collections \
- compile \
+ compiler \
compilerwarnings \
exceptionsafety \
linguist \
diff --git a/tests/auto/compile/.gitignore b/tests/auto/compiler/.gitignore
index bdcee46..bdcee46 100644
--- a/tests/auto/compile/.gitignore
+++ b/tests/auto/compiler/.gitignore
diff --git a/tests/auto/compile/baseclass.cpp b/tests/auto/compiler/baseclass.cpp
index 5479532..5479532 100644
--- a/tests/auto/compile/baseclass.cpp
+++ b/tests/auto/compiler/baseclass.cpp
diff --git a/tests/auto/compile/baseclass.h b/tests/auto/compiler/baseclass.h
index 25abbfe..25abbfe 100644
--- a/tests/auto/compile/baseclass.h
+++ b/tests/auto/compiler/baseclass.h
diff --git a/tests/auto/compile/compile.pro b/tests/auto/compiler/compiler.pro
index 6c38078..c444c63 100644
--- a/tests/auto/compile/compile.pro
+++ b/tests/auto/compiler/compiler.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-SOURCES += tst_compile.cpp baseclass.cpp derivedclass.cpp
+SOURCES += tst_compiler.cpp baseclass.cpp derivedclass.cpp
HEADERS += baseclass.h derivedclass.h
QT = core
diff --git a/tests/auto/compile/derivedclass.cpp b/tests/auto/compiler/derivedclass.cpp
index 3b71861..3b71861 100644
--- a/tests/auto/compile/derivedclass.cpp
+++ b/tests/auto/compiler/derivedclass.cpp
diff --git a/tests/auto/compile/derivedclass.h b/tests/auto/compiler/derivedclass.h
index 9396ff9..9396ff9 100644
--- a/tests/auto/compile/derivedclass.h
+++ b/tests/auto/compiler/derivedclass.h
diff --git a/tests/auto/compile/tst_compile.cpp b/tests/auto/compiler/tst_compiler.cpp
index cef798a..78c1a56 100644
--- a/tests/auto/compile/tst_compile.cpp
+++ b/tests/auto/compiler/tst_compiler.cpp
@@ -653,4 +653,4 @@ void tst_Compiler::staticConstUnionWithInitializerList() const
}
QTEST_MAIN(tst_Compiler)
-#include "tst_compile.moc"
+#include "tst_compiler.moc"
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 6adcdfe..effa876 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -156,6 +156,7 @@ private slots:
void windowFlags();
void shortcutsDeletion();
void painterStateProtectionOnWindowFrame();
+ void ensureClipping();
// Task fixes
void task236127_bspTreeIndexFails();
@@ -2459,6 +2460,87 @@ void tst_QGraphicsWidget::task250119_shortcutContext()
scene.removeItem(&w_signal);
}
+class ClippingAndTransformsScene : public QGraphicsScene
+{
+public:
+ QList<QGraphicsItem *> drawnItems;
+protected:
+ void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[],
+ const QStyleOptionGraphicsItem options[], QWidget *widget = 0)
+ {
+ drawnItems.clear();
+ for (int i = 0; i < numItems; ++i)
+ drawnItems << items[i];
+ QGraphicsScene::drawItems(painter, numItems, items, options, widget);
+ }
+};
+
+class RectWidget : public QGraphicsWidget
+{
+public:
+
+ RectWidget(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsWidget(parent), mColor(color) {}
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->setBrush(QBrush(mColor));
+ painter->drawRect(boundingRect());
+ }
+
+ Qt::GlobalColor mColor;
+};
+
+class RectItem : public QGraphicsItem
+{
+public:
+
+ RectItem(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsItem(parent), mColor(color) {}
+
+ QRectF boundingRect() const
+ {return QRectF(10,10,50,50);}
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->setBrush(QBrush(mColor));
+ painter->drawRect(boundingRect());
+ }
+
+ Qt::GlobalColor mColor;
+};
+
+void tst_QGraphicsWidget::ensureClipping()
+{
+ ClippingAndTransformsScene scene;
+ scene.setSceneRect(-50, -50, 200, 200);
+
+ //A root that clip children
+ RectWidget *clipWidget = new RectWidget(Qt::black);
+ scene.addItem(clipWidget);
+
+ clipWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ //a child
+ RectWidget *childWidget = new RectWidget(Qt::red, clipWidget);
+ clipWidget->setGeometry(QRectF(10, 10, 100, 100));
+ childWidget->setGeometry(QRectF(25, 25, 50, 50));
+
+ //We put a QGraphicsItem to be sure this one is also paint
+ RectItem *childitem = new RectItem(Qt::blue, clipWidget);
+
+ QGraphicsView view(&scene);
+ view.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&view);
+#endif
+ QTest::qWait(250);
+
+ QList<QGraphicsItem *> expected;
+ expected << clipWidget << childWidget << childitem;
+ QVERIFY(scene.drawnItems.contains(clipWidget));
+ QVERIFY(scene.drawnItems.contains(childWidget));
+ QVERIFY(scene.drawnItems.contains(childitem));
+}
+
QTEST_MAIN(tst_QGraphicsWidget)
#include "tst_qgraphicswidget.moc"
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 13aa2b8..8590eac 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -266,6 +266,9 @@ tst_QMenu::addActionsAndClear()
void tst_QMenu::mouseActivation()
{
+#ifdef Q_OS_WINCE_WM
+ QSKIP("We have a separate mouseActivation test for Windows mobile.", SkipAll);
+#endif
QMenu menu;
menu.addAction("Menu Action");
menu.show();
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
index 70a198d..5cf27d3 100644
--- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
+++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
@@ -745,6 +745,9 @@ private:
void tst_QScriptEngineDebugger::multithreadedDebugging()
{
+#ifdef Q_OS_WINCE
+ QSKIP("This tests uses too much memory for Windows CE", SkipAll);
+#endif
ScriptEvaluator eval;
QThread thread;
eval.moveToThread(&thread);
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index ba5ef70..85ecf6b 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -181,6 +181,7 @@ private slots:
void ignoreSslErrorsList();
void ignoreSslErrorsListWithSlot_data();
void ignoreSslErrorsListWithSlot();
+ void readFromClosedSocket();
static void exitLoop()
{
@@ -1668,6 +1669,34 @@ void tst_QSslSocket::ignoreSslErrorsListWithSlot()
QCOMPARE(socket.waitForEncrypted(10000), expectEncryptionSuccess);
}
+// make sure a closed socket has no bytesAvailable()
+// related to https://bugs.webkit.org/show_bug.cgi?id=28016
+void tst_QSslSocket::readFromClosedSocket()
+{
+ QSslSocketPtr socket = newSocket();
+ socket->ignoreSslErrors();
+ socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
+ socket->ignoreSslErrors();
+ socket->waitForConnected();
+ socket->waitForEncrypted();
+ // provoke a response by sending a request
+ socket->write("GET /gif/fluke.gif HTTP/1.1\n");
+ socket->write("Host: ");
+ socket->write(QtNetworkSettings::serverName().toLocal8Bit().constData());
+ socket->write("\n");
+ socket->write("\n");
+ socket->waitForBytesWritten();
+ socket->waitForReadyRead();
+ QVERIFY(socket->state() == QAbstractSocket::ConnectedState);
+ QVERIFY(socket->bytesAvailable());
+ socket->close();
+ QVERIFY(!socket->bytesAvailable());
+ QVERIFY(!socket->bytesToWrite());
+ socket->waitForDisconnected();
+ QVERIFY(!socket->bytesAvailable());
+ QVERIFY(!socket->bytesToWrite());
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslSocket)
diff --git a/tests/auto/qtwidgets/tst_qtwidgets.cpp b/tests/auto/qtwidgets/tst_qtwidgets.cpp
index 0ccc0aa..9473648 100644
--- a/tests/auto/qtwidgets/tst_qtwidgets.cpp
+++ b/tests/auto/qtwidgets/tst_qtwidgets.cpp
@@ -86,9 +86,9 @@ void tst_QtWidgets::snapshot()
QString filename = "qtwidgets_" + QHostInfo::localHostName() + "_" + QDateTime::currentDateTime().toString("yyyy.MM.dd_hh.mm.ss") + ".png";
QFtp ftp;
- ftp.connectToHost("kramer.troll.no");
- ftp.login("anonymous");
- ftp.cd("pics");
+ ftp.connectToHost("qt-test-server.qt-test-net");
+ ftp.login("ftptest", "password");
+ ftp.cd("qtest/pics");
ftp.put(buf.data(), filename, QFtp::Binary);
ftp.close();
diff --git a/tests/auto/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
index 5cbc2bb..09a10a3 100644
--- a/tests/auto/windowsmobile/test/testSimpleWidget_current.png
+++ b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
Binary files differ
diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
index 73ea0a6..091504c 100644
--- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
@@ -62,14 +62,14 @@ public:
#endif
}
-#ifdef Q_OS_WINCE_WM
+#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
private slots:
void testMainWindowAndMenuBar();
void testSimpleWidget();
#endif
};
-#ifdef Q_OS_WINCE_WM
+#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
bool qt_wince_is_platform(const QString &platformString) {
wchar_t tszPlatform[64];
@@ -120,8 +120,6 @@ void openMenu()
void compareScreenshots(const QString &image1, const QString &image2)
{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile", SkipAll);
QImage screenShot(image1);
QImage original(image2);
@@ -145,6 +143,9 @@ void takeScreenShot(const QString filename)
void tst_WindowsMobile::testMainWindowAndMenuBar()
{
+ if (qt_wince_is_smartphone())
+ QSKIP("This test is only for Windows Mobile", SkipAll);
+
QProcess process;
process.start("testQMenuBar.exe");
QCOMPARE(process.state(), QProcess::Running);
@@ -158,6 +159,9 @@ void tst_WindowsMobile::testMainWindowAndMenuBar()
void tst_WindowsMobile::testSimpleWidget()
{
+ if (qt_wince_is_smartphone())
+ QSKIP("This test is only for Windows Mobile", SkipAll);
+
QMenuBar menubar;
menubar.show();
QWidget maximized;
diff --git a/tests/auto/windowsmobile/testQMenuBar/main.cpp b/tests/auto/windowsmobile/testQMenuBar/main.cpp
index 4949dbb..f615c48 100644
--- a/tests/auto/windowsmobile/testQMenuBar/main.cpp
+++ b/tests/auto/windowsmobile/testQMenuBar/main.cpp
@@ -48,8 +48,6 @@
int main(int argc, char * argv[])
{
- int widgetNum = 20;
-
QList<QWidget*> widgets;
QApplication app(argc, argv);
diff --git a/tools/designer/src/lib/shared/previewmanager.cpp b/tools/designer/src/lib/shared/previewmanager.cpp
index d6e8d9a..a7d6f43 100644
--- a/tools/designer/src/lib/shared/previewmanager.cpp
+++ b/tools/designer/src/lib/shared/previewmanager.cpp
@@ -689,6 +689,7 @@ QWidget *PreviewManager::createPreview(const QDesignerFormWindowInterface *fw,
const QString title = tr("%1 - [Preview]").arg(formWidget->windowTitle());
formWidget = fakeContainer(formWidget);
+ formWidget->setWindowTitle(title);
// Clear any modality settings, child widget modalities must not be higher than parent's
formWidget->setWindowModality(Qt::NonModal);
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index 8c0d379..a0c88de 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -2825,13 +2825,6 @@ QMetaEnum QAbstractFormBuilder::toolBarAreaMetaEnum()
return metaEnum<QAbstractFormBuilderGadget>("toolBarArea");
}
-namespace {
- // set forward slashes in image path.
- inline void fixImagePath(QString &p) {
- p.replace(QLatin1Char('\\'), QLatin1Char('/'));
- }
-}
-
/*!
\internal
Return paths of an icon.
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 890b252..314163c 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
LANGUAGE = C++
DESTDIR = ../../../bin
-QT += xml \
- network
+QT += xml
CONFIG += qt \
warn_on \
diff --git a/util/qlalr/cppgenerator.h b/util/qlalr/cppgenerator.h
index ce81a73..4531b8d 100644
--- a/util/qlalr/cppgenerator.h
+++ b/util/qlalr/cppgenerator.h
@@ -58,23 +58,22 @@ public:
aut (aut),
verbose (verbose),
debug_info (false),
- troll_copyright (false) {}
+ copyright (false) {}
void operator () ();
bool debugInfo () const { return debug_info; }
void setDebugInfo (bool d) { debug_info = d; }
- bool trollCopyright () const { return troll_copyright; }
- void setTrollCopyright (bool t) { troll_copyright = t; }
+ void setCopyright (bool t) { copyright = t; }
private:
void generateDecl (QTextStream &out);
void generateImpl (QTextStream &out);
QString debugInfoProt() const;
- QString trollCopyrightHeader() const;
- QString trollPrivateCopyrightHeader() const;
+ QString copyrightHeader() const;
+ QString privateCopyrightHeader() const;
private:
static QString startIncludeGuard(const QString &fileName);
@@ -89,7 +88,7 @@ private:
int terminal_count;
int non_terminal_count;
bool debug_info;
- bool troll_copyright;
+ bool copyright;
Compress compressed_action;
Compress compressed_goto;
QVector<int> count;
diff --git a/util/xkbdatagen/main.cpp b/util/xkbdatagen/main.cpp
index eaf770b..80b8981 100644
--- a/util/xkbdatagen/main.cpp
+++ b/util/xkbdatagen/main.cpp
@@ -417,13 +417,41 @@ int main(int argc, char **argv)
printf("/****************************************************************************\n"
"**\n"
"** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"
- "** This file is part of the $MODULE$ of the Qt Toolkit.\n"
+ "** This file is part of the QtGui module of the Qt Toolkit.\n"
"**\n"
- "** $TROLLTECH_DUAL_LICENSE$\n"
+ "** $QT_BEGIN_LICENSE:LGPL$\n"
+ "** No Commercial Usage\n"
+ "** This file contains pre-release code and may not be distributed.\n"
+ "** You may use this file in accordance with the terms and conditions\n"
+ "** contained in the either Technology Preview License Agreement or the\n"
+ "** Beta Release License Agreement.\n"
"**\n"
- "** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE\n"
- "** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n"
+ "** GNU Lesser General Public License Usage\n"
+ "** Alternatively, this file may be used under the terms of the GNU Lesser\n"
+ "** General Public License version 2.1 as published by the Free Software\n"
+ "** Foundation and appearing in the file LICENSE.LGPL included in the\n"
+ "** packaging of this file. Please review the following information to\n"
+ "** ensure the GNU Lesser General Public License version 2.1 requirements\n"
+ "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
+ "**\n"
+ "** In addition, as a special exception, Nokia gives you certain\n"
+ "** additional rights. These rights are described in the Nokia Qt LGPL\n"
+ "** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this\n"
+ "** package.\n"
+ "**\n"
+ "** GNU General Public License Usage\n"
+ "** Alternatively, this file may be used under the terms of the GNU\n"
+ "** General Public License version 3.0 as published by the Free Software\n"
+ "** Foundation and appearing in the file LICENSE.GPL included in the\n"
+ "** packaging of this file. Please review the following information to\n"
+ "** ensure the GNU General Public License version 3.0 requirements will be\n"
+ "** met: http://www.gnu.org/copyleft/gpl.html.\n"
+ "**\n"
+ "** If you are unsure which license is appropriate for your use, please\n"
+ "** contact the sales department at http://qt.nokia.com/contact.\n"
+ "** $QT_END_LICENSE$\n"
"**\n"
"****************************************************************************/\n"
"\n"