summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/browser/browser.pro2
-rw-r--r--demos/qtdemo/colors.cpp2
-rw-r--r--demos/qtdemo/mainwindow.cpp10
-rw-r--r--demos/qtdemo/qtdemo.pro4
-rw-r--r--demos/spreadsheet/spreadsheet.pro2
-rw-r--r--dist/changes-4.5.219
-rw-r--r--doc/src/qthelp.qdoc95
-rw-r--r--doc/src/tutorials/addressbook.qdoc10
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp4
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp3
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp9
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp2
-rw-r--r--mkspecs/features/silent.prf2
-rw-r--r--projects.pro5
-rw-r--r--qmake/generators/makefile.cpp1
-rw-r--r--qmake/generators/metamakefile.cpp13
-rw-r--r--qmake/project.cpp8
-rw-r--r--src/3rdparty/phonon/qt7/quicktimevideoplayer.mm3
-rw-r--r--src/gui/dialogs/qfiledialog_p.h3
-rw-r--r--src/gui/dialogs/qinputdialog.cpp2
-rw-r--r--src/gui/image/qimage.cpp5
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_x11.cpp8
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp14
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp20
-rw-r--r--src/gui/painting/qpaintengine_x11_p.h1
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp36
-rw-r--r--src/network/ssl/qsslcertificate.cpp4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp7
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h4
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp23
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h23
-rw-r--r--src/phonon/phonon.pro2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp23
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp17
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp35
-rw-r--r--tests/arthur/common/common.pri2
-rw-r--r--tests/arthur/datagenerator/datagenerator.pro4
-rw-r--r--tests/arthur/htmlgenerator/htmlgenerator.pro4
-rw-r--r--tests/arthur/performancediff/performancediff.pro4
-rw-r--r--tests/arthur/shower/shower.pro4
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp49
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp15
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp28
-rw-r--r--tests/auto/qmake/tst_qmake.cpp3
-rw-r--r--tests/auto/selftests/tst_selftests.cpp2
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp94
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp2
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp3
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp4
-rw-r--r--tools/linguist/linguist/messageeditor.cpp2
-rw-r--r--tools/linguist/shared/numerus.cpp5
-rw-r--r--tools/qdoc3/test/standalone-eclipse-integration.qdocconf2
-rw-r--r--translations/assistant_adp_de.qmbin23139 -> 0 bytes
-rw-r--r--translations/assistant_adp_ja.qmbin18357 -> 0 bytes
-rw-r--r--translations/assistant_adp_pl.qmbin22726 -> 0 bytes
-rw-r--r--translations/assistant_adp_zh_CN.qmbin16631 -> 0 bytes
-rw-r--r--translations/assistant_adp_zh_TW.qmbin16555 -> 0 bytes
-rw-r--r--translations/assistant_de.qmbin18688 -> 0 bytes
-rw-r--r--translations/assistant_pl.qmbin18457 -> 0 bytes
-rw-r--r--translations/assistant_zh_CN.qmbin15595 -> 0 bytes
-rw-r--r--translations/assistant_zh_TW.qmbin15567 -> 0 bytes
-rw-r--r--translations/designer_de.qmbin151189 -> 0 bytes
-rw-r--r--translations/designer_ja.qmbin105573 -> 0 bytes
-rw-r--r--translations/designer_pl.qmbin150544 -> 0 bytes
-rw-r--r--translations/designer_zh_CN.qmbin113745 -> 0 bytes
-rw-r--r--translations/designer_zh_TW.qmbin113449 -> 0 bytes
-rw-r--r--translations/linguist_de.qmbin45915 -> 0 bytes
-rw-r--r--translations/linguist_ja.qmbin36145 -> 0 bytes
-rw-r--r--translations/linguist_pl.qmbin50952 -> 0 bytes
-rw-r--r--translations/linguist_zh_CN.qmbin33492 -> 0 bytes
-rw-r--r--translations/linguist_zh_TW.qmbin33735 -> 0 bytes
-rw-r--r--translations/qt_ar.qmbin58499 -> 0 bytes
-rw-r--r--translations/qt_de.qmbin181348 -> 0 bytes
-rw-r--r--translations/qt_es.qmbin117693 -> 0 bytes
-rw-r--r--translations/qt_fr.qmbin148544 -> 0 bytes
-rw-r--r--translations/qt_help_de.qmbin9583 -> 0 bytes
-rw-r--r--translations/qt_help_pl.qmbin9058 -> 0 bytes
-rw-r--r--translations/qt_help_zh_CN.qmbin6434 -> 0 bytes
-rw-r--r--translations/qt_help_zh_TW.qmbin6384 -> 0 bytes
-rw-r--r--translations/qt_iw.qmbin55269 -> 0 bytes
-rw-r--r--translations/qt_ja_JP.qmbin64337 -> 0 bytes
-rw-r--r--translations/qt_pl.qmbin143971 -> 0 bytes
-rw-r--r--translations/qt_pt.qmbin78828 -> 0 bytes
-rw-r--r--translations/qt_ru.qmbin107081 -> 0 bytes
-rw-r--r--translations/qt_sk.qmbin79787 -> 0 bytes
-rw-r--r--translations/qt_sv.qmbin73493 -> 0 bytes
-rw-r--r--translations/qt_uk.qmbin81429 -> 0 bytes
-rw-r--r--translations/qt_zh_CN.qmbin118981 -> 0 bytes
-rw-r--r--translations/qt_zh_TW.qmbin118967 -> 0 bytes
-rw-r--r--translations/qtconfig_pl.qmbin17940 -> 0 bytes
-rw-r--r--translations/qtconfig_zh_CN.qmbin21688 -> 0 bytes
-rw-r--r--translations/qtconfig_zh_TW.qmbin20262 -> 0 bytes
-rw-r--r--translations/qvfb_pl.qmbin4742 -> 0 bytes
-rw-r--r--translations/qvfb_zh_CN.qmbin4853 -> 0 bytes
-rw-r--r--translations/qvfb_zh_TW.qmbin4853 -> 0 bytes
-rw-r--r--translations/translations.pri38
-rw-r--r--translations/translations.pro41
108 files changed, 504 insertions, 263 deletions
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
index d970f99..13e8a1d 100644
--- a/demos/browser/browser.pro
+++ b/demos/browser/browser.pro
@@ -86,6 +86,6 @@ wince*: {
# install
target.path = $$[QT_INSTALL_DEMOS]/browser
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls data
sources.path = $$[QT_INSTALL_DEMOS]/browser
INSTALLS += target sources
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index b82de2f..eaef058 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -328,7 +328,7 @@ void Colors::detectSystemResources()
#if defined(Q_WS_X11)
// check if X render is present:
QPixmap tmp(1, 1);
- if (!tmp.x11PictureHandle()){
+ if (!tmp.x11PictureHandle() && tmp.paintEngine()->type() == QPaintEngine::X11){
Colors::xRenderPresent = false;
if (Colors::verbose)
qDebug("- X render not present");
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 858d389..6207607 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -185,6 +185,7 @@ void MainWindow::switchTimerOnOff(bool on)
if (on && !Colors::noTimerUpdate){
this->useTimer = true;
+ this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
this->fpsTime = QTime::currentTime();
this->updateTimer.start(int(1000 / Colors::fps));
}
@@ -256,6 +257,7 @@ void MainWindow::tick()
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->tick();
+ this->viewport()->update();
if (this->useTimer)
this->updateTimer.start(int(1000 / Colors::fps));
}
@@ -423,7 +425,9 @@ void MainWindow::focusInEvent(QFocusEvent *)
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->pause(false);
- this->switchTimerOnOff(true);
+ int code = MenuManager::instance()->currentMenuCode;
+ if (code == MenuManager::ROOT || code == MenuManager::MENU1)
+ this->switchTimerOnOff(true);
this->pausedLabel->setRecursiveVisible(false);
}
@@ -436,7 +440,9 @@ void MainWindow::focusOutEvent(QFocusEvent *)
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->pause(true);
- this->switchTimerOnOff(false);
+ int code = MenuManager::instance()->currentMenuCode;
+ if (code == MenuManager::ROOT || code == MenuManager::MENU1)
+ this->switchTimerOnOff(false);
this->pausedLabel->setRecursiveVisible(true);
}
diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro
index 2534b75..163ed17 100644
--- a/demos/qtdemo/qtdemo.pro
+++ b/demos/qtdemo/qtdemo.pro
@@ -1,6 +1,8 @@
CONFIG += assistant help x11inc
TARGET = qtdemo
-DESTDIR = $$QT_BUILD_TREE/bin
+DEMO_DESTDIR = $$QT_BUILD_TREE
+isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../..
+DESTDIR = $$DEMO_DESTDIR/bin
OBJECTS_DIR = .obj
MOC_DIR = .moc
INSTALLS += target sources
diff --git a/demos/spreadsheet/spreadsheet.pro b/demos/spreadsheet/spreadsheet.pro
index b62f244..6ed0016 100644
--- a/demos/spreadsheet/spreadsheet.pro
+++ b/demos/spreadsheet/spreadsheet.pro
@@ -27,7 +27,7 @@ build_all:!build_pass {
# install
target.path = $$[QT_INSTALL_DEMOS]/spreadsheet
-sources.files = $$SOURCES $$RESOURCES *.pro images
+sources.files = $$SOURCES $$RESOURCES *.pro images $$HEADERS
sources.path = $$[QT_INSTALL_DEMOS]/spreadsheet
INSTALLS += target sources
diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2
index 6049a4d..bc07c14 100644
--- a/dist/changes-4.5.2
+++ b/dist/changes-4.5.2
@@ -82,6 +82,12 @@ Third party components
* [252068] QFileDialog with QSortFilterProxyModel crashes
* [254490] QFileDialog selectFile doesn't clear the selection if we call it several times.
+- QGtkStyle
+ * [250731] Fixed a build issue with glib version lower than 2.3.2
+ * [254342] Fixed a potential crash when system theme changes occur.
+ * [254614] Fixed an assert or warning related to GtkEntry focus handling
+ reported with certain versions of Gtk+.
+
- QMacStyle
* [253339] Don't draw arrows on toolbuttons that have a menu and text only.
* [252301] Ensure that small and mini spin boxes are drawn correctly.
@@ -92,6 +98,13 @@ Third party components
- QFontDialog
* [252000] Ensure that QFontDialog::getFont() works on Mac OS X.
+- QGraphicsItem
+ * [197802] Dont show children when parent is not visible
+ * [252913] QGraphicsItem::setOpacity(0.0) does not trigger an update
+
+- QGraphicsView
+ * [253415] Reset the 'connectedToScene' flag when changing the scene of a view
+
- QGraphicsWidget
* Fixed a bug with Qt::WidgetWithChildren shortcut context.
@@ -213,6 +226,10 @@ Third party components
* [248848] Fixed an issue that would cause QIcon::pixmap() to reparse the
SVG file, even though there was a cached pixmap for that size available.
+- QToolButton
+ * [252554] Fixed a problem where text labels would be partially clipped
+ when using Qt::ToolButtonTextUnderIcon.
+
****************************************************************************
* Database Drivers *
****************************************************************************
@@ -240,6 +257,8 @@ legacy freetype headers.
BGR color layout.
[196152] Fixed a problem with QPixmap::toImage() on big endian systems that
would cause the R and B channels to be swapped for 32 bit pixmaps.
+[251928] Made the file dialog show suffixes if no filter name is provided
+when using the GTK+ file dialog.
Qt for Windows
--------------
diff --git a/doc/src/qthelp.qdoc b/doc/src/qthelp.qdoc
index 05bf3e3..2182606 100644
--- a/doc/src/qthelp.qdoc
+++ b/doc/src/qthelp.qdoc
@@ -96,7 +96,7 @@
generation of the compressed help file.
As already mentioned, the Qt compressed help file contains all
- data, so there is no need any longer to ship all single html
+ data, so there is no need any longer to ship all single html
files. Instead, only the compressed help file and optionally the
collection file has to be distributed. The collection file is
optional since any existing collection file, e.g. from an older
@@ -211,7 +211,7 @@
\section2 Using QHelpEngine API
Instead of showing the help in an external application like the
- Qt Assistant, it is also possible to embed the online help in
+ Qt Assistant, it is also possible to embed the online help in
the application. The contents can then be retrieved via the
QHelpEngine class and can be displayed in nearly any form.
Showing it in a QTextBrowser is probably the most common way, but
@@ -238,7 +238,7 @@
Qt Commercial Edition licensees that wish to distribute applications that
use these features of the QtHelp module need to be aware of their
- obligations under the GNU Lesser General Public License (LGPL).
+ obligations under the GNU Lesser General Public License (LGPL).
Developers using the Open Source Edition can choose to redistribute
the module under the appropriate version of the GNU LGPL; version 2.1
@@ -269,23 +269,23 @@
/*!
\page qthelpproject.html
\title Qt Help Project
-
+
A Qt help project collects all data necessary to generate a
compressed help file. Along with the actual help data, like
the table of contents, index keywords and help documents, it
contains some extra information like a namespace to identify
the help file. One help project stands for one documentation,
e.g. the Qt Assistant manual.
-
+
\section1 Qt Help Project File Format
-
+
The file format is XML based. For a better understanding of
the format we'll discuss the following example:
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 7
-
+
\section2 Namespace
-
+
To enable the QHelpEngine to retrieve the proper documentation to
a given link, every documentation set has to have a unique
identifier. A unique identifier makes is also possible for the
@@ -293,10 +293,10 @@
on its file name. The Qt help system uses a namespace as identifier
which is defined by the mandatory namespace tags. In the example
above, the namespace is "mycompany.com.myapplication.1_0".
-
+
\target Virtual Folders
\section2 Virtual Folders
-
+
Having a namespace for every documentation naturally means that
the documentation sets are quite separated. From the help engines
point of view this is beneficial, but from the documentors view
@@ -304,84 +304,86 @@
manual to another without having to specify absolute links. To
solve this problem, the help system introduced the concept of
virtual folders.
-
+
A virtual folder will become the root directory of all files
referenced in a compressed help file. When two documentations
share the same virtual folder, they can use relative paths when
defining hyperlinks pointing to the other documentation. If a
file is contained in both documentations or manuals, the one
from the current manual has precedence over the other.
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 8
-
+
The above example specifies 'doc' as virtual folder. If another
manual, e.g. for a small helper tool for 'My Application'
specifies the same folder, it is sufficient to write
'doc.html#section1' to reference the first section in the
'My Application' manual.
-
+
The virtual folder tag is mandatory and the folder must not
contain any '/'.
-
+
\target Custom Filters
\section2 Custom Filters
-
+
Next in the Qt help project file are the optional definitions of
- custom filters. A custom filter contains a list of filter
+ custom filters. A custom filter contains a list of filter
attributes which will be used later to display only the documentation
which has all those attributes assigned to. So, when setting the
current filter in the QHelpEngine to "My Application 1.0" only
the documentation which has "myapp" and "1.0" set as filter
attributes will be shown.
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 9
-
+
It is possible to define any number of custom filters in a help
project file. Important to know is, that the filter attributes have
not to be specified in the same project file; they can be defined
in any other help file. The definition of a filter attributes
takes place by specifying them in a filter section.
-
+
\target Filter Section
- \section2 Filter Section
-
+ \section2 Filter Section
+
A filter section contains the actual documentation. One Qt help project
file may contain more than one filter sections. Every filter section
consists of four parts, the filter attributes section, the table of
contents, the keywords and the files list. In theory all parts are
optional but not specifying anything there will result in an empty
documentation.
-
+
\section3 Filter Attributes
-
+
Every filter section should have filter attributes assigned to it, to
enable documentation filtering. If no filter attribute is defined, the
documentation will only be shown if no filtering occurs, meaning the
current custom filter in the QHelpEngine does not contain any filter
attributes.
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 10
-
+
In this case, the filter attributes 'myapp' and '1.0' are assigned
to the filter section, i.e. all contents specified in this section
will only be shown if the current custom filter has 'myapp' or '1.0'
or both as filter attributes.
-
+
\section3 Table of contents
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 11
-
+
One section tag represents one item in the table of contents. The
sections can be nested to any degree, but from a users perspective
- it shouldn't be more than four or five levels. A section is defined
- by its title and reference. The reference, like all file references
- in a Qt help project file are relative to the help project file
- itself.
-
+ it should not be more than four or five levels. A section is defined
+ by its title and reference. The reference, like all file references in a Qt
+ help project, are relative to the help project file itself.
+ \note The referenced files must be inside the same directory (or within a
+ subdirectory) as the help project file. An absolute file path is not supported
+ either.
+
\section3 Keywords
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 12
-
+
The keyword section lists all keywords of this filter section. A
keyword consists basically of a name and a file reference. If the
attribute 'name' is used then the keyword specified there will appear in
@@ -389,15 +391,18 @@
If 'id' is used, the keyword does not appear in the index and is
only accessible via the linksForIdentifier() function of the
QHelpEngineCore. 'name' and 'id' can be specified at the same time.
-
+
\section3 Files
-
+
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 13
-
+
Finally, the actual documentation files have to be listed. Make sure
- that all files neccessary to display the help are mentioned, i.e.
- stylesheets or similar files need to be there as well. All listed files
- will be compressed and written to the Qt compressed help file. So, in the
- end, one single Qt help file contains all documentation files along with
- the contents and indices.
+ that all files neccessary to display the help are mentioned, i.e.
+ stylesheets or similar files need to be there as well. The file, like all
+ file references in a Qt help project, are relative to the help project file
+ itself. All listed files will be compressed and written to the Qt compressed
+ help file. So, in the end, one single Qt help file contains all
+ documentation files along with the contents and indices. \note The
+ referenced files must be inside the same directory (or within a subdirectory)
+ as the help project file. An absolute file path is not supported either.
*/
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
index 465eb91..ec5ea67 100644
--- a/doc/src/tutorials/addressbook.qdoc
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -646,11 +646,11 @@
\snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
- For \c NavigationMode, however, we include conditions within the
- parameters of the QPushButton::setEnabled(). This is to ensure that
- the \c editButton and \c removeButton push buttons are enabled when there
- is at least one contact in the address book; \c nextButton and \c previousButton
- are only enabled when there is more than one contact in the address book.
+ For \c NavigationMode, however, we include conditions within the parameters
+ of the QPushButton::setEnabled() function. This is to ensure that
+ \c editButton and \c removeButton are enabled when there is at least one
+ contact in the address book; \c nextButton and \c previousButton are only
+ enabled when there is more than one contact in the address book.
\snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index 49c5206..332e808 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -125,8 +125,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
- tr("Please enter a name and adderss."));
- return;
+ tr("Please enter a name and address."));
}
if (!contacts.contains(name)) {
@@ -136,7 +135,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
if (contacts.isEmpty()) {
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index 95def9c..06f8a09 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -135,7 +135,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
@@ -147,7 +146,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
//! [submitContact() function part1]
//! [submitContact() function part2]
@@ -162,7 +160,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 5afb6b8..af3c2d0 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -142,7 +142,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -154,7 +153,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -167,7 +165,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index b7cd446..5f31c99 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -148,7 +148,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -160,7 +159,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -173,7 +171,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index 2f81d2b..8be4d2b 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -150,7 +150,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -162,7 +161,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -175,7 +173,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index aeb7224..a6628df 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -69,16 +69,15 @@ MainWindow::MainWindow()
setWindowTitle(tr("Traffic Info Oslo"));
- QTimer *timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation()));
- timer->start(1000*60*5);
-
const QSettings settings("Qt Software", "trafficinfo");
m_station = StationInformation(settings.value("stationId", "03012130").toString(),
settings.value("stationName", "Nydalen [T-bane] (OSL)").toString());
m_lines = settings.value("lines", QStringList()).toStringList();
- updateTimeInformation();
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation()));
+ timer->start(1000*60*5);
+ QMetaObject::invokeMethod(this, SLOT(updateTimeInformation()), Qt::QueuedConnection);
}
MainWindow::~MainWindow()
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
index 54ed904..6c3846b 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
@@ -125,7 +125,7 @@ StationDialog::StationDialog(const QString &name, const QStringList &lineNumbers
m_ui.m_line4->setText(lineNumbers.at(i));
}
- searchStations();
+ QMetaObject::invokeMethod(this, SLOT(searchStations()), Qt::QueuedConnection);
}
StationInformation StationDialog::selectedStation() const
diff --git a/mkspecs/features/silent.prf b/mkspecs/features/silent.prf
index 66b4bb7..141e6bf 100644
--- a/mkspecs/features/silent.prf
+++ b/mkspecs/features/silent.prf
@@ -1,6 +1,6 @@
!macx-xcode {
QMAKE_CC = @echo compiling $< && $$QMAKE_CC
QMAKE_CXX = @echo compiling $< && $$QMAKE_CXX
- QMAKE_LINK = @echo linking $@ && $$QMAKE_LINK
+ !contains(QMAKE_LINK, "@:"):QMAKE_LINK = @echo linking $@ && $$QMAKE_LINK
QMAKE_LINK_SHLIB = @echo linking $@ && $$QMAKE_LINK_SHLIB
}
diff --git a/projects.pro b/projects.pro
index 3817792..68608a2 100644
--- a/projects.pro
+++ b/projects.pro
@@ -37,7 +37,10 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
} else:isEqual(PROJECT, docs) {
contains(QT_BUILD_PARTS, tools):include(doc/doc.pri)
} else:isEqual(PROJECT, translations) {
- contains(QT_BUILD_PARTS, tools):include(translations/translations.pri)
+ contains(QT_BUILD_PARTS, tools) {
+ include(translations/translations.pri) # ts targets
+ SUBDIRS += translations # qm build step
+ }
} else:isEqual(PROJECT, qmake) {
# SUBDIRS += qmake
} else {
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index a385748..21d5aa4 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -289,7 +289,6 @@ MakefileGenerator::initOutPaths()
if(Option::fixPathToLocalOS(d.absolutePath()) == Option::fixPathToLocalOS(Option::output_dir))
v.remove("DESTDIR");
}
- QDir::current().cd(currentDir);
}
QMakeProject
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 3f60791..1646b5b 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -289,12 +289,11 @@ SubdirsMetaMakefileGenerator::init()
if(Option::recursive) {
QString old_output_dir = QDir::cleanPath(Option::output_dir);
- if(!old_output_dir.endsWith('/'))
- old_output_dir += '/';
QString old_output = Option::output.fileName();
QString oldpwd = QDir::cleanPath(qmake_getpwd());
- if(!oldpwd.endsWith('/'))
- oldpwd += '/';
+ QString thispwd = oldpwd;
+ if(!thispwd.endsWith('/'))
+ thispwd += '/';
const QStringList &subdirs = project->values("SUBDIRS");
static int recurseDepth = -1;
++recurseDepth;
@@ -314,8 +313,8 @@ SubdirsMetaMakefileGenerator::init()
sub_name = subdir.baseName();
if(!subdir.isRelative()) { //we can try to make it relative
QString subdir_path = subdir.filePath();
- if(subdir_path.startsWith(oldpwd))
- subdir = QFileInfo(subdir_path.mid(oldpwd.length()));
+ if(subdir_path.startsWith(thispwd))
+ subdir = QFileInfo(subdir_path.mid(thispwd.length()));
}
//handle sub project
@@ -332,8 +331,6 @@ SubdirsMetaMakefileGenerator::init()
}
qmake_setpwd(sub->input_dir);
Option::output_dir = sub->output_dir;
- if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/'))
- Option::output_dir += QLatin1Char('/');
sub_proj->read(subdir.fileName());
if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n",
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 8ae0fe2..b1918c0 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -232,14 +232,6 @@ static QScriptValue qscript_projectWrapper(QScriptEngine *eng, QMakeProject *pro
return ret;
}
-static QScriptValue qscript_toArray(QScriptEngine *eng, const QStringList &elts)
-{
- QScriptValue a = eng->newArray();
- for (int i = 0; i < elts.count(); ++i)
- a.setProperty(i, QScriptValue(eng, elts.at(i)));
- return a;
-}
-
QT_END_NAMESPACE
#endif
diff --git a/src/3rdparty/phonon/qt7/quicktimevideoplayer.mm b/src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
index 9a3c811..23c76e3 100644
--- a/src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
+++ b/src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
@@ -1106,7 +1106,8 @@ NSString* QuickTimeVideoPlayer::pathToCompactDisc()
{
PhononAutoReleasePool pool;
NSArray *devices = [[NSWorkspace sharedWorkspace] mountedRemovableMedia];
- for (NSString *dev in devices) {
+ for (unsigned int i=0; i<[devices count]; ++i) {
+ NSString *dev = [devices objectAtIndex:i];
if (isCompactDisc(dev))
return [dev retain];
}
diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h
index ab4199e..a393ec7 100644
--- a/src/gui/dialogs/qfiledialog_p.h
+++ b/src/gui/dialogs/qfiledialog_p.h
@@ -275,7 +275,10 @@ public:
// data
QStringList watching;
QFileSystemModel *model;
+
+#ifndef QT_NO_COMPLETER
QFSCompletor *completer;
+#endif //QT_NO_COMPLETER
QFileDialog::FileMode fileMode;
QFileDialog::AcceptMode acceptMode;
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index 30f3151..289459c 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -1249,9 +1249,9 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
QInputDialog dialog(parent, flags);
dialog.setWindowTitle(title);
dialog.setLabelText(label);
+ dialog.setDoubleDecimals(decimals);
dialog.setDoubleRange(min, max);
dialog.setDoubleValue(value);
- dialog.setDoubleDecimals(decimals);
int ret = dialog.exec();
if (ok)
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 0377ca7..75538a8 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4281,6 +4281,11 @@ QImage QImage::mirrored(bool horizontal, bool vertical) const
int h = d->height;
// Create result image, copy colormap
QImage result(d->width, d->height, d->format);
+
+ // check if we ran out of of memory..
+ if (!result.d)
+ return QImage();
+
result.d->colortable = d->colortable;
result.d->has_alpha_clut = d->has_alpha_clut;
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index cbb1f45..4ab653d 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -3565,10 +3565,12 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
#if !defined(QT_NO_WHEELEVENT) || !defined(QT_NO_TABLETEVENT)
else if (
# ifndef QT_NO_WHEELEVENT
- e->type() == QEvent::Wheel ||
+ e->type() == QEvent::Wheel
+# else
+ false
# endif
# ifndef QT_NO_TABLETEVENT
- e->type() == QEvent::TabletMove
+ || e->type() == QEvent::TabletMove
|| e->type() == QEvent::TabletPress
|| e->type() == QEvent::TabletRelease
# endif
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 8ebea19..720f5c3 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -2103,14 +2103,6 @@ void qt_init(QApplicationPrivate *priv, int,
X11->xfixes_major = major;
}
}
- if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) {
- const unsigned long eventMask =
- XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask;
- X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0),
- XA_PRIMARY, eventMask);
- X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0),
- ATOM(CLIPBOARD), eventMask);
- }
#endif // QT_NO_XFIXES
#ifndef QT_NO_XCURSOR
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
index d7eb111..b85e024 100644
--- a/src/gui/kernel/qclipboard_x11.cpp
+++ b/src/gui/kernel/qclipboard_x11.cpp
@@ -428,6 +428,20 @@ QClipboard::QClipboard(QObject *parent)
// XFixesSelectionNotify events when someone changes the
// clipboard.
(void)QApplication::desktop();
+
+#ifndef QT_NO_XFIXES
+ if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) {
+ const unsigned long eventMask =
+ XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask;
+ for (int i = 0; i < X11->screenCount; ++i) {
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ XA_PRIMARY, eventMask);
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ ATOM(CLIPBOARD), eventMask);
+ }
+ }
+#endif // QT_NO_XFIXES
+
if (X11->time == CurrentTime) {
// send a dummy event to myself to get the timestamp from X11.
qt_init_timestamp_data data;
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index d5fdd93..db73c07 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5635,8 +5635,8 @@ bool QWidget::hasFocus() const
called from focusOutEvent() or focusInEvent(), you may get an
infinite recursion.
- \sa hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(),
- setFocusPolicy(), QApplication::focusWidget(), grabKeyboard(),
+ \sa focus(), hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(),
+ setFocusPolicy(), focusWidget(), QApplication::focusWidget(), grabKeyboard(),
grabMouse(), {Keyboard Focus}
*/
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 3d0a1b7..854bbaf 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -1496,23 +1496,23 @@ QCoreGraphicsPaintEnginePrivate::setStrokePen(const QPen &pen)
for(int i = 0; i < customs.size(); ++i)
linedashes.append(customs.at(i));
} else if(pen.style() == Qt::DashLine) {
- linedashes.append(3);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
} else if(pen.style() == Qt::DotLine) {
linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(2);
} else if(pen.style() == Qt::DashDotLine) {
- linedashes.append(3);
- linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
} else if(pen.style() == Qt::DashDotDotLine) {
- linedashes.append(3);
- linedashes.append(1);
- linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
}
const CGFloat cglinewidth = pen.widthF() <= 0.0f ? 1.0f : float(pen.widthF());
for(int i = 0; i < linedashes.size(); ++i) {
diff --git a/src/gui/painting/qpaintengine_x11_p.h b/src/gui/painting/qpaintengine_x11_p.h
index f277eeb..f3dd283 100644
--- a/src/gui/painting/qpaintengine_x11_p.h
+++ b/src/gui/painting/qpaintengine_x11_p.h
@@ -153,6 +153,7 @@ public:
txop = QTransform::TxNone;
has_clipping = false;
render_hints = 0;
+ xform_scale = 1;
#ifndef QT_NO_XRENDER
tessellator = 0;
#endif
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 74eacf6..3999d48 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -849,7 +849,7 @@ void QCommonStylePrivate::lookupIconTheme() const
dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
dataDirs += QLatin1Char(':') + QApplicationPrivate::kdeHome() + QLatin1String("/share");
dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
- QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'));
+ QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'), QString::SkipEmptyParts);
foreach (const QString &dirName, kdeDirs)
dataDirs.append(QLatin1Char(':') + dirName + QLatin1String("/share"));
iconDirs = dataDirs.split(QLatin1Char(':'));
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index cf40ad8..1cb806d 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -855,6 +855,24 @@ void QTextDocumentLayoutPrivate::drawBorder(QPainter *painter, const QRectF &rec
void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFrame *frame, QTextFrameData *fd, const QRectF &clip, const QRectF &rect) const
{
+
+ const QBrush bg = frame->frameFormat().background();
+ if (bg != Qt::NoBrush) {
+ QRectF bgRect = rect;
+ bgRect.adjust((fd->leftMargin + fd->border).toReal(),
+ (fd->topMargin + fd->border).toReal(),
+ - (fd->rightMargin + fd->border).toReal(),
+ - (fd->bottomMargin + fd->border).toReal());
+
+ QRectF gradientRect; // invalid makes it default to bgRect
+ QPointF origin = bgRect.topLeft();
+ if (!frame->parentFrame()) {
+ bgRect = clip;
+ gradientRect.setWidth(painter->device()->width());
+ gradientRect.setHeight(painter->device()->height());
+ }
+ fillBackground(painter, bgRect, bg, origin, gradientRect);
+ }
if (fd->border != 0) {
painter->save();
painter->setBrush(Qt::lightGray);
@@ -875,24 +893,6 @@ void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFra
painter->restore();
}
-
- const QBrush bg = frame->frameFormat().background();
- if (bg != Qt::NoBrush) {
- QRectF bgRect = rect;
- bgRect.adjust((fd->leftMargin + fd->border).toReal(),
- (fd->topMargin + fd->border).toReal(),
- - (fd->rightMargin + fd->border).toReal(),
- - (fd->bottomMargin + fd->border).toReal());
-
- QRectF gradientRect; // invalid makes it default to bgRect
- QPointF origin = bgRect.topLeft();
- if (!frame->parentFrame()) {
- bgRect = clip;
- gradientRect.setWidth(painter->device()->width());
- gradientRect.setHeight(painter->device()->height());
- }
- fillBackground(painter, bgRect, bg, origin, gradientRect);
- }
}
static void adjustContextSelectionsForCell(QAbstractTextDocumentLayout::PaintContext &cell_context,
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 7ee0f07..1403b26 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -362,7 +362,7 @@ QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubje
if (!d->x509)
return result;
- STACK *altNames = (STACK *)q_X509_get_ext_d2i(d->x509, NID_subject_alt_name, 0, 0);
+ STACK_OF(GENERAL_NAME) *altNames = (STACK_OF(GENERAL_NAME)*)q_X509_get_ext_d2i(d->x509, NID_subject_alt_name, 0, 0);
if (altNames) {
for (int i = 0; i < q_sk_GENERAL_NAME_num(altNames); ++i) {
@@ -383,7 +383,7 @@ QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubje
else if (genName->type == GEN_EMAIL)
result.insert(QSsl::EmailEntry, altName);
}
- q_sk_free(altNames);
+ q_sk_free((STACK*)altNames);
}
return result;
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 0a049b8..4a50c5b 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1557,7 +1557,7 @@ void QSslSocket::startServerEncryption()
{
Q_D(QSslSocket);
if (d->mode != UnencryptedMode) {
- qWarning("QSslSocket::startClientEncryption: cannot start handshake on non-plain connection");
+ qWarning("QSslSocket::startServerEncryption: cannot start handshake on non-plain connection");
return;
}
#ifdef QSSLSOCKET_DEBUG
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 4017c4d..d71682a 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -888,7 +888,14 @@ QSslCipher QSslSocketBackendPrivate::sessionCipher() const
{
if (!ssl || !ctx)
return QSslCipher();
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ // FIXME This is fairly evil, but needed to keep source level compatibility
+ // with the OpenSSL 0.9.x implementation at maximum -- some other functions
+ // don't take a const SSL_CIPHER* when they should
+ SSL_CIPHER *sessionCipher = const_cast<SSL_CIPHER *>(q_SSL_get_current_cipher(ssl));
+#else
SSL_CIPHER *sessionCipher = q_SSL_get_current_cipher(ssl);
+#endif
return sessionCipher ? QSslCipher_from_SSL_CIPHER(sessionCipher) : QSslCipher();
}
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index f53d4e8..dc649e3 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -78,6 +78,10 @@
#include <openssl/x509v3.h>
#include <openssl/x509_vfy.h>
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+typedef _STACK STACK;
+#endif
+
QT_BEGIN_NAMESPACE
class QSslSocketBackendPrivate : public QSslSocketPrivate
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 42c09f5..feec0a7 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -144,7 +144,11 @@ DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return 0, return)
+#else
DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
+#endif
DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
@@ -157,7 +161,11 @@ DEFINEFUNC(int, SSL_CTX_check_private_key, SSL_CTX *a, a, return -1, return)
#endif
DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG)
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+DEFINEFUNC(SSL_CTX *, SSL_CTX_new, const SSL_METHOD *a, a, return 0, return)
+#else
DEFINEFUNC(SSL_CTX *, SSL_CTX_new, SSL_METHOD *a, a, return 0, return)
+#endif
DEFINEFUNC2(int, SSL_CTX_set_cipher_list, SSL_CTX *a, a, const char *b, b, return -1, return)
DEFINEFUNC(int, SSL_CTX_set_default_verify_paths, SSL_CTX *a, a, return -1, return)
DEFINEFUNC3(void, SSL_CTX_set_verify, SSL_CTX *a, a, int b, b, int (*c)(int, X509_STORE_CTX *), c, return, DUMMYARG)
@@ -174,7 +182,11 @@ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return 0, r
#else
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, SSL *a, a, return 0, return)
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return 0, return)
+#else
DEFINEFUNC(SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return 0, return)
+#endif
DEFINEFUNC2(int, SSL_get_error, SSL *a, a, int b, b, return -1, return)
DEFINEFUNC(STACK_OF(X509) *, SSL_get_peer_cert_chain, SSL *a, a, return 0, return)
DEFINEFUNC(X509 *, SSL_get_peer_certificate, SSL *a, a, return 0, return)
@@ -192,6 +204,16 @@ DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG
DEFINEFUNC(void, SSL_set_accept_state, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(void, SSL_set_connect_state, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, return)
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#else
DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
@@ -200,6 +222,7 @@ DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, retu
DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC3(int, SSL_write, SSL *a, a, const void *b, b, int c, c, return -1, return)
DEFINEFUNC2(int, X509_cmp, X509 *a, a, X509 *b, b, return -1, return)
#ifndef SSLEAY_MACROS
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index c6ae91e..bf5cfbb 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -256,7 +256,11 @@ int q_RAND_status();
void q_RSA_free(RSA *a);
void q_sk_free(STACK *a);
int q_sk_num(STACK *a);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+void * q_sk_value(STACK *a, int b);
+#else
char * q_sk_value(STACK *a, int b);
+#endif
int q_SSL_accept(SSL *a);
int q_SSL_clear(SSL *a);
char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c);
@@ -269,7 +273,11 @@ int q_SSL_CTX_check_private_key(SSL_CTX *a);
#endif
long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d);
void q_SSL_CTX_free(SSL_CTX *a);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
+#else
SSL_CTX *q_SSL_CTX_new(SSL_METHOD *a);
+#endif
int q_SSL_CTX_set_cipher_list(SSL_CTX *a, const char *b);
int q_SSL_CTX_set_default_verify_paths(SSL_CTX *a);
void q_SSL_CTX_set_verify(SSL_CTX *a, int b, int (*c)(int, X509_STORE_CTX *));
@@ -286,7 +294,11 @@ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
#else
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(SSL *a);
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+#else
SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+#endif
int q_SSL_get_error(SSL *a, int b);
STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a);
X509 *q_SSL_get_peer_certificate(SSL *a);
@@ -304,6 +316,16 @@ void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
void q_SSL_set_accept_state(SSL *a);
void q_SSL_set_connect_state(SSL *a);
int q_SSL_shutdown(SSL *a);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+const SSL_METHOD *q_SSLv2_client_method();
+const SSL_METHOD *q_SSLv3_client_method();
+const SSL_METHOD *q_SSLv23_client_method();
+const SSL_METHOD *q_TLSv1_client_method();
+const SSL_METHOD *q_SSLv2_server_method();
+const SSL_METHOD *q_SSLv3_server_method();
+const SSL_METHOD *q_SSLv23_server_method();
+const SSL_METHOD *q_TLSv1_server_method();
+#else
SSL_METHOD *q_SSLv2_client_method();
SSL_METHOD *q_SSLv3_client_method();
SSL_METHOD *q_SSLv23_client_method();
@@ -312,6 +334,7 @@ SSL_METHOD *q_SSLv2_server_method();
SSL_METHOD *q_SSLv3_server_method();
SSL_METHOD *q_SSLv23_server_method();
SSL_METHOD *q_TLSv1_server_method();
+#endif
int q_SSL_write(SSL *a, const void *b, int c);
int q_X509_cmp(X509 *a, X509 *b);
#ifdef SSLEAY_MACROS
diff --git a/src/phonon/phonon.pro b/src/phonon/phonon.pro
index ec7e46a..9e7879f 100644
--- a/src/phonon/phonon.pro
+++ b/src/phonon/phonon.pro
@@ -1,5 +1,5 @@
TARGET = phonon
-include($$QT_SOURCE_TREE/src/qbase.pri)
+include(../qbase.pri)
PHONON_MAJOR_VERSION = $${QT_MAJOR_VERSION}
PHONON_MINOR_VERSION = 3
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 2fb533a..5be4d47 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -532,7 +532,9 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
d->prepareForBlit(QDirectFBScreen::hasAlpha(imgSurface));
d->blit(r, imgSurface, sr);
if (release) {
+#if (Q_DIRECTFB_VERSION >= 0x010000)
imgSurface->ReleaseSource(imgSurface);
+#endif
imgSurface->Release(imgSurface);
}
#endif
@@ -897,7 +899,9 @@ void QDirectFBPaintEnginePrivate::end()
{
lockedMemory = 0;
dfbDevice = 0;
+#if (Q_DIRECTFB_VERSION >= 0x010000)
surface->ReleaseSource(surface);
+#endif
surface->SetClip(surface, NULL);
surface = 0;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 18754f5..8184073 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -225,7 +225,9 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
const DFBRectangle blitRect = { rect.x(), rect.y(),
rect.width(), rect.height() };
DFBResult result = dfbSurface->Blit(dfbSurface, src, &blitRect, 0, 0);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
dfbSurface->ReleaseSource(dfbSurface);
+#endif
if (result != DFB_OK) {
DirectFBError("QDirectFBPixmapData::copy()", result);
invalidate();
@@ -316,8 +318,9 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform,
const DFBRectangle destRect = { 0, 0, size.width(), size.height() };
data->dfbSurface->StretchBlit(data->dfbSurface, dfbSurface, 0, &destRect);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
data->dfbSurface->ReleaseSource(data->dfbSurface);
-
+#endif
return QPixmap(data);
}
@@ -336,7 +339,9 @@ QImage QDirectFBPixmapData::toImage() const
imgSurface->SetBlittingFlags(imgSurface, DSBLIT_NOFX);
}
imgSurface->Blit(imgSurface, dfbSurface, 0, 0, 0);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
imgSurface->ReleaseSource(imgSurface);
+#endif
imgSurface->Release(imgSurface);
return ret;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 9e35a66..f694ed9 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -196,7 +196,9 @@ IDirectFBSurface *QDirectFBScreen::copyDFBSurface(IDirectFBSurface *src,
surface->SetBlittingFlags(surface, flags);
surface->Blit(surface, src, 0, 0, 0);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
surface->ReleaseSource(surface);
+#endif
return surface;
}
@@ -317,7 +319,9 @@ IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img,
DFBResult result = dfbSurface->Blit(dfbSurface, imgSurface, 0, 0, 0);
if (result != DFB_OK)
DirectFBError("QDirectFBScreen::copyToDFBSurface()", result);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
dfbSurface->ReleaseSource(dfbSurface);
+#endif
imgSurface->Release(imgSurface);
#else // QT_NO_DIRECTFB_PREALLOCATED
Q_ASSERT(image.format() == pixmapFormat);
@@ -388,10 +392,12 @@ DFBSurfacePixelFormat QDirectFBScreen::getSurfacePixelFormat(QImage::Format form
#endif
case QImage::Format_RGB16:
return DSPF_RGB16;
+#if (Q_DIRECTFB_VERSION >= 0x010000)
case QImage::Format_ARGB6666_Premultiplied:
return DSPF_ARGB6666;
case QImage::Format_RGB666:
return DSPF_RGB18;
+#endif
case QImage::Format_RGB32:
return DSPF_RGB32;
case QImage::Format_ARGB32_Premultiplied:
@@ -423,10 +429,12 @@ QImage::Format QDirectFBScreen::getImageFormat(IDirectFBSurface *surface)
return QImage::Format_RGB555;
case DSPF_RGB16:
return QImage::Format_RGB16;
+#if (Q_DIRECTFB_VERSION >= 0x010000)
case DSPF_ARGB6666:
return QImage::Format_ARGB6666_Premultiplied;
case DSPF_RGB18:
return QImage::Format_RGB666;
+#endif
case DSPF_RGB32:
return QImage::Format_RGB32;
case DSPF_ARGB: {
@@ -778,9 +786,13 @@ static const FlagDescription blitDescriptions[] = {
{ " DSBLIT_DST_PREMULTIPLY", DSBLIT_DST_PREMULTIPLY },
{ " DSBLIT_DEMULTIPLY", DSBLIT_DEMULTIPLY },
{ " DSBLIT_DEINTERLACE", DSBLIT_DEINTERLACE },
+#if (Q_DIRECTFB_VERSION >= 0x000923)
{ " DSBLIT_SRC_PREMULTCOLOR", DSBLIT_SRC_PREMULTCOLOR },
{ " DSBLIT_XOR", DSBLIT_XOR },
+#endif
+#if (Q_DIRECTFB_VERSION >= 0x010000)
{ " DSBLIT_INDEX_TRANSLATION", DSBLIT_INDEX_TRANSLATION },
+#endif
{ 0, 0 }
};
@@ -798,6 +810,7 @@ static const FlagDescription drawDescriptions[] = {
+#if (Q_DIRECTFB_VERSION >= 0x000923)
static const QByteArray flagDescriptions(uint mask, const FlagDescription *flags)
{
#ifdef QT_NO_DEBUG
@@ -818,9 +831,6 @@ static const QByteArray flagDescriptions(uint mask, const FlagDescription *flags
return (QLatin1Char(' ') + list.join(QLatin1String("|"))).toLatin1();
#endif
}
-
-
-
static void printDirectFBInfo(IDirectFB *fb, IDirectFBSurface *primarySurface)
{
DFBResult result;
@@ -845,6 +855,7 @@ static void printDirectFBInfo(IDirectFB *fb, IDirectFBSurface *primarySurface)
dev.drawing_flags, ::flagDescriptions(dev.drawing_flags, drawDescriptions).constData(),
(dev.video_memory >> 10));
}
+#endif
static inline bool setIntOption(const QStringList &arguments, const QString &variable, int *value)
{
@@ -1039,8 +1050,10 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
setGraphicsSystem(d_ptr);
+#if (Q_DIRECTFB_VERSION >= 0x000923)
if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive))
printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface);
+#endif
return true;
}
@@ -1223,7 +1236,9 @@ void QDirectFBScreen::compose(const QRegion &region)
blit(surface->image(), offset, r);
}
}
+#if (Q_DIRECTFB_VERSION >= 0x010000)
d_ptr->dfbSurface->ReleaseSource(d_ptr->dfbSurface);
+#endif
}
// Normally, when using DirectFB to compose the windows (I.e. when
@@ -1271,7 +1286,9 @@ void QDirectFBScreen::blit(const QImage &img, const QPoint &topLeft,
return;
}
blit(src, topLeft, reg);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
d_ptr->dfbSurface->ReleaseSource(d_ptr->dfbSurface);
+#endif
src->Release(src);
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index 84199a2..c105590 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -177,11 +177,15 @@ inline bool QDirectFBScreen::hasAlpha(DFBSurfacePixelFormat format)
case DSPF_A1:
case DSPF_ARGB2554:
case DSPF_ARGB4444:
+#if (Q_DIRECTFB_VERSION >= 0x000923)
case DSPF_AYUV:
+#endif
+#if (Q_DIRECTFB_VERSION >= 0x010000)
case DSPF_A4:
case DSPF_ARGB1666:
case DSPF_ARGB6666:
case DSPF_LUT2:
+#endif
return true;
default:
return false;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 330eb88..442f8dd 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -188,14 +188,25 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect, const QRegion &mask)
if (!dfbWindow)
createWindow();
- if (isResize && isMove)
+#if (Q_DIRECTFB_VERSION >= 0x010000)
+ if (isResize && isMove) {
result = dfbWindow->SetBounds(dfbWindow, rect.x(), rect.y(),
rect.width(), rect.height());
- else if (isResize)
+ } else if (isResize) {
result = dfbWindow->Resize(dfbWindow,
rect.width(), rect.height());
- else if (isMove)
+ } else if (isMove) {
result = dfbWindow->MoveTo(dfbWindow, rect.x(), rect.y());
+ }
+#else
+ if (isResize) {
+ result = dfbWindow->Resize(dfbWindow,
+ rect.width(), rect.height());
+ }
+ if (isMove) {
+ result = dfbWindow->MoveTo(dfbWindow, rect.x(), rect.y());
+ }
+#endif
#endif
}
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index 41b247b..405a760 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -64,6 +64,7 @@ public:
}
bool load(QIODevice *device);
+ static bool findSvgTag(QIODevice *device);
QSvgRenderer *r;
QSize defaultSize;
@@ -86,6 +87,33 @@ bool QSvgIOHandlerPrivate::load(QIODevice *device)
return loaded;
}
+bool QSvgIOHandlerPrivate::findSvgTag(QIODevice *device)
+{
+ qint64 pos = device->pos();
+ device->seek(0);
+ char buffer[256];
+ const char svg_tag[] = "<svg";
+
+ while (1) {
+ int size = device->read(buffer, 256);
+ for (int i=0; i<size - 5; ++i) {
+ if (!memcmp(buffer + i, svg_tag, 4)) {
+ if (buffer[i+4] == ' ' || buffer[i+4] == '\t'
+ || buffer[i+4] == '\n' || buffer[i+4] == '\r')
+ {
+ device->seek(pos);
+ return true;
+ }
+ }
+ }
+ if (device->atEnd())
+ break;
+ device->seek(device->pos()-4);
+ }
+ device->seek(pos);
+ return false;
+}
+
QSvgIOHandler::QSvgIOHandler()
: d(new QSvgIOHandlerPrivate())
{
@@ -101,9 +129,7 @@ QSvgIOHandler::~QSvgIOHandler()
bool QSvgIOHandler::canRead() const
{
- QByteArray contents = device()->peek(80);
-
- return contents.contains("<svg");
+ return QSvgIOHandlerPrivate::findSvgTag(device());
}
@@ -182,8 +208,7 @@ bool QSvgIOHandler::supportsOption(ImageOption option) const
bool QSvgIOHandler::canRead(QIODevice *device)
{
- QByteArray contents = device->peek(80);
- return contents.contains("<svg");
+ return QSvgIOHandlerPrivate::findSvgTag(device);
}
QT_END_NAMESPACE
diff --git a/tests/arthur/common/common.pri b/tests/arthur/common/common.pri
index 58cb636..1f84904 100644
--- a/tests/arthur/common/common.pri
+++ b/tests/arthur/common/common.pri
@@ -1,7 +1,7 @@
VPATH+=$$PWD
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, opengl):DEFINES += BUILD_OPENGL
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):DEFINES += BUILD_OPENGL
SOURCES += \
xmldata.cpp \
diff --git a/tests/arthur/datagenerator/datagenerator.pro b/tests/arthur/datagenerator/datagenerator.pro
index c302969..9da6fcd 100644
--- a/tests/arthur/datagenerator/datagenerator.pro
+++ b/tests/arthur/datagenerator/datagenerator.pro
@@ -8,7 +8,9 @@ DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = ../bin
-QT += svg opengl xml qt3support
+QT += svg xml
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
+contains(QT_CONFIG, qt3support):QT += qt3support
# Input
HEADERS += datagenerator.h \
diff --git a/tests/arthur/htmlgenerator/htmlgenerator.pro b/tests/arthur/htmlgenerator/htmlgenerator.pro
index f74c460..4a1c8ba 100644
--- a/tests/arthur/htmlgenerator/htmlgenerator.pro
+++ b/tests/arthur/htmlgenerator/htmlgenerator.pro
@@ -9,7 +9,9 @@ DESTDIR = ../bin
CONFIG += console
-QT += svg opengl xml qt3support
+QT += svg xml
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
+contains(QT_CONFIG, qt3support):QT += qt3support
# Input
HEADERS += htmlgenerator.h
diff --git a/tests/arthur/performancediff/performancediff.pro b/tests/arthur/performancediff/performancediff.pro
index 1c9b9fe..15d5ec5 100644
--- a/tests/arthur/performancediff/performancediff.pro
+++ b/tests/arthur/performancediff/performancediff.pro
@@ -9,7 +9,9 @@ DESTDIR = ../bin
CONFIG += console
-QT += xml opengl svg qt3support
+QT += xml svg
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
+contains(QT_CONFIG, qt3support):QT += qt3support
# Input
HEADERS += performancediff.h
diff --git a/tests/arthur/shower/shower.pro b/tests/arthur/shower/shower.pro
index 000c6e4..c02ded0 100644
--- a/tests/arthur/shower/shower.pro
+++ b/tests/arthur/shower/shower.pro
@@ -7,7 +7,9 @@ DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = ../bin
-QT += xml opengl svg qt3support
+QT += xml svg
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
+contains(QT_CONFIG, qt3support):QT += qt3support
# Input
HEADERS += shower.h
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 816b2e8..5321348 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -2197,8 +2197,8 @@ void tst_QComboBox::noScrollbar()
{
QTableWidget *table = new QTableWidget(2,2);
QComboBox comboBox;
- comboBox.setView(table);
comboBox.setModel(table->model());
+ comboBox.setView(table);
comboBox.show();
QTest::qWait(100);
comboBox.resize(200, comboBox.height());
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 481dc6b..d2a059a 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -210,6 +210,7 @@ private slots:
void opacity_data();
void opacity();
void opacity2();
+ void opacityZeroUpdates();
void itemStacksBehindParent();
void nestedClipping();
void nestedClippingTransforms();
@@ -5798,6 +5799,54 @@ void tst_QGraphicsItem::opacity2()
QCOMPARE(grandChild->repaints, 0);
}
+void tst_QGraphicsItem::opacityZeroUpdates()
+{
+ EventTester *parent = new EventTester;
+ EventTester *child = new EventTester(parent);
+
+ child->setPos(10, 10);
+
+ QGraphicsScene scene;
+ scene.addItem(parent);
+
+ class MyGraphicsView : public QGraphicsView
+ { public:
+ int repaints;
+ QRegion paintedRegion;
+ MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {}
+ void paintEvent(QPaintEvent *e)
+ {
+ ++repaints;
+ paintedRegion += e->region();
+ QGraphicsView::paintEvent(e);
+ }
+ void reset() { repaints = 0; paintedRegion = QRegion(); }
+ };
+
+ MyGraphicsView view(&scene);
+ view.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&view);
+#endif
+ QTest::qWait(250);
+
+ view.reset();
+ parent->setOpacity(0.0);
+
+ QTest::qWait(200);
+
+ // transforming items bounding rect to view coordinates
+ const QRect childDeviceBoundingRect = child->deviceTransform(view.viewportTransform())
+ .mapRect(child->boundingRect()).toRect();
+ const QRect parentDeviceBoundingRect = parent->deviceTransform(view.viewportTransform())
+ .mapRect(parent->boundingRect()).toRect();
+
+ QRegion expectedRegion = parentDeviceBoundingRect.adjusted(-2, -2, 2, 2);
+ expectedRegion += childDeviceBoundingRect.adjusted(-2, -2, 2, 2);
+
+ QCOMPARE(view.paintedRegion, expectedRegion);
+}
+
class StacksBehindParentHelper : public QGraphicsRectItem
{
public:
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp
index 0f763fc..c635381 100644
--- a/tests/auto/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/qinputdialog/tst_qinputdialog.cpp
@@ -67,6 +67,7 @@ private slots:
void getInteger();
void getDouble_data();
void getDouble();
+ void task255502getDouble();
void getText_data();
void getText();
void getItem_data();
@@ -318,6 +319,20 @@ void tst_QInputDialog::getDouble()
delete parent;
}
+void tst_QInputDialog::task255502getDouble()
+{
+ parent = new QWidget;
+ testFunc = &tst_QInputDialog::testFuncGetDouble;
+ startTimer(0);
+ bool ok = false;
+ const double value = 0.001;
+ const double result =
+ QInputDialog::getDouble(parent, "", "", value, -1, 1, 4, &ok);
+ QVERIFY(ok);
+ QCOMPARE(result, value);
+ delete parent;
+}
+
void tst_QInputDialog::getText_data()
{
QTest::addColumn<QString>("text");
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index 615ac01..50e1ff0 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -1034,7 +1034,7 @@ void tst_QItemDelegate::editorEvent()
option.rect = rect;
option.state |= QStyle::State_Enabled;
- const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
+ const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
QPoint pos = inCheck ? qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0) : QPoint(200,200);
QEvent *event = new QMouseEvent((QEvent::Type)type,
@@ -1057,7 +1057,7 @@ void tst_QItemDelegate::enterKey_data()
QTest::addColumn<int>("widget");
QTest::addColumn<int>("key");
QTest::addColumn<bool>("expectedFocus");
-
+
QTest::newRow("lineedit enter") << 1 << int(Qt::Key_Enter) << false;
QTest::newRow("textedit enter") << 2 << int(Qt::Key_Enter) << true;
QTest::newRow("plaintextedit enter") << 3 << int(Qt::Key_Enter) << true;
@@ -1071,17 +1071,17 @@ void tst_QItemDelegate::enterKey()
QFETCH(int, widget);
QFETCH(int, key);
QFETCH(bool, expectedFocus);
-
+
QStandardItemModel model;
model.appendRow(new QStandardItem());
-
+
QListView view;
view.setModel(&model);
view.show();
QApplication::setActiveWindow(&view);
view.setFocus();
QTest::qWait(30);
-
+
struct TestDelegate : public QItemDelegate
{
int widgetType;
@@ -1089,7 +1089,7 @@ void tst_QItemDelegate::enterKey()
{
QWidget *editor = 0;
switch(widgetType) {
- case 1:
+ case 1:
editor = new QLineEdit(parent);
break;
case 2:
@@ -1103,25 +1103,25 @@ void tst_QItemDelegate::enterKey()
return editor;
}
} delegate;
-
+
delegate.widgetType = widget;
-
+
view.setItemDelegate(&delegate);
QModelIndex index = model.index(0, 0);
view.setCurrentIndex(index); // the editor will only selectAll on the current index
view.edit(index);
QTest::qWait(30);
-
+
QList<QWidget*> lineEditors = qFindChildren<QWidget *>(view.viewport(), QString::fromLatin1("TheEditor"));
QCOMPARE(lineEditors.count(), 1);
-
- QWidget *editor = lineEditors.at(0);
+
+ QPointer<QWidget> editor = lineEditors.at(0);
QCOMPARE(editor->hasFocus(), true);
-
+
QTest::keyClick(editor, Qt::Key(key));
QApplication::processEvents();
-
- QCOMPARE(editor->hasFocus(), expectedFocus);
+
+ QCOMPARE(editor && editor->hasFocus(), expectedFocus);
}
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
index 1178c81..1ba81bd 100644
--- a/tests/auto/qmake/tst_qmake.cpp
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -39,13 +39,14 @@
**
****************************************************************************/
+#include <QtTest/QtTest>
+
#if !defined(QMAKE_CROSS_COMPILED)
#include "testcompiler.h"
#include <QObject>
#include <QDir>
-#include <QtTest/QtTest>
class tst_qmake : public QObject
{
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 603e730..eca9aa6 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -101,7 +101,7 @@ inline bool qCompare
variance = 0.001;
}
else if (r1.unit == "ticks") {
- variance = 0.0001;
+ variance = 0.001;
}
if (variance == 0.) {
/* No variance allowed - compare whole string */
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 03df3cc..8512adb 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -467,8 +467,9 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
emit statusChanged(tr("Insert files..."));
QList<int> filterAtts;
- foreach (QString filterAtt, filterAttributes) {
- d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable WHERE Name=?"));
+ foreach (const QString &filterAtt, filterAttributes) {
+ d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable "
+ "WHERE Name=?"));
d->query->bindValue(0, filterAtt);
d->query->exec();
if (d->query->next())
@@ -482,76 +483,76 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
if (filterSetId < 0)
return false;
++filterSetId;
- foreach (int attId, filterAtts) {
- d->query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable VALUES(?, ?)"));
+ foreach (const int &attId, filterAtts) {
+ d->query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable "
+ "VALUES(?, ?)"));
d->query->bindValue(0, filterSetId);
d->query->bindValue(1, attId);
d->query->exec();
}
- QString title;
- QString charSet;
- QMap<int, QSet<int> > tmpFileFilterMap;
- QList<FileNameTableData> fileNameDataList;
- QList<QByteArray> fileDataList;
-
int tableFileId = 1;
d->query->exec(QLatin1String("SELECT MAX(Id) FROM FileDataTable"));
if (d->query->next())
tableFileId = d->query->value(0).toInt() + 1;
+ QString title;
+ QString charSet;
FileNameTableData fileNameData;
+ QList<QByteArray> fileDataList;
+ QMap<int, QSet<int> > tmpFileFilterMap;
+ QList<FileNameTableData> fileNameDataList;
int i = 0;
- foreach (QString file, files) {
- QFileInfo fi(rootPath + QDir::separator() + file);
+ foreach (const QString &file, files) {
+ const QString fileName = QDir::cleanPath(file);
+ if (fileName.startsWith(QLatin1String("../"))) {
+ emit warning(tr("The referenced file %1 must be inside or within a "
+ "subdirectory of (%2). Skipping it.").arg(fileName).arg(rootPath));
+ continue;
+ }
+
+ QFile fi(rootPath + QDir::separator() + fileName);
if (!fi.exists()) {
emit warning(tr("The file %1 does not exist! Skipping it.")
- .arg(fi.absoluteFilePath()));
+ .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName)));
continue;
}
- QFile f(fi.absoluteFilePath());
- if (!f.open(QIODevice::ReadOnly)) {
+ if (!fi.open(QIODevice::ReadOnly)) {
emit warning(tr("Cannot open file %1! Skipping it.")
- .arg(fi.absoluteFilePath()));
+ .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName)));
continue;
}
- title.clear();
- QByteArray data;
- data = f.readAll();
-
- if (fi.suffix() == QLatin1String("html") || fi.suffix() == QLatin1String("htm")) {
- charSet = QHelpGlobal::charsetFromData(data);
- QTextStream stream(&data);
- stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData()));
- title = QHelpGlobal::documentTitle(stream.readAll());
+ QByteArray data = fi.readAll();
+ if (fileName.endsWith(QLatin1String(".html"))
+ || fileName.endsWith(QLatin1String(".htm"))) {
+ charSet = QHelpGlobal::charsetFromData(data);
+ QTextStream stream(&data);
+ stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData()));
+ title = QHelpGlobal::documentTitle(stream.readAll());
} else {
title = fi.fileName();
}
- QString fName = QDir::cleanPath(file);
- if (fName.startsWith(QLatin1String("./")))
- fName = fName.mid(2);
-
int fileId = -1;
- if (!d->fileMap.contains(fName)) {
+ if (!d->fileMap.contains(fileName)) {
fileDataList.append(qCompress(data));
- fileNameData.name = fName;
+ fileNameData.name = fileName;
fileNameData.fileId = tableFileId;
fileNameData.title = title;
fileNameDataList.append(fileNameData);
- d->fileMap.insert(fName, tableFileId);
+ d->fileMap.insert(fileName, tableFileId);
d->fileFilterMap.insert(tableFileId, filterAtts.toSet());
tmpFileFilterMap.insert(tableFileId, filterAtts.toSet());
++tableFileId;
} else {
- fileId = d->fileMap.value(fName);
- foreach (int filter, filterAtts) {
+ fileId = d->fileMap.value(fileName);
+ foreach (const int &filter, filterAtts) {
if (!d->fileFilterMap.value(fileId).contains(filter)
&& !tmpFileFilterMap.value(fileId).contains(filter)) {
d->fileFilterMap[fileId].insert(filter);
@@ -565,20 +566,22 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
d->query->exec(QLatin1String("BEGIN"));
QMap<int, QSet<int> >::const_iterator it = tmpFileFilterMap.constBegin();
while (it != tmpFileFilterMap.constEnd()) {
- QSet<int>::const_iterator i = it.value().constBegin();
- while (i != it.value().constEnd()) {
- d->query->prepare(QLatin1String("INSERT INTO FileFilterTable VALUES(?, ?)"));
- d->query->bindValue(0, *i);
+ QSet<int>::const_iterator si = it.value().constBegin();
+ while (si != it.value().constEnd()) {
+ d->query->prepare(QLatin1String("INSERT INTO FileFilterTable "
+ "VALUES(?, ?)"));
+ d->query->bindValue(0, *si);
d->query->bindValue(1, it.key());
d->query->exec();
- ++i;
+ ++si;
}
++it;
}
QList<QByteArray>::const_iterator fileIt = fileDataList.constBegin();
while (fileIt != fileDataList.constEnd()) {
- d->query->prepare(QLatin1String("INSERT INTO FileDataTable VALUES (Null, ?)"));
+ d->query->prepare(QLatin1String("INSERT INTO FileDataTable VALUES "
+ "(Null, ?)"));
d->query->bindValue(0, *fileIt);
d->query->exec();
++fileIt;
@@ -586,10 +589,11 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
addProgress(d->fileStep*20.0);
}
- QList<FileNameTableData>::const_iterator fileNameIt = fileNameDataList.constBegin();
+ QList<FileNameTableData>::const_iterator fileNameIt =
+ fileNameDataList.constBegin();
while (fileNameIt != fileNameDataList.constEnd()) {
- d->query->prepare(QLatin1String("INSERT INTO FileNameTable (FolderId, Name, FileId, Title) "
- " VALUES (?, ?, ?, ?)"));
+ d->query->prepare(QLatin1String("INSERT INTO FileNameTable "
+ "(FolderId, Name, FileId, Title) VALUES (?, ?, ?, ?)"));
d->query->bindValue(0, 1);
d->query->bindValue(1, (*fileNameIt).name);
d->query->bindValue(2, (*fileNameIt).fileId);
@@ -609,8 +613,8 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
return false;
}
-bool QHelpGenerator::registerCustomFilter(const QString &filterName, const QStringList &filterAttribs,
- bool forceUpdate)
+bool QHelpGenerator::registerCustomFilter(const QString &filterName,
+ const QStringList &filterAttribs, bool forceUpdate)
{
if (!d->query)
return false;
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 9025f4f..5e7974d 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -243,7 +243,7 @@ private:
This enum type specifies the field names that are handled by the search engine.
\value DEFAULT the default field provided by the search widget, several terms should be
- splitted and stored in the wordlist except search terms enclosed in quotes.
+ split and stored in the word list except search terms enclosed in quotes.
\value FUZZY a field only provided in use with clucene. Terms should be split in seperate
words and passed to the search engine.
\value WITHOUT a field only provided in use with clucene. Terms should be split in seperate
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 52d48d5..95e458c 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -780,6 +780,9 @@ void CentralWidget::showTabBarContextMenu(const QPoint &point)
menu.addSeparator();
QAction *newBookmark = menu.addAction(tr("Add Bookmark for this Page..."));
+ const QString &url = viewer->source().toString();
+ if (url.isEmpty() || url == QLatin1String("about:blank"))
+ newBookmark->setEnabled(false);
QAction *pickedAction = menu.exec(tabBar->mapToGlobal(point));
if (pickedAction == newPage)
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 2b53f09..44ef211 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -468,7 +468,7 @@ void MainWindow::setupActions()
menu = menuBar()->addMenu(tr("&Go"));
m_homeAction = menu->addAction(tr("&Home"), m_centralWidget, SLOT(home()));
- m_homeAction->setShortcut(tr("Ctrl+Home"));
+ m_homeAction->setShortcut(tr("ALT+Home"));
m_homeAction->setIcon(QIcon(resourcePath + QLatin1String("/home.png")));
m_backAction = menu->addAction(tr("&Back"), m_centralWidget, SLOT(backward()));
@@ -748,7 +748,7 @@ void MainWindow::copyAvailable(bool yes)
void MainWindow::addNewBookmark(const QString &title, const QString &url)
{
- if (url.isEmpty())
+ if (url.isEmpty() || url == QLatin1String("about:blank"))
return;
m_bookmarkManager->showBookmarkDialog(this, title, url);
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index fb2fb1d..6351577 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -502,6 +502,8 @@ bool MessageEditor::eventFilter(QObject *o, QEvent *e)
m_pluralSource->getEditor()->copy();
return true;
}
+ } else if (ke->key() == Qt::Key_A) {
+ return true;
}
}
} else if (e->type() == QEvent::KeyPress) {
diff --git a/tools/linguist/shared/numerus.cpp b/tools/linguist/shared/numerus.cpp
index 50e85cb..c0960da 100644
--- a/tools/linguist/shared/numerus.cpp
+++ b/tools/linguist/shared/numerus.cpp
@@ -101,7 +101,7 @@ static const uchar arabicRules[] =
Q_EQ, 1, Q_NEWRULE,
Q_EQ, 2, Q_NEWRULE,
Q_MOD_100 | Q_BETWEEN, 3, 10, Q_NEWRULE,
- Q_MOD_100 | Q_NEQ, 0 };
+ Q_MOD_100 | Q_NOT | Q_BETWEEN, 0, 2 };
static const uchar tagalogRules[] =
{ Q_LEQ, 1, Q_NEWRULE,
Q_MOD_10 | Q_EQ, 4, Q_OR, Q_MOD_10 | Q_EQ, 6, Q_OR, Q_MOD_10 | Q_EQ, 9 };
@@ -127,7 +127,7 @@ static const char * const malteseForms[] =
static const char * const welshForms[] =
{ "Nullar", "Singular", "Dual", "Sexal", "Plural", 0 };
static const char * const arabicForms[] =
- { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural Form for 100, 200, ...", 0 };
+ { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural (100-102, ...)", 0 };
static const char * const tagalogForms[] =
{ "Singular", "Plural (consonant-ended)", "Plural (vowel-ended)", 0 };
static const char * const catalanForms[] = { "Singular", "Undecal (11)", "Plural", 0 };
@@ -246,6 +246,7 @@ static const QLocale::Language englishStyleLanguages[] = {
QLocale::Turkmen,
QLocale::Twi,
QLocale::Uigur,
+ QLocale::Urdu,
QLocale::Uzbek,
QLocale::Volapuk,
QLocale::Wolof,
diff --git a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf
index 127b578..3a22886 100644
--- a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf
+++ b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf
@@ -7,5 +7,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\"><a href=\"http://doc.qtsoftware.com/trademarks.html\">Trademarks</a></td>\n" \
- "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Eclipse Integration 1.4.3</div></td>\n" \
+ "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Eclipse Integration 1.5.2</div></td>\n" \
"</tr></table></div></address>"
diff --git a/translations/assistant_adp_de.qm b/translations/assistant_adp_de.qm
deleted file mode 100644
index 15ef713..0000000
--- a/translations/assistant_adp_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_adp_ja.qm b/translations/assistant_adp_ja.qm
deleted file mode 100644
index a3b4383..0000000
--- a/translations/assistant_adp_ja.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_adp_pl.qm b/translations/assistant_adp_pl.qm
deleted file mode 100644
index 1b144e1..0000000
--- a/translations/assistant_adp_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_adp_zh_CN.qm b/translations/assistant_adp_zh_CN.qm
deleted file mode 100644
index 1685e47..0000000
--- a/translations/assistant_adp_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_adp_zh_TW.qm b/translations/assistant_adp_zh_TW.qm
deleted file mode 100644
index 8e055c4..0000000
--- a/translations/assistant_adp_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_de.qm b/translations/assistant_de.qm
deleted file mode 100644
index 5b31aea..0000000
--- a/translations/assistant_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_pl.qm b/translations/assistant_pl.qm
deleted file mode 100644
index 14560b3..0000000
--- a/translations/assistant_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_zh_CN.qm b/translations/assistant_zh_CN.qm
deleted file mode 100644
index 22a770d..0000000
--- a/translations/assistant_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/assistant_zh_TW.qm b/translations/assistant_zh_TW.qm
deleted file mode 100644
index 41f320e..0000000
--- a/translations/assistant_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/designer_de.qm b/translations/designer_de.qm
deleted file mode 100644
index f9b0a03..0000000
--- a/translations/designer_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/designer_ja.qm b/translations/designer_ja.qm
deleted file mode 100644
index 6cf5f89..0000000
--- a/translations/designer_ja.qm
+++ /dev/null
Binary files differ
diff --git a/translations/designer_pl.qm b/translations/designer_pl.qm
deleted file mode 100644
index bf8d5f7..0000000
--- a/translations/designer_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/designer_zh_CN.qm b/translations/designer_zh_CN.qm
deleted file mode 100644
index 9267123..0000000
--- a/translations/designer_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/designer_zh_TW.qm b/translations/designer_zh_TW.qm
deleted file mode 100644
index fd6460d..0000000
--- a/translations/designer_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/linguist_de.qm b/translations/linguist_de.qm
deleted file mode 100644
index a39c3bf..0000000
--- a/translations/linguist_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/linguist_ja.qm b/translations/linguist_ja.qm
deleted file mode 100644
index a377318..0000000
--- a/translations/linguist_ja.qm
+++ /dev/null
Binary files differ
diff --git a/translations/linguist_pl.qm b/translations/linguist_pl.qm
deleted file mode 100644
index 2604ffe..0000000
--- a/translations/linguist_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/linguist_zh_CN.qm b/translations/linguist_zh_CN.qm
deleted file mode 100644
index d8081c5..0000000
--- a/translations/linguist_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/linguist_zh_TW.qm b/translations/linguist_zh_TW.qm
deleted file mode 100644
index 9477e56..0000000
--- a/translations/linguist_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_ar.qm b/translations/qt_ar.qm
deleted file mode 100644
index 3d55bf4..0000000
--- a/translations/qt_ar.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_de.qm b/translations/qt_de.qm
deleted file mode 100644
index 9ea09a7..0000000
--- a/translations/qt_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_es.qm b/translations/qt_es.qm
deleted file mode 100644
index 0fa1226..0000000
--- a/translations/qt_es.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_fr.qm b/translations/qt_fr.qm
deleted file mode 100644
index 5553086..0000000
--- a/translations/qt_fr.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_help_de.qm b/translations/qt_help_de.qm
deleted file mode 100644
index e3d8d87..0000000
--- a/translations/qt_help_de.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_help_pl.qm b/translations/qt_help_pl.qm
deleted file mode 100644
index bf7fd10..0000000
--- a/translations/qt_help_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_help_zh_CN.qm b/translations/qt_help_zh_CN.qm
deleted file mode 100644
index 11748b7..0000000
--- a/translations/qt_help_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_help_zh_TW.qm b/translations/qt_help_zh_TW.qm
deleted file mode 100644
index b97aae4..0000000
--- a/translations/qt_help_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_iw.qm b/translations/qt_iw.qm
deleted file mode 100644
index 59c1c7e..0000000
--- a/translations/qt_iw.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_ja_JP.qm b/translations/qt_ja_JP.qm
deleted file mode 100644
index b695c97..0000000
--- a/translations/qt_ja_JP.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_pl.qm b/translations/qt_pl.qm
deleted file mode 100644
index f6847d0..0000000
--- a/translations/qt_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_pt.qm b/translations/qt_pt.qm
deleted file mode 100644
index 253a007..0000000
--- a/translations/qt_pt.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_ru.qm b/translations/qt_ru.qm
deleted file mode 100644
index 6467629..0000000
--- a/translations/qt_ru.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_sk.qm b/translations/qt_sk.qm
deleted file mode 100644
index a73ddc6..0000000
--- a/translations/qt_sk.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_sv.qm b/translations/qt_sv.qm
deleted file mode 100644
index 6b1e9cf..0000000
--- a/translations/qt_sv.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_uk.qm b/translations/qt_uk.qm
deleted file mode 100644
index 7cd604a..0000000
--- a/translations/qt_uk.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_zh_CN.qm b/translations/qt_zh_CN.qm
deleted file mode 100644
index e73b0cd..0000000
--- a/translations/qt_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qt_zh_TW.qm b/translations/qt_zh_TW.qm
deleted file mode 100644
index 699bd5c..0000000
--- a/translations/qt_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qtconfig_pl.qm b/translations/qtconfig_pl.qm
deleted file mode 100644
index 1a2faa3..0000000
--- a/translations/qtconfig_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qtconfig_zh_CN.qm b/translations/qtconfig_zh_CN.qm
deleted file mode 100644
index 9998e81..0000000
--- a/translations/qtconfig_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qtconfig_zh_TW.qm b/translations/qtconfig_zh_TW.qm
deleted file mode 100644
index 3d36679..0000000
--- a/translations/qtconfig_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qvfb_pl.qm b/translations/qvfb_pl.qm
deleted file mode 100644
index 7230cb6..0000000
--- a/translations/qvfb_pl.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qvfb_zh_CN.qm b/translations/qvfb_zh_CN.qm
deleted file mode 100644
index 5592f07..0000000
--- a/translations/qvfb_zh_CN.qm
+++ /dev/null
Binary files differ
diff --git a/translations/qvfb_zh_TW.qm b/translations/qvfb_zh_TW.qm
deleted file mode 100644
index b378ad8..0000000
--- a/translations/qvfb_zh_TW.qm
+++ /dev/null
Binary files differ
diff --git a/translations/translations.pri b/translations/translations.pri
index 480849f..cdb157e 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -8,16 +8,8 @@ defineReplace(prependAll) {
return ($$result)
}
-defineReplace(fixPath) {
-WIN {
- return ($$replace($$1, /, \))
-} ELSE {
- return ($$1)
-}
-}
-
-LUPDATE = $$fixPath($$QT_BUILD_TREE/bin/lupdate) -locations relative -no-ui-lines
-LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease)
+LUPDATE = $$QT_BUILD_TREE/bin/lupdate -locations relative -no-ui-lines
+win32:LUPDATE ~= s|/|\|g
###### Qt Libraries
@@ -42,27 +34,18 @@ ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
-ts $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts))
ts-qt.depends = sub-tools
-qm-qt.commands = $$LRELEASE $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts)
-qm-qt.depends = sub-tools
-
###### Designer
ts-designer.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/designer/translations/translations.pro)
ts-designer.depends = sub-tools
-qm-designer.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/designer/translations/translations.pro
-qm-designer.depends = sub-tools
-
###### Linguist
ts-linguist.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/linguist/linguist/linguist.pro)
ts-linguist.depends = sub-tools
-qm-linguist.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/linguist/linguist/linguist.pro
-qm-linguist.depends = sub-tools
-
###### Assistant
ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
@@ -73,36 +56,21 @@ ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/assistant/translations/translations_adp.pro)
ts-assistant.depends = sub-tools
-qm-assistant.commands = ($$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/translations.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/translations_adp.pro)
-qm-assistant.depends = sub-tools
-
###### Qtconfig
ts-qtconfig.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/qtconfig/translations/translations.pro)
ts-qtconfig.depends = sub-tools
-qm-qtconfig.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qtconfig/translations/translations.pro
-qm-qtconfig.depends = sub-tools
-
###### Qvfp
ts-qvfb.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/qvfb/translations/translations.pro)
ts-qvfb.depends = sub-tools
-qm-qvfb.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qvfb/translations/translations.pro
-qm-qvfb.depends = sub-tools
-
###### Overall Rules
ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb
-qm.depends = qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb
QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \
- qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb \
- ts qm
+ ts
diff --git a/translations/translations.pro b/translations/translations.pro
new file mode 100644
index 0000000..d1962fe
--- /dev/null
+++ b/translations/translations.pro
@@ -0,0 +1,41 @@
+TRANSLATIONS = $$files(*.ts)
+
+LRELEASE = $$QT_BUILD_TREE/bin/lrelease
+win32:LRELEASE ~= s|/|\|g
+
+contains(TEMPLATE_PREFIX, vc):vcproj = 1
+
+TEMPLATE = app
+TARGET = qm_phony_target
+CONFIG -= qt separate_debug_info
+QT =
+LIBS =
+
+updateqm.input = TRANSLATIONS
+updateqm.output = ${QMAKE_FILE_BASE}.qm
+isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
+updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+updateqm.name = LRELEASE ${QMAKE_FILE_IN}
+updateqm.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += updateqm
+
+isEmpty(vcproj) {
+ QMAKE_LINK = @: IGNORE THIS LINE
+ OBJECTS_DIR =
+ win32:CONFIG -= embed_manifest_exe
+} else {
+ CONFIG += console
+ PHONY_DEPS = .
+ phony_src.input = PHONY_DEPS
+ phony_src.output = phony.c
+ phony_src.variable_out = GENERATED_SOURCES
+ phony_src.commands = echo int main() { return 0; } > phony.c
+ phony_src.name = CREATE phony.c
+ phony_src.CONFIG += combine
+ QMAKE_EXTRA_COMPILERS += phony_src
+}
+
+translations.path = $$[QT_INSTALL_TRANSLATIONS]
+translations.files = $$TRANSLATIONS
+translations.files ~= s,\\.ts$,.qm,g
+INSTALLS += translations