summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-06-18 15:31:28 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-06-18 15:31:28 (GMT)
commit1fa6b99c373e0dab9e0a0b7f190e3085190be668 (patch)
tree1c5181e125a7ebae7b10d8a3fbb53e1cf0e63b3a
parenta18e5288324aa13da014ee52daffbfc589c87be3 (diff)
parentf9f08de9d41fd55d9c7d01578191ef5d4099c9e6 (diff)
downloadQt-1fa6b99c373e0dab9e0a0b7f190e3085190be668.zip
Qt-1fa6b99c373e0dab9e0a0b7f190e3085190be668.tar.gz
Qt-1fa6b99c373e0dab9e0a0b7f190e3085190be668.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into qt-main/qgraphicssceneindex
-rwxr-xr-xconfigure4
-rw-r--r--doc/src/animation.qdoc6
-rw-r--r--doc/src/known-issues.qdoc7
-rw-r--r--doc/src/qnamespace.qdoc6
-rw-r--r--doc/src/snippets/qstring/stringbuilder.cpp28
-rw-r--r--doc/src/snippets/statemachine/main.cpp48
-rw-r--r--doc/src/snippets/statemachine/main2.cpp51
-rw-r--r--doc/src/snippets/statemachine/main3.cpp21
-rw-r--r--doc/src/snippets/statemachine/main4.cpp71
-rw-r--r--doc/src/snippets/statemachine/main5.cpp103
-rw-r--r--doc/src/statemachine.qdoc141
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp1
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp1
-rw-r--r--examples/webkit/formextractor/mainwindow.cpp1
-rw-r--r--examples/widgets/calendarwidget/window.cpp28
-rw-r--r--projects.pro7
-rw-r--r--src/3rdparty/phonon/phonon/volumeslider.cpp2
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp1
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp3
-rw-r--r--src/corelib/codecs/qutfcodec.cpp3
-rw-r--r--src/corelib/global/qnamespace.h4
-rw-r--r--src/corelib/io/qiodevice.cpp4
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp4
-rw-r--r--src/corelib/tools/qlocale.cpp6
-rw-r--r--src/corelib/tools/qstring.cpp88
-rw-r--r--src/corelib/tools/qstring.h3
-rw-r--r--src/corelib/tools/qstringbuilder.cpp2
-rw-r--r--src/corelib/tools/qstringbuilder.h2
-rw-r--r--src/gui/dialogs/qfontdialog.cpp11
-rw-r--r--src/gui/dialogs/qinputdialog.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h16
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp114
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h5
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp79
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h4
-rw-r--r--src/gui/image/qimage.cpp12
-rw-r--r--src/gui/image/qpixmap.cpp15
-rw-r--r--src/gui/image/qpixmap.h6
-rw-r--r--src/gui/image/qpixmap_mac.cpp5
-rw-r--r--src/gui/image/qpixmap_mac_p.h1
-rw-r--r--src/gui/image/qpixmap_raster.cpp14
-rw-r--r--src/gui/image/qpixmap_x11.cpp10
-rw-r--r--src/gui/image/qpixmap_x11_p.h2
-rw-r--r--src/gui/image/qpixmapdata.cpp12
-rw-r--r--src/gui/image/qpixmapdata_p.h13
-rw-r--r--src/gui/itemviews/qitemeditorfactory.cpp16
-rw-r--r--src/gui/itemviews/qlistview.cpp2
-rw-r--r--src/gui/kernel/qapplication_x11.cpp128
-rw-r--r--src/gui/painting/qmatrix.cpp4
-rw-r--r--src/gui/painting/qmatrix.h1
-rw-r--r--src/gui/painting/qpaintengine.cpp3
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpaintengineex.cpp3
-rw-r--r--src/gui/painting/qpathclipper.cpp69
-rw-r--r--src/gui/painting/qpdf.cpp3
-rw-r--r--src/gui/painting/qprintengine_win.cpp6
-rw-r--r--src/gui/painting/qrasterizer.cpp2
-rw-r--r--src/gui/painting/qtransform.cpp5
-rw-r--r--src/gui/painting/qtransform.h1
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp3
-rw-r--r--src/gui/styles/qcommonstyle.cpp3
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
-rw-r--r--src/gui/styles/qplastiquestyle.cpp3
-rw-r--r--src/gui/text/qfontengine.cpp9
-rw-r--r--src/gui/widgets/qmenubar.cpp3
-rw-r--r--src/gui/widgets/qplaintextedit.cpp3
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp3
-rw-r--r--src/network/access/qnetworkaccesscache_p.h3
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp18
-rw-r--r--src/network/access/qnetworkaccessftpbackend_p.h4
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp20
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp24
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h12
-rw-r--r--src/network/socket/qabstractsocket.cpp4
-rw-r--r--src/network/ssl/qsslcertificate.cpp7
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
-rw-r--r--src/opengl/qpaintengine_opengl.cpp32
-rw-r--r--src/opengl/qpaintengine_opengl_p.h1
-rw-r--r--src/opengl/qpixmapdata_gl.cpp60
-rw-r--r--src/opengl/qpixmapdata_gl_p.h7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp10
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp29
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h1
-rw-r--r--src/scripttools/debugging/qscriptdebugger.cpp10
-rw-r--r--src/scripttools/debugging/qscriptdebugger_p.h2
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend.cpp43
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend_p_p.h6
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp26
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.h7
-rw-r--r--src/svg/qsvghandler.cpp1
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp23
-rw-r--r--tests/auto/modeltest/modeltest.cpp4
-rw-r--r--tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp18
-rw-r--r--tests/auto/qanimationgroup/tst_qanimationgroup.cpp26
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog.cpp26
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro1
-rw-r--r--tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro1
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp25
-rw-r--r--tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp38
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp36
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp19
-rw-r--r--tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp22
-rw-r--r--tests/auto/qpathclipper/tst_qpathclipper.cpp20
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp16
-rw-r--r--tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp57
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp41
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp64
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp2
-rw-r--r--tests/auto/windowsmobile/test/tst_windowsmobile.cpp2
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp203
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.h16
-rw-r--r--tools/assistant/translations/qt_help.pro1
-rw-r--r--tools/assistant/translations/translations.pro1
-rw-r--r--tools/assistant/translations/translations_adp.pro1
-rw-r--r--tools/configure/configureapp.cpp1
-rw-r--r--tools/designer/src/lib/shared/qdesigner_stackedbox.cpp11
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget.cpp12
-rw-r--r--tools/linguist/linguist/linguist.pro1
-rw-r--r--tools/linguist/phrasebooks/russian.qph127
-rw-r--r--tools/porting/src/qt3headers0.resourcebin547809 -> 548362 bytes
-rw-r--r--tools/porting/src/qt3headers1.resourcebin512251 -> 512882 bytes
-rw-r--r--tools/porting/src/qt3headers2.resourcebin392439 -> 393093 bytes
-rw-r--r--tools/porting/src/qt3headers3.resourcebin553089 -> 553753 bytes
-rw-r--r--tools/qdoc3/htmlgenerator.cpp51
-rw-r--r--tools/qtconfig/mainwindow.cpp4
-rw-r--r--translations/assistant_adp_ru.ts780
-rw-r--r--translations/assistant_ru.ts1063
-rw-r--r--translations/linguist_ru.ts2002
-rw-r--r--translations/qt_help_ru.ts361
-rw-r--r--translations/translations.pri38
-rw-r--r--translations/translations.pro50
135 files changed, 5857 insertions, 910 deletions
diff --git a/configure b/configure
index 6f0b6e7..e0b8b3e 100755
--- a/configure
+++ b/configure
@@ -7086,9 +7086,6 @@ FNR == 1 {
if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
target_file = first
matched_target = 1
- } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
- target_file = second
- matched_target = 1
}
}
@@ -7173,7 +7170,6 @@ for part in $CFG_BUILD_PARTS; do
case "$part" in
tools) PART_ROOTS="$PART_ROOTS tools" ;;
libs) PART_ROOTS="$PART_ROOTS src" ;;
- translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease translations" ;;
examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
*) ;;
esac
diff --git a/doc/src/animation.qdoc b/doc/src/animation.qdoc
index 843e0aa..da9b401 100644
--- a/doc/src/animation.qdoc
+++ b/doc/src/animation.qdoc
@@ -208,12 +208,6 @@
Note that QObject must be the first class inherited as the
meta-object system demands this.
- \warning The QItemAnimation class, which was initially intended
- for animating \l{QGraphicsItem}s may be deprecated or removed from
- the animation framework.
-
- \omit (need something about the list of animations). \endomit
-
\section1 Easing Curves
As mentioned, QPropertyAnimation performs an interpolation between
diff --git a/doc/src/known-issues.qdoc b/doc/src/known-issues.qdoc
index e005b14..9c90908 100644
--- a/doc/src/known-issues.qdoc
+++ b/doc/src/known-issues.qdoc
@@ -58,13 +58,6 @@
\section1 Issues with Third Party Software
- \section2 Intel Compiler Support
-
- Although it is possible to build applications against Qt 4.5.x using Intel
- CC 10, these applications will crash when run. We recommend that developers
- who rely on this compiler wait until a fix is available before upgrading to
- the Qt 4.5.x series of releases.
-
\section2 X11 Hardware Support
\list
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index d46236f..8a24764 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -2685,3 +2685,9 @@
\value Round Like Repeat, but scales the images down to ensure that
the last image is not cropped.
*/
+
+/*!
+ \enum Uninitialized
+ \internal
+*/
+
diff --git a/doc/src/snippets/qstring/stringbuilder.cpp b/doc/src/snippets/qstring/stringbuilder.cpp
new file mode 100644
index 0000000..90803e2
--- /dev/null
+++ b/doc/src/snippets/qstring/stringbuilder.cpp
@@ -0,0 +1,28 @@
+
+//! [0]
+ QString foo;
+ QString type = "long";
+
+ foo->setText(QLatin1String("vector<") + type + QLatin1String(">::iterator"));
+
+ if (foo.startsWith("(" + type + ") 0x"))
+ ...
+//! [0]
+
+//! [3]
+ #define QT_USE_FAST_CONCATENATION
+//! [3]
+
+//! [4]
+ #define QT_USE_FAST_CONCATENATION
+ #define QT_USE_FAST_OPERATOR_PLUS
+//! [4]
+
+//! [5]
+ #include <QStringBuilder>
+
+ QString hello("hello");
+ QStringRef el(&hello, 2, 3);
+ QLatin1String world("world");
+ QString message = hello % el % world % QChar('!');
+//! [5]
diff --git a/doc/src/snippets/statemachine/main.cpp b/doc/src/snippets/statemachine/main.cpp
new file mode 100644
index 0000000..f20d245
--- /dev/null
+++ b/doc/src/snippets/statemachine/main.cpp
@@ -0,0 +1,48 @@
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QLabel *label = new QLabel;
+
+//![0]
+ QStateMachine machine;
+ QState *s1 = new QState();
+ QState *s2 = new QState();
+ QState *s3 = new QState();
+//![0]
+
+//![4]
+ s1->assignProperty(label, "text", "In state s1");
+ s2->assignProperty(label, "text", "In state s2");
+ s3->assignProperty(label, "text", "In state s3");
+//![4]
+
+//![5]
+ QObject::connect(s3, SIGNAL(entered()), button, SLOT(showMaximized()));
+ QObject::connect(s3, SIGNAL(exited()), button, SLOT(showMinimized()));
+//![5]
+
+//![1]
+ s1->addTransition(button, SIGNAL(clicked()), s2);
+ s2->addTransition(button, SIGNAL(clicked()), s3);
+ s3->addTransition(button, SIGNAL(clicked()), s1);
+//![1]
+
+//![2]
+ machine.addState(s1);
+ machine.addState(s2);
+ machine.addState(s3);
+ machine.setInitialState(s1);
+//![2]
+
+//![3]
+ machine.start();
+//![3]
+
+ label->show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/statemachine/main2.cpp b/doc/src/snippets/statemachine/main2.cpp
new file mode 100644
index 0000000..60a61e7
--- /dev/null
+++ b/doc/src/snippets/statemachine/main2.cpp
@@ -0,0 +1,51 @@
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QStateMachine machine;
+
+//![0]
+ QState *s1 = new QState();
+ QState *s11 = new QState(s1);
+ QState *s12 = new QState(s1);
+ QState *s13 = new QState(s1);
+ s1->setInitialState(s11);
+ machine.addState(s1);
+//![0]
+
+//![2]
+ s12>addTransition(quitButton, SIGNAL(clicked()), s12);
+//![2]
+
+//![1]
+ QFinalState *s2 = new QFinalState();
+ s1->addTransition(quitButton, SIGNAL(clicked()), s2);
+ machine.addState(s2);
+
+ QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit()));
+//![1]
+
+ QButton *interruptButton = new QPushButton("Interrupt Button");
+
+//![3]
+ QHistoryState *s1h = s1->addHistoryState();
+
+ QState *s3 = new QState();
+ s3->assignProperty(label, "text", "In s3");
+ QMessageBox mbox;
+ mbox.addButton(QMessageBox::Ok);
+ mbox.setText("Interrupted!");
+ mbox.setIcon(QMessageBox::Information);
+ QObject::connect(s3, SIGNAL(entered()), &mbox, SLOT(exec()));
+ s3->addTransition(s1h);
+ machine.addState(s3);
+
+ s1->addTransition(interruptButton, SIGNAL(clicked()), s3);
+//![3]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/statemachine/main3.cpp b/doc/src/snippets/statemachine/main3.cpp
new file mode 100644
index 0000000..b04b850
--- /dev/null
+++ b/doc/src/snippets/statemachine/main3.cpp
@@ -0,0 +1,21 @@
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![0]
+ QState *s1 = new QState(QState::ParallelStates);
+ // s11 and s12 will be entered in parallel
+ QState *s11 = new QState(s1);
+ QState *s12 = new QState(s1);
+//![0]
+
+//![1]
+ s1->addTransition(s1, SIGNAL(finished()), s2);
+//![1]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/statemachine/main4.cpp b/doc/src/snippets/statemachine/main4.cpp
new file mode 100644
index 0000000..5681bbd
--- /dev/null
+++ b/doc/src/snippets/statemachine/main4.cpp
@@ -0,0 +1,71 @@
+
+#include <QtGui>
+
+
+//![0]
+struct StringEvent : public QEvent
+{
+ StringEvent(const QString &val)
+ : QEvent(QEvent::Type(QEvent::User+1)),
+ value(val) {}
+
+ QString value;
+};
+//![0]
+
+//![1]
+class StringTransition : public QAbstractTransition
+{
+public:
+ StringTransition(const QString &value)
+ : m_value(value) {}
+
+protected:
+ virtual bool eventTest(QEvent *e) const
+ {
+ if (e->type() != QEvent::Type(QEvent::User+1)) // StringEvent
+ return false;
+ StringEvent *se = static_cast<StringEvent*>(e);
+ return (m_value == se->value);
+ }
+
+ virtual void onTransition(QEvent *) {}
+
+private:
+ QString m_value;
+};
+//![1]
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![2]
+ QStateMachine machine;
+ QState *s1 = new QState();
+ QState *s2 = new QState();
+ QFinalState *done = new QFinalState();
+
+ StringTransition *t1 = new StringTransition("Hello");
+ t1->setTargetState(s2);
+ s1->addTransition(t1);
+ StringTransition *t2 = new StringTransition("world");
+ t2->setTargetState(done);
+ s2->addTransition(t2);
+
+ machine.addState(s1);
+ machine.addState(s2);
+ machine.addState(done);
+ machine.setInitialState(s1);
+//![2]
+
+//![3]
+ machine.postEvent(new StringEvent("Hello"));
+ machine.postEvent(new StringEvent("world"));
+//![3]
+
+ return app.exec();
+}
+
+#include "main4.moc"
+
diff --git a/doc/src/snippets/statemachine/main5.cpp b/doc/src/snippets/statemachine/main5.cpp
new file mode 100644
index 0000000..90ad8c7
--- /dev/null
+++ b/doc/src/snippets/statemachine/main5.cpp
@@ -0,0 +1,103 @@
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ {
+//![0]
+ QStateMachine machine;
+ machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
+//![0]
+
+//![1]
+ QState *s1 = new QState();
+ s1->assignProperty(object, "fooBar", 1.0);
+ machine.addState(s1);
+ machine.setInitialState(s1);
+
+ QState *s2 = new QState();
+ machine.addState(s2);
+//![1]
+ }
+
+ {
+
+//![2]
+ QStateMachine machine;
+ machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
+
+ QState *s1 = new QState();
+ s1->assignProperty(object, "fooBar", 1.0);
+ machine.addState(s1);
+ machine.setInitialState(s1);
+
+ QState *s2 = new QState(s1);
+ s2->assignProperty(object, "fooBar", 2.0);
+ s1->setInitialState(s2);
+
+ QState *s3 = new QState(s1);
+//![2]
+
+ }
+
+ {
+//![3]
+ QState *s1 = new QState();
+ QState *s2 = new QState();
+
+ s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+ s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
+
+ s1->addTransition(button, SIGNAL(clicked()), s2);
+//![3]
+
+ }
+
+ {
+//![4]
+ QState *s1 = new QState();
+ QState *s2 = new QState();
+
+ s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+ s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
+
+ QSignalTransition *transition = s1->addTransition(button, SIGNAL(clicked()), s2);
+ transition->addAnimation(new QPropertyAnimation(button, "geometry"));
+//![4]
+
+ }
+
+ {
+
+//![5]
+ QState *s1 = new QState();
+ s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+
+ QState *s2 = new QState();
+
+ s1->addTransition(s1, SIGNAL(polished()), s2);
+//![5]
+
+ }
+
+ {
+
+//![6]
+ QState *s1 = new QState();
+ QState *s2 = new QState();
+
+ s2->assignProperty(object, "fooBar", 2.0);
+ s1->addTransition(s2);
+
+ QStateMachine machine;
+ machine.setInitialState(s1);
+ machine.addDefaultAnimation(new QPropertyAnimation(object, "fooBar"));
+//![6]
+
+ }
+
+ return app.exec();
+}
+
diff --git a/doc/src/statemachine.qdoc b/doc/src/statemachine.qdoc
index c017827..d2b508d 100644
--- a/doc/src/statemachine.qdoc
+++ b/doc/src/statemachine.qdoc
@@ -85,36 +85,20 @@
The following snippet shows the code needed to create such a state machine.
First, we create the state machine and states:
- \code
- QStateMachine machine;
- QState *s1 = new QState();
- QState *s2 = new QState();
- QState *s3 = new QState();
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 0
Then, we create the transitions by using the QState::addTransition()
function:
- \code
- s1->addTransition(button, SIGNAL(clicked()), s2);
- s2->addTransition(button, SIGNAL(clicked()), s3);
- s3->addTransition(button, SIGNAL(clicked()), s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 1
Next, we add the states to the machine and set the machine's initial state:
- \code
- machine.addState(s1);
- machine.addState(s2);
- machine.addState(s3);
- machine.setInitialState(s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 2
Finally, we start the state machine:
- \code
- machine.start();
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 3
The state machine executes asynchronously, i.e. it becomes part of your
application's event loop.
@@ -127,11 +111,7 @@
entered. In the following snippet, the value that should be assigned to a
QLabel's text property is specified for each state:
- \code
- s1->assignProperty(label, "text", "In state s1");
- s2->assignProperty(label, "text", "In state s2");
- s3->assignProperty(label, "text", "In state s3");
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 4
When any of the states is entered, the label's text will be changed
accordingly.
@@ -142,10 +122,7 @@
state \c s3 is entered, and the button's showMinimized() slot will be called
when \c s3 is exited:
- \code
- QObject::connect(s3, SIGNAL(entered()), button, SLOT(showMaximized()));
- QObject::connect(s3, SIGNAL(exited()), button, SLOT(showMinimized()));
- \endcode
+ \snippet doc/src/snippets/statemachine/main.cpp 5
Custom states can reimplement QAbstractState::onEntry() and
QAbstractState::onExit().
@@ -194,22 +171,9 @@
initial one (i.e. which child state the state machine should enter when the
parent state is the target of a transition).
- \code
- QState *s1 = new QState();
- QState *s11 = new QState(s1);
- QState *s12 = new QState(s1);
- QState *s13 = new QState(s1);
- s1->setInitialState(s11);
- machine.addState(s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main2.cpp 0
- \code
- QFinalState *s2 = new QFinalState();
- s1->addTransition(quitButton, SIGNAL(clicked()), s2);
- machine.addState(s2);
-
- QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit()));
- \endcode
+ \snippet doc/src/snippets/statemachine/main2.cpp 1
In this case we want the application to quit when the state machine is
finished, so the machine's finished() signal is connected to the
@@ -219,9 +183,7 @@
following code adds a transition that effectively causes the Quit button to
be ignored when the state machine is in state \c s12.
- \code
- s12>addTransition(quitButton, SIGNAL(clicked()), s12);
- \endcode
+ \snippet doc/src/snippets/statemachine/main2.cpp 2
A transition can have any state as its target, i.e. the target state does
not have to be on the same level in the state hierarchy as the source state.
@@ -259,21 +221,7 @@
simply display a message box when \c s3 is entered, then immediately return
to the previous child state of \c s1 via the history state.
- \code
- QHistoryState *s1h = s1->addHistoryState();
-
- QState *s3 = new QState();
- s3->assignProperty(label, "text", "In s3");
- QMessageBox mbox;
- mbox.addButton(QMessageBox::Ok);
- mbox.setText("Interrupted!");
- mbox.setIcon(QMessageBox::Information);
- QObject::connect(s3, SIGNAL(entered()), &mbox, SLOT(exec()));
- s3->addTransition(s1h);
- machine.addState(s3);
-
- s1->addTransition(interruptButton, SIGNAL(clicked()), s3);
- \endcode
+ \snippet doc/src/snippets/statemachine/main2.cpp 3
\section1 Using Parallel States to Avoid a Combinatorial Explosion of States
@@ -305,12 +253,7 @@
To create a parallel state group, pass QState::ParallelStates to the QState
constructor.
- \code
- QState *s1 = new QState(QState::ParallelStates);
- // s11 and s12 will be entered in parallel
- QState *s11 = new QState(s1);
- QState *s12 = new QState(s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main3.cpp 0
When a parallel state group is entered, all its child states will be
simultaneously entered. Transitions within the individual child states
@@ -334,9 +277,7 @@
finished(). We use a signal transition to cause this event to trigger a
state change:
- \code
- s1->addTransition(s1, SIGNAL(finished()), s2);
- \endcode
+ \snippet doc/src/snippets/statemachine/main3.cpp 1
Using final states in composite states is useful when you want to hide the
internal details of a composite state; i.e. the only thing the outside world
@@ -372,42 +313,12 @@
Here we define our own custom event type, \c StringEvent, for posting
strings to the state machine:
- \code
- struct StringEvent : public QEvent
- {
- StringEvent(const QString &val)
- : QEvent(QEvent::Type(QEvent::User+1)),
- value(val) {}
-
- QString value;
- };
- \endcode
+ \snippet doc/src/snippets/statemachine/main4.cpp 0
Next, we define a transition that only triggers when the event's string
matches a particular string (a \e guarded transition):
- \code
- class StringTransition : public QAbstractTransition
- {
- public:
- StringTransition(const QString &value)
- : m_value(value) {}
-
- protected:
- virtual bool eventTest(QEvent *e) const
- {
- if (e->type() != QEvent::Type(QEvent::User+1)) // StringEvent
- return false;
- StringEvent *se = static_cast<StringEvent*>(e);
- return (m_value == se->value);
- }
-
- virtual void onTransition(QEvent *) {}
-
- private:
- QString m_value;
- };
- \endcode
+ \snippet doc/src/snippets/statemachine/main4.cpp 1
In the eventTest() reimplementation, we first check if the event type is the
desired one; if so, we cast the event to a StringEvent and perform the
@@ -422,31 +333,11 @@
Here's what the implementation of the statechart looks like:
- \code
- QStateMachine machine;
- QState *s1 = new QState();
- QState *s2 = new QState();
- QFinalState *done = new QFinalState();
-
- StringTransition *t1 = new StringTransition("Hello");
- t1->setTargetState(s2);
- s1->addTransition(t1);
- StringTransition *t2 = new StringTransition("world");
- t2->setTargetState(done);
- s2->addTransition(t2);
-
- machine.addState(s1);
- machine.addState(s2);
- machine.addState(done);
- machine.setInitialState(s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main4.cpp 2
Once the machine is started, we can post events to it.
- \code
- machine.postEvent(new StringEvent("Hello"));
- machine.postEvent(new StringEvent("world"));
- \endcode
+ \snippet doc/src/snippets/statemachine/main4.cpp 3
An event that is not handled by any relevant transition will be silently
consumed by the state machine. It can be useful to group states and provide
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
index ad8006e..4783280 100644
--- a/examples/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -76,6 +76,7 @@ MainWindow::MainWindow()
setCentralWidget(widget);
setWindowTitle(tr("Diagramscene"));
+ setUnifiedTitleAndToolBarOnMac(true);
}
//! [0]
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index 9f899b4..6d477db 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -94,6 +94,7 @@ MainWindow::MainWindow()
toolsMenu->addAction(tr("Remove all embedded elements"), this, SLOT(removeEmbeddedElements()));
setCentralWidget(view);
+ setUnifiedTitleAndToolBarOnMac(true);
}
//! [3]
diff --git a/examples/webkit/formextractor/mainwindow.cpp b/examples/webkit/formextractor/mainwindow.cpp
index bc92f85..f774737 100644
--- a/examples/webkit/formextractor/mainwindow.cpp
+++ b/examples/webkit/formextractor/mainwindow.cpp
@@ -48,6 +48,7 @@ MainWindow::MainWindow()
createMenus();
centralWidget = new FormExtractor(this);
setCentralWidget(centralWidget);
+ setUnifiedTitleAndToolBarOnMac(true);
}
void MainWindow::createActions()
diff --git a/examples/widgets/calendarwidget/window.cpp b/examples/widgets/calendarwidget/window.cpp
index 7672a05..c31ea0c 100644
--- a/examples/widgets/calendarwidget/window.cpp
+++ b/examples/widgets/calendarwidget/window.cpp
@@ -167,22 +167,22 @@ void Window::reformatHeaders()
//! [8]
void Window::reformatCalendarPage()
{
- QTextCharFormat mayFirstFormat;
- if (mayFirstCheckBox->isChecked())
- mayFirstFormat.setForeground(Qt::red);
-
- QTextCharFormat firstFridayFormat;
- if (firstFridayCheckBox->isChecked())
+ if (firstFridayCheckBox->isChecked()) {
+ QDate firstFriday(calendar->yearShown(), calendar->monthShown(), 1);
+ while (firstFriday.dayOfWeek() != Qt::Friday)
+ firstFriday = firstFriday.addDays(1);
+ QTextCharFormat firstFridayFormat;
firstFridayFormat.setForeground(Qt::blue);
+ calendar->setDateTextFormat(firstFriday, firstFridayFormat);
+ }
- QDate date(calendar->yearShown(), calendar->monthShown(), 1);
-
- calendar->setDateTextFormat(QDate(date.year(), 5, 1), mayFirstFormat);
-
- date.setDate(date.year(), date.month(), 1);
- while (date.dayOfWeek() != Qt::Friday)
- date = date.addDays(1);
- calendar->setDateTextFormat(date, firstFridayFormat);
+ //May First in Red takes precedence
+ if (mayFirstCheckBox->isChecked()) {
+ const QDate mayFirst(calendar->yearShown(), 5, 1);
+ QTextCharFormat mayFirstFormat;
+ mayFirstFormat.setForeground(Qt::red);
+ calendar->setDateTextFormat(mayFirst, mayFirstFormat);
+ }
}
//! [8]
diff --git a/projects.pro b/projects.pro
index 2d8e7f4..953eae8 100644
--- a/projects.pro
+++ b/projects.pro
@@ -41,12 +41,7 @@ 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) # ts targets
- } else {
- SUBDIRS += tools/linguist/lrelease
- }
- SUBDIRS += translations # qm build step
+ contains(QT_BUILD_PARTS, tools):include(translations/translations.pri)
} else:isEqual(PROJECT, qmake) {
# SUBDIRS += qmake
} else {
diff --git a/src/3rdparty/phonon/phonon/volumeslider.cpp b/src/3rdparty/phonon/phonon/volumeslider.cpp
index b59f689..1888cb6 100644
--- a/src/3rdparty/phonon/phonon/volumeslider.cpp
+++ b/src/3rdparty/phonon/phonon/volumeslider.cpp
@@ -85,7 +85,7 @@ VolumeSlider::~VolumeSlider()
bool VolumeSlider::isMuteVisible() const
{
- return k_ptr->muteButton.isVisible();
+ return !k_ptr->muteButton.isHidden();
}
void VolumeSlider::setMuteVisible(bool visible)
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index a68301c..7526a81 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -43,6 +43,7 @@
\class QPropertyAnimation
\brief The QPropertyAnimation class animates Qt properties
\since 4.6
+ \mainclass
\ingroup animation
QPropertyAnimation interpolates over \l{Qt's Property System}{Qt
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index 7a62d4e..aa7521d 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -653,8 +653,7 @@ QString QSimpleTextCodec::convertToUnicode(const char* chars, int len, Converter
const unsigned char * c = (const unsigned char *)chars;
- QString r;
- r.resize(len);
+ QString r(len, Qt::Uninitialized);
QChar* uc = r.data();
for (int i = 0; i < len; i++) {
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index 12575f9..fe826ad 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -351,8 +351,7 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState
if (headerdone && endian == Detect)
endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE;
- QString result;
- result.resize(len); // worst case
+ QString result(len, Qt::Uninitialized); // worst case
QChar *qch = (QChar *)result.unicode();
while (len--) {
if (half) {
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 46ac40b..398cd48 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1542,6 +1542,10 @@ public:
BottomLeftSection,
TitleBarArea // For move
};
+
+ enum Uninitialized {
+ Uninitialized
+ };
}
#ifdef Q_MOC_RUN
;
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index d3fa6a8..2977c7f 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1454,11 +1454,11 @@ QByteArray QIODevice::peek(qint64 maxSize)
}
/*!
- Blocks until data is available for reading and the readyRead()
+ Blocks until new data is available for reading and the readyRead()
signal has been emitted, or until \a msecs milliseconds have
passed. If msecs is -1, this function will not time out.
- Returns true if data is available for reading; otherwise returns
+ Returns true if new data is available for reading; otherwise returns
false (if the operation timed out or if an error occurred).
This function can operate without an event loop. It is
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 04cce50..758bdbe 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1171,9 +1171,9 @@ void QStateMachinePrivate::_q_start()
transitions.append(initialTransition);
QEvent nullEvent(QEvent::None);
executeTransitionContent(&nullEvent, transitions);
- enterStates(&nullEvent, transitions);
+ QList<QAbstractState*> enteredStates = enterStates(&nullEvent, transitions);
applyProperties(transitions, QList<QAbstractState*>() << start,
- QList<QAbstractState*>() << initial);
+ enteredStates);
delete start;
#ifdef QSTATEMACHINE_DEBUG
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 52fb8a2..cbdd32c 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -185,8 +185,7 @@ static QString languageToCode(QLocale::Language language)
const unsigned char *c = language_code_list + 3*(uint(language));
- QString code;
- code.resize(c[2] == 0 ? 2 : 3);
+ QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);
code[0] = ushort(c[0]);
code[1] = ushort(c[1]);
@@ -201,8 +200,7 @@ static QString countryToCode(QLocale::Country country)
if (country == QLocale::AnyCountry)
return QString();
- QString code;
- code.resize(2);
+ QString code(2, Qt::Uninitialized);
const unsigned char *c = country_code_list + 2*(uint(country));
code[0] = ushort(c[0]);
code[1] = ushort(c[1]);
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index ced6dd5..dba3d2a 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -663,6 +663,74 @@ const QString::Null QString::null = { };
formats, the \e precision represents the maximum number of
significant digits (trailing zeroes are omitted).
+ \section1 More Efficient String Construction
+
+ Using the QString \c{'+'} operator, it is easy to construct a
+ complex string from multiple substrings. You will often write code
+ like this:
+
+ \snippet doc/src/snippets/qstring/stringbuilder.cpp 0
+
+ There is nothing wrong with either of these string constructions,
+ but there are a few hidden inefficiencies. Beginning with Qt 4.6,
+ you can eliminate them.
+
+ First, multiple uses of the \c{'+'} operator usually means
+ multiple memory allocations. When concatenating \e{n} substrings,
+ where \e{n > 2}, there can be as many as \e{n - 1} calls to the
+ memory allocator.
+
+ Second, QLatin1String does not store its length internally but
+ calls qstrlen() when it needs to know its length.
+
+ In 4.6, an internal template class \c{QStringBuilder} has been
+ added along with a few helper functions. This class is marked
+ internal and does not appear in the documentation, because you
+ aren't meant to instantiate it in your code. Its use will be
+ automatic, as described below. The class is found in
+ \c {src/corelib/tools/qstringbuilder.cpp} if you want to have a
+ look at it.
+
+ \c{QStringBuilder} uses expression templates and reimplements the
+ \c{'%'} operator so that when you use \c{'%'} for string
+ concatenation instead of \c{'+'}, multiple substring
+ concatenations will be postponed until the final result is about
+ to be assigned to a QString. At this point, the amount of memory
+ required for the final result is known. The memory allocator is
+ then called \e{once} to get the required space, and the substrings
+ are copied into it one by one.
+
+ \c{QLatin1Literal} is a second internal class that can replace
+ QLatin1String, which can't be changed for compatibility reasons.
+ \c{QLatin1Literal} stores its length, thereby saving time when
+ \c{QStringBuilder} computes the amount of memory required for the
+ final string.
+
+ Additional efficiency is gained by inlining and reduced reference
+ counting (the QString created from a \c{QStringBuilder} typically
+ has a ref count of 1, whereas QString::append() needs an extra
+ test).
+
+ There are three ways you can access this improved method of string
+ construction. The straightforward way is to include
+ \c{QStringBuilder} wherever you want to use it, and use the
+ \c{'%'} operator instead of \c{'+'} when concatenating strings:
+
+ \snippet doc/src/snippets/qstring/stringbuilder.cpp 5
+
+ A more global approach is to include this define:
+
+ \snippet doc/src/snippets/qstring/stringbuilder.cpp 3
+
+ and use \c{'%'} instead of \c{'+'} for string concatenation
+ everywhere. The third approach, which is the most convenient but
+ not entirely source compatible, is to include two defines:
+
+ \snippet doc/src/snippets/qstring/stringbuilder.cpp 4
+
+ and the \c{'+'} will automatically be performed as the
+ \c{QStringBuilder} \c{'%'} everywhere.
+
\sa fromRawData(), QChar, QLatin1String, QByteArray, QStringRef
*/
@@ -951,7 +1019,7 @@ QString::QString(int size, QChar ch)
\internal
*/
-QString::QString(int size, Uninitialized)
+QString::QString(int size, enum Qt::Uninitialized)
{
d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar));
d->ref = 1;
@@ -3781,8 +3849,7 @@ QString QString::fromUtf8(const char *str, int size)
if (size < 0)
size = qstrlen(str);
- QString result;
- result.resize(size); // worst case
+ QString result(size, Qt::Uninitialized); // worst case
ushort *qch = result.d->data;
uint uc = 0;
uint min_uc = 0;
@@ -3897,8 +3964,7 @@ QString QString::fromUcs4(const uint *unicode, int size)
++size;
}
- QString s;
- s.resize(size*2); // worst case
+ QString s(size * 2, Qt::Uninitialized); // worst case
ushort *uc = s.d->data;
for (int i = 0; i < size; ++i) {
uint u = unicode[i];
@@ -3961,8 +4027,7 @@ QString QString::simplified() const
{
if (d->size == 0)
return *this;
- QString result;
- result.resize(d->size);
+ QString result(d->size, Qt::Uninitialized);
const QChar *from = (const QChar*) d->data;
const QChar *fromend = (const QChar*) from+d->size;
int outc=0;
@@ -4814,8 +4879,7 @@ QString QString::toLower() const
c = QChar::surrogateToUcs4(*(p - 1), c);
const QUnicodeTables::Properties *prop = qGetProp(c);
if (prop->lowerCaseDiff || prop->lowerCaseSpecial) {
- QString s;
- s.resize(d->size);
+ QString s(d->size, Qt::Uninitialized);
memcpy(s.d->data, d->data, (p - d->data)*sizeof(ushort));
ushort *pp = s.d->data + (p - d->data);
while (p < e) {
@@ -4906,8 +4970,7 @@ QString QString::toUpper() const
c = QChar::surrogateToUcs4(*(p - 1), c);
const QUnicodeTables::Properties *prop = qGetProp(c);
if (prop->upperCaseDiff || prop->upperCaseSpecial) {
- QString s;
- s.resize(d->size);
+ QString s(d->size, Qt::Uninitialized);
memcpy(s.d->data, d->data, (p - d->data)*sizeof(ushort));
ushort *pp = s.d->data + (p - d->data);
while (p < e) {
@@ -6204,8 +6267,7 @@ static QString replaceArgEscapes(const QString &s, const ArgEscapeData &d, int f
+ d.locale_occurrences
*qMax(abs_field_width, larg.length());
- QString result;
- result.resize(result_len);
+ QString result(result_len, Qt::Uninitialized);
QChar *result_buff = (QChar*) result.unicode();
QChar *rc = result_buff;
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 4b2ceb7..67716b8 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -579,8 +579,7 @@ public:
bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; }
bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; }
- struct Uninitialized {};
- QString(int size, Uninitialized);
+ QString(int size, enum Qt::Uninitialized);
private:
#if defined(QT_NO_CAST_FROM_ASCII) && !defined(Q_NO_DECLARED_NOT_DEFINED)
diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp
index 17e2cec..fbb784e 100644
--- a/src/corelib/tools/qstringbuilder.cpp
+++ b/src/corelib/tools/qstringbuilder.cpp
@@ -43,6 +43,7 @@
/*!
\class QLatin1Literal
+ \internal
\reentrant
\since 4.6
@@ -83,6 +84,7 @@
/*!
\class QStringBuilder
+ \internal
\reentrant
\since 4.6
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index 19f14b4..852c072 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -80,7 +80,7 @@ public:
operator QString() const
{
QString s(QConcatenable< QStringBuilder<A, B> >::size(*this),
- QString::Uninitialized());
+ Qt::Uninitialized);
QChar *d = s.data();
QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d);
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index 582ba9b..e258cb5 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -501,8 +501,6 @@ void QFontDialogPrivate::updateFamilies()
{
Q_Q(QFontDialog);
- familyList->blockSignals(true);
-
enum match_t { MATCH_NONE = 0, MATCH_LAST_RESORT = 1, MATCH_APP = 2, MATCH_FAMILY = 3 };
QStringList familyNames = fdb.families(writingSystem);
@@ -556,7 +554,6 @@ void QFontDialogPrivate::updateFamilies()
&& familyList->hasFocus())
familyEdit->selectAll();
- familyList->blockSignals(false);
updateStyles();
}
@@ -567,9 +564,6 @@ void QFontDialogPrivate::updateFamilies()
void QFontDialogPrivate::updateStyles()
{
Q_Q(QFontDialog);
-
- styleList->blockSignals(true);
-
QStringList styles = fdb.styles(familyList->currentText());
styleList->model()->setStringList(styles);
@@ -613,8 +607,6 @@ void QFontDialogPrivate::updateStyles()
smoothScalable = fdb.isSmoothlyScalable(familyList->currentText(), styleList->currentText());
}
- styleList->blockSignals(false);
-
updateSizes();
}
@@ -628,8 +620,6 @@ void QFontDialogPrivate::updateSizes()
{
Q_Q(QFontDialog);
- sizeList->blockSignals(true);
-
if (!familyList->currentText().isEmpty()) {
QList<int> sizes = fdb.pointSizes(familyList->currentText(), styleList->currentText());
@@ -659,7 +649,6 @@ void QFontDialogPrivate::updateSizes()
sizeEdit->clear();
}
- sizeList->blockSignals(false);
_q_updateSample();
}
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index 8c0c2c7..e2c5742 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -1128,8 +1128,8 @@ void QInputDialog::done(int result)
is \a parent. The dialog will be modal and uses the specified widget
\a flags.
- This function returns the text which has been entered in the line
- edit. It will not return an empty string.
+ If the dialog is accepted, this function returns the text in the dialog's
+ line edit. If the dialog is rejected, a null QString is returned.
Use this static function like this:
@@ -1158,7 +1158,7 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
if (ret) {
return dialog.textValue();
} else {
- return text;
+ return QString();
}
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 75683d8..050aace 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -978,7 +978,8 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
bool hasPos = !childd->pos.isNull();
if (hasPos || childd->transformData) {
// COMBINE
- QTransform matrix = childd->transformToParent() * *x;
+ QTransform matrix = childd->transformToParent();
+ matrix *= *x;
*rect |= matrix.mapRect(child->boundingRect());
if (!childd->children.isEmpty())
childd->childrenBoundingRectHelper(&matrix, rect);
@@ -3195,8 +3196,7 @@ QTransform QGraphicsItem::deviceTransform(const QTransform &viewportTransform) c
QPointF mappedPoint = (untransformedAncestor->sceneTransform() * viewportTransform).map(QPointF(0, 0));
// COMBINE
- QTransform matrix;
- matrix.translate(mappedPoint.x(), mappedPoint.y());
+ QTransform matrix = QTransform::fromTranslate(mappedPoint.x(), mappedPoint.y());
if (untransformedAncestor->d_ptr->transformData)
matrix = untransformedAncestor->d_ptr->transformData->computedFullTransform(&matrix);
@@ -3294,9 +3294,8 @@ QTransform QGraphicsItem::itemTransform(const QGraphicsItem *other, bool *ok) co
bool cousins = other != commonAncestor && this != commonAncestor;
if (cousins) {
bool good = false;
- QTransform thisToScene;
- QTransform otherToScene;
- thisToScene = itemTransform(commonAncestor, &good);
+ QTransform thisToScene = itemTransform(commonAncestor, &good);
+ QTransform otherToScene(Qt::Uninitialized);
if (good)
otherToScene = other->itemTransform(commonAncestor, &good);
if (!good) {
@@ -4143,8 +4142,7 @@ QRegion QGraphicsItem::boundingRegion(const QTransform &itemToDeviceTransform) c
p.end();
// Transform QRegion back to device space
- QTransform unscale;
- unscale.scale(1 / granularity, 1 / granularity);
+ QTransform unscale = QTransform::fromScale(1 / granularity, 1 / granularity);
QRegion r;
QBitmap colorMask = QBitmap::fromImage(mask.createMaskFromColor(0));
foreach (const QRect &rect, QRegion( colorMask ).rects()) {
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 1c95a62..1dfb140 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -55,6 +55,7 @@
#include "qgraphicsitem.h"
#include "qpixmapcache.h"
+#include "qgraphicsview_p.h"
#include <QtCore/qpoint.h>
@@ -150,6 +151,8 @@ public:
geometryChanged(0),
inDestructor(0),
isObject(0),
+ ignoreVisible(0),
+ ignoreOpacity(0),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -336,6 +339,15 @@ public:
return calcEffectiveOpacity();
}
+ inline qreal combineOpacityFromParent(qreal parentOpacity) const
+ {
+ if (parent && !(flags & QGraphicsItem::ItemIgnoresParentOpacity)
+ && !(parent->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) {
+ return parentOpacity * opacity;
+ }
+ return opacity;
+ }
+
inline bool childrenCombineOpacity() const
{
if (!children.size())
@@ -416,7 +428,9 @@ public:
quint32 geometryChanged : 1;
quint32 inDestructor : 1;
quint32 isObject : 1;
- quint32 unused : 14; // feel free to use
+ quint32 ignoreVisible : 1;
+ quint32 ignoreOpacity : 1;
+ quint32 unused : 12; // feel free to use
// Optional stacking order
int globalStackingOrder;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 28dd3be..2f7ae04 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4060,14 +4060,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (item) {
if (!item->d_ptr->visible)
return;
- QGraphicsItem *p = item->d_ptr->parent;
- bool itemIgnoresParentOpacity = item->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity;
- bool parentDoesntPropagateOpacity = (p && (p->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren));
- if (!itemIgnoresParentOpacity && !parentDoesntPropagateOpacity) {
- opacity = parentOpacity * item->opacity();
- } else {
- opacity = item->d_ptr->opacity;
- }
+ opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
if (opacity == 0.0 && !(item->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) {
invisibleButChildIgnoresParentOpacity = !item->d_ptr->childrenCombineOpacity();
if (!invisibleButChildIgnoresParentOpacity)
@@ -4084,7 +4077,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
// Calculate the full transform for this item.
bool wasDirtyParentSceneTransform = false;
bool dontDrawItem = true;
- QTransform transform;
+ QTransform transform(Qt::Uninitialized);
if (item) {
if (item->d_ptr->itemIsUntransformable()) {
transform = item->deviceTransform(viewTransform);
@@ -4207,7 +4200,11 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (clipsToShape)
painter->setClipPath(item->shape(), Qt::IntersectClip);
painter->setOpacity(opacity);
- drawItemHelper(item, painter, &styleOptionTmp, widget, painterStateProtection);
+
+ if (!item->d_ptr->cacheMode && !item->d_ptr->isWidget)
+ item->paint(painter, &styleOptionTmp, widget);
+ else
+ drawItemHelper(item, painter, &styleOptionTmp, widget, painterStateProtection);
if (savePainter)
painter->restore();
@@ -4291,6 +4288,11 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
item->d_ptr->dirtyChildren = 1;
}
+ if (force)
+ item->d_ptr->ignoreVisible = 1;
+ if (ignoreOpacity)
+ item->d_ptr->ignoreOpacity = 1;
+
QGraphicsItem *p = item->d_ptr->parent;
while (p && !p->d_ptr->dirtyChildren) {
p->d_ptr->dirtyChildren = 1;
@@ -4298,34 +4300,58 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
}
}
-void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren)
+static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item,
+ const QRectF &rect, const QTransform &xform)
+{
+ Q_ASSERT(view);
+ Q_ASSERT(item);
+ if (item->hasBoundingRegionGranularity)
+ return view->updateRegion(xform.map(QRegion(rect.toRect())));
+ return view->updateRect(xform.mapRect(rect).toRect());
+}
+
+void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren,
+ qreal parentOpacity)
{
Q_Q(QGraphicsScene);
- // Calculate the full scene transform for this item.
+ bool wasDirtyParentViewBoundingRects = false;
bool wasDirtyParentSceneTransform = false;
- if (item && item->d_ptr->dirtySceneTransform && !item->d_ptr->itemIsUntransformable()) {
- item->d_ptr->sceneTransform = item->d_ptr->parent ? item->d_ptr->parent->d_ptr->sceneTransform
- : QTransform();
- item->d_ptr->combineTransformFromParent(&item->d_ptr->sceneTransform);
- item->d_ptr->dirtySceneTransform = 0;
- wasDirtyParentSceneTransform = true;
+ qreal opacity = parentOpacity;
+
+ if (item) {
+ wasDirtyParentViewBoundingRects = item->d_ptr->paintedViewBoundingRectsNeedRepaint;
+ opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
+ const bool itemIsHidden = !item->d_ptr->ignoreVisible && !item->d_ptr->visible;
+ const bool itemIsFullyTransparent = !item->d_ptr->ignoreOpacity && opacity == 0.0;
+
+ if (item->d_ptr->dirtySceneTransform && !itemIsHidden && !item->d_ptr->itemIsUntransformable()
+ && !(itemIsFullyTransparent && item->d_ptr->childrenCombineOpacity())) {
+ // Calculate the full scene transform for this item.
+ item->d_ptr->sceneTransform = item->d_ptr->parent ? item->d_ptr->parent->d_ptr->sceneTransform
+ : QTransform();
+ item->d_ptr->combineTransformFromParent(&item->d_ptr->sceneTransform);
+ item->d_ptr->dirtySceneTransform = 0;
+ wasDirtyParentSceneTransform = true;
+ }
+
+ if (itemIsHidden || itemIsFullyTransparent || (item->d_ptr->flags & QGraphicsItem::ItemHasNoContents)) {
+ // Make sure we don't process invisible items or items with no content.
+ item->d_ptr->dirty = 0;
+ item->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
+ }
}
// Process item.
- bool wasDirtyParentViewBoundingRects = false;
if (item && (item->d_ptr->dirty || item->d_ptr->paintedViewBoundingRectsNeedRepaint)) {
const bool useCompatUpdate = views.isEmpty() || (connectedSignals & changedSignalMask);
const bool untransformableItem = item->d_ptr->itemIsUntransformable();
- const QRectF itemBoundingRect = item->boundingRect();
+ const QRectF itemBoundingRect = adjustedItemBoundingRect(item);
if (item->d_ptr->geometryChanged) {
// Update growingItemsBoundingRect.
- if (!hasSceneRect) {
- QRectF itemSceneBoundingRect = item->d_ptr->sceneTransform.mapRect(itemBoundingRect);
- _q_adjustRect(&itemSceneBoundingRect);
- growingItemsBoundingRect |= itemSceneBoundingRect;
- }
+ if (!hasSceneRect)
+ growingItemsBoundingRect |= item->d_ptr->sceneTransform.mapRect(itemBoundingRect);
item->d_ptr->geometryChanged = 0;
}
@@ -4354,11 +4380,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
break;
}
+ QRect &paintedViewBoundingRect = item->d_ptr->paintedViewBoundingRects[viewPrivate->viewport];
if (item->d_ptr->paintedViewBoundingRectsNeedRepaint) {
wasDirtyParentViewBoundingRects = true;
- QRect rect = item->d_ptr->paintedViewBoundingRects.value(viewPrivate->viewport);
- rect.translate(viewPrivate->dirtyScrollOffset);
- viewPrivate->updateRect(rect);
+ paintedViewBoundingRect.translate(viewPrivate->dirtyScrollOffset);
+ if (!viewPrivate->updateRect(paintedViewBoundingRect))
+ paintedViewBoundingRect = QRect();
}
if (!item->d_ptr->dirty)
@@ -4366,7 +4393,6 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
if (uninitializedDirtyRect) {
dirtyRect = itemBoundingRect;
- _q_adjustRect(&dirtyRect);
if (!item->d_ptr->fullUpdatePending) {
_q_adjustRect(&item->d_ptr->needsRepaint);
dirtyRect &= item->d_ptr->needsRepaint;
@@ -4377,17 +4403,19 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
if (dirtyRect.isEmpty())
continue; // Discard updates outside the bounding rect.
- QTransform deviceTransform = item->d_ptr->sceneTransform;
- if (view->isTransformed()) {
- if (!untransformableItem)
- deviceTransform *= view->viewportTransform();
- else
- deviceTransform = item->deviceTransform(view->viewportTransform());
+ bool valid = false;
+ if (untransformableItem) {
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect,
+ item->deviceTransform(view->viewportTransform()));
+ } else if (!view->isTransformed()) {
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, item->d_ptr->sceneTransform);
+ } else {
+ QTransform deviceTransform = item->d_ptr->sceneTransform;
+ deviceTransform *= view->viewportTransform();
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, deviceTransform);
}
- if (item->d_ptr->hasBoundingRegionGranularity)
- viewPrivate->updateRegion(deviceTransform.map(QRegion(dirtyRect.toRect())));
- else
- viewPrivate->updateRect(deviceTransform.mapRect(dirtyRect).toRect());
+ if (!valid)
+ paintedViewBoundingRect = QRect();
}
}
}
@@ -4400,12 +4428,18 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
dirtyAncestorContainsChildren = item && item->d_ptr->fullUpdatePending
&& (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape);
}
+ const bool parentIgnoresVisible = item && item->d_ptr->ignoreVisible;
+ const bool parentIgnoresOpacity = item && item->d_ptr->ignoreOpacity;
for (int i = 0; i < children->size(); ++i) {
QGraphicsItem *child = children->at(i);
if (wasDirtyParentSceneTransform)
child->d_ptr->dirtySceneTransform = 1;
if (wasDirtyParentViewBoundingRects)
child->d_ptr->paintedViewBoundingRectsNeedRepaint = 1;
+ if (parentIgnoresVisible)
+ child->d_ptr->ignoreVisible = 1;
+ if (parentIgnoresOpacity)
+ child->d_ptr->ignoreOpacity = 1;
if (allChildrenDirty) {
child->d_ptr->dirty = 1;
@@ -4428,7 +4462,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
child->d_ptr->paintedViewBoundingRectsNeedRepaint = 0;
}
- processDirtyItemsRecursive(child, dirtyAncestorContainsChildren);
+ processDirtyItemsRecursive(child, dirtyAncestorContainsChildren, opacity);
}
} else if (wasDirtyParentSceneTransform) {
item->d_ptr->invalidateChildrenSceneTransform();
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index fd25283..ea65707 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -198,7 +198,8 @@ public:
void markDirty(QGraphicsItem *item, const QRectF &rect = QRectF(), bool invalidateChildren = false,
bool maybeDirtyClipPath = false, bool force = false, bool ignoreOpacity = false,
bool removingItemFromScene = false);
- void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false);
+ void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false,
+ qreal parentOpacity = qreal(1.0));
inline void resetDirtyItem(QGraphicsItem *item)
{
@@ -210,6 +211,8 @@ public:
item->d_ptr->needsRepaint = QRectF();
item->d_ptr->allChildrenDirty = 0;
item->d_ptr->fullUpdatePending = 0;
+ item->d_ptr->ignoreVisible = 0;
+ item->d_ptr->ignoreOpacity = 0;
}
QStyle *style;
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index a1e6d9c..ec1746a 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -815,19 +815,22 @@ void QGraphicsViewPrivate::processPendingUpdates()
dirtyRegion = QRegion();
}
-void QGraphicsViewPrivate::updateRegion(const QRegion &r)
+bool QGraphicsViewPrivate::updateRegion(const QRegion &r)
{
- if (r.isEmpty() || fullUpdatePending)
- return;
+ if (fullUpdatePending || viewportUpdateMode == QGraphicsView::NoViewportUpdate || r.isEmpty())
+ return false;
+
+ const QRect boundingRect = r.boundingRect();
+ if (!boundingRect.intersects(viewport->rect()))
+ return false; // Update region outside viewport.
- // Rect intersects viewport - update everything?
switch (viewportUpdateMode) {
case QGraphicsView::FullViewportUpdate:
fullUpdatePending = true;
viewport->update();
break;
case QGraphicsView::BoundingRectViewportUpdate:
- dirtyBoundingRect |= r.boundingRect();
+ dirtyBoundingRect |= boundingRect;
if (dirtyBoundingRect.contains(viewport->rect())) {
fullUpdatePending = true;
viewport->update();
@@ -845,18 +848,20 @@ void QGraphicsViewPrivate::updateRegion(const QRegion &r)
}
break;
}
- case QGraphicsView::NoViewportUpdate:
- // Unreachable
+ default:
break;
}
+
+ return true;
}
-void QGraphicsViewPrivate::updateRect(const QRect &r)
+bool QGraphicsViewPrivate::updateRect(const QRect &r)
{
- if (r.isEmpty() || fullUpdatePending)
- return;
+ if (fullUpdatePending || viewportUpdateMode == QGraphicsView::NoViewportUpdate
+ || !r.intersects(viewport->rect())) {
+ return false;
+ }
- // Rect intersects viewport - update everything?
switch (viewportUpdateMode) {
case QGraphicsView::FullViewportUpdate:
fullUpdatePending = true;
@@ -876,10 +881,11 @@ void QGraphicsViewPrivate::updateRect(const QRect &r)
else
dirtyRegion += r.adjusted(-2, -2, 2, 2);
break;
- case QGraphicsView::NoViewportUpdate:
- // Unreachable
+ default:
break;
}
+
+ return true;
}
QStyleOptionGraphicsItem *QGraphicsViewPrivate::allocStyleOptionsArray(int numItems)
@@ -1904,8 +1910,7 @@ void QGraphicsView::render(QPainter *painter, const QRectF &target, const QRect
itemList.clear();
// Setup painter matrix.
- QTransform moveMatrix;
- moveMatrix.translate(-d->horizontalScroll(), -d->verticalScroll());
+ QTransform moveMatrix = QTransform::fromTranslate(-d->horizontalScroll(), -d->verticalScroll());
QTransform painterMatrix = d->matrix * moveMatrix;
painterMatrix *= QTransform()
.translate(targetRect.left(), targetRect.top())
@@ -2187,9 +2192,9 @@ QPolygonF QGraphicsView::mapToScene(const QPolygon &polygon) const
QPainterPath QGraphicsView::mapToScene(const QPainterPath &path) const
{
Q_D(const QGraphicsView);
- QTransform moveMatrix;
- moveMatrix.translate(d->horizontalScroll(), d->verticalScroll());
- return (moveMatrix * d->matrix.inverted()).map(path);
+ QTransform matrix = QTransform::fromTranslate(d->horizontalScroll(), d->verticalScroll());
+ matrix *= d->matrix.inverted();
+ return matrix.map(path);
}
/*!
@@ -2283,9 +2288,9 @@ QPolygon QGraphicsView::mapFromScene(const QPolygonF &polygon) const
QPainterPath QGraphicsView::mapFromScene(const QPainterPath &path) const
{
Q_D(const QGraphicsView);
- QTransform moveMatrix;
- moveMatrix.translate(-d->horizontalScroll(), -d->verticalScroll());
- return (d->matrix * moveMatrix).map(path);
+ QTransform matrix = d->matrix;
+ matrix *= QTransform::fromTranslate(-d->horizontalScroll(), -d->verticalScroll());
+ return matrix.map(path);
}
/*!
@@ -3129,10 +3134,6 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Determine the exposed region
d->exposedRegion = event->region();
- if (!d->accelerateScrolling)
- d->exposedRegion = viewport()->rect();
- else if (d->viewportUpdateMode == BoundingRectViewportUpdate)
- d->exposedRegion = event->rect();
QRectF exposedSceneRect = mapToScene(d->exposedRegion.boundingRect()).boundingRect();
// Set up the painter
@@ -3146,8 +3147,10 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
painter.setRenderHints(d->renderHints, true);
// Set up viewport transform
- const QTransform viewTransform = viewportTransform();
- painter.setWorldTransform(viewTransform);
+ const bool viewTransformed = isTransformed();
+ if (viewTransformed)
+ painter.setWorldTransform(viewportTransform());
+ const QTransform viewTransform = painter.worldTransform();
// Draw background
if ((d->cacheMode & CacheBackground)
@@ -3172,16 +3175,21 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
if (!d->backgroundPixmapExposed.isEmpty()) {
QPainter backgroundPainter(&d->backgroundPixmap);
backgroundPainter.setClipRegion(d->backgroundPixmapExposed, Qt::ReplaceClip);
- backgroundPainter.setTransform(viewportTransform());
+ if (viewTransformed)
+ backgroundPainter.setTransform(viewTransform);
backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source);
drawBackground(&backgroundPainter, exposedSceneRect);
d->backgroundPixmapExposed = QRegion();
}
// Blit the background from the background pixmap
- painter.setWorldTransform(QTransform());
- painter.drawPixmap(QPoint(), d->backgroundPixmap);
- painter.setWorldTransform(viewTransform);
+ if (viewTransformed) {
+ painter.setWorldTransform(QTransform());
+ painter.drawPixmap(QPoint(), d->backgroundPixmap);
+ painter.setWorldTransform(viewTransform);
+ } else {
+ painter.drawPixmap(QPoint(), d->backgroundPixmap);
+ }
} else {
if (!(d->optimizationFlags & DontSavePainterState))
painter.save();
@@ -3204,8 +3212,10 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
const int numItems = itemList.size();
QGraphicsItem **itemArray = &itemList[0]; // Relies on QList internals, but is perfectly valid.
QStyleOptionGraphicsItem *styleOptionArray = d->allocStyleOptionsArray(numItems);
- for (int i = 0; i < numItems; ++i)
- itemArray[i]->d_ptr->initStyleOption(&styleOptionArray[i], viewTransform, d->exposedRegion, allItems);
+ for (int i = 0; i < numItems; ++i) {
+ itemArray[i]->d_ptr->initStyleOption(&styleOptionArray[i], viewTransform,
+ d->exposedRegion, allItems);
+ }
// Draw the items.
drawItems(&painter, numItems, itemArray, styleOptionArray);
d->freeStyleOptionsArray(styleOptionArray);
@@ -3444,8 +3454,7 @@ QTransform QGraphicsView::transform() const
QTransform QGraphicsView::viewportTransform() const
{
Q_D(const QGraphicsView);
- QTransform moveMatrix;
- moveMatrix.translate(-d->horizontalScroll(), -d->verticalScroll());
+ QTransform moveMatrix = QTransform::fromTranslate(-d->horizontalScroll(), -d->verticalScroll());
return d->identityMatrix ? moveMatrix : d->matrix * moveMatrix;
}
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 760f54e..d0c5e6e 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -167,8 +167,8 @@ public:
dirtyBoundingRect = QRect();
dirtyRegion = QRegion();
}
- void updateRect(const QRect &rect);
- void updateRegion(const QRegion &region);
+ bool updateRect(const QRect &rect);
+ bool updateRegion(const QRegion &region);
bool updateSceneSlotReimplementedChecked;
QRegion exposedRegion;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index ca2b782..fa1ce29 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -3951,10 +3951,8 @@ QImage QImage::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Transf
if (newSize == size())
return copy();
- QImage img;
- QTransform wm;
- wm.scale((qreal)newSize.width() / width(), (qreal)newSize.height() / height());
- img = transformed(wm, mode);
+ QTransform wm = QTransform::fromScale((qreal)newSize.width() / width(), (qreal)newSize.height() / height());
+ QImage img = transformed(wm, mode);
return img;
}
@@ -3981,9 +3979,8 @@ QImage QImage::scaledToWidth(int w, Qt::TransformationMode mode) const
if (w <= 0)
return QImage();
- QTransform wm;
qreal factor = (qreal) w / width();
- wm.scale(factor, factor);
+ QTransform wm = QTransform::fromScale(factor, factor);
return transformed(wm, mode);
}
@@ -4010,9 +4007,8 @@ QImage QImage::scaledToHeight(int h, Qt::TransformationMode mode) const
if (h <= 0)
return QImage();
- QTransform wm;
qreal factor = (qreal) h / height();
- wm.scale(factor, factor);
+ QTransform wm = QTransform::fromScale(factor, factor);
return transformed(wm, mode);
}
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 6da291c..61be832 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -552,7 +552,7 @@ bool QPixmap::isQBitmap() const
*/
bool QPixmap::isNull() const
{
- return data->width() == 0;
+ return data->isNull();
}
/*!
@@ -1446,10 +1446,9 @@ QPixmap QPixmap::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Tran
if (newSize == size())
return *this;
- QPixmap pix;
- QTransform wm;
- wm.scale((qreal)newSize.width() / width(), (qreal)newSize.height() / height());
- pix = transformed(wm, mode);
+ QTransform wm = QTransform::fromScale((qreal)newSize.width() / width(),
+ (qreal)newSize.height() / height());
+ QPixmap pix = transformed(wm, mode);
return pix;
}
@@ -1476,9 +1475,8 @@ QPixmap QPixmap::scaledToWidth(int w, Qt::TransformationMode mode) const
if (w <= 0)
return QPixmap();
- QTransform wm;
qreal factor = (qreal) w / width();
- wm.scale(factor, factor);
+ QTransform wm = QTransform::fromScale(factor, factor);
return transformed(wm, mode);
}
@@ -1505,9 +1503,8 @@ QPixmap QPixmap::scaledToHeight(int h, Qt::TransformationMode mode) const
if (h <= 0)
return QPixmap();
- QTransform wm;
qreal factor = (qreal) h / height();
- wm.scale(factor, factor);
+ QTransform wm = QTransform::fromScale(factor, factor);
return transformed(wm, mode);
}
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index e4faebd..d1e2ecb 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -79,11 +79,11 @@ public:
QPixmap &operator=(const QPixmap &);
operator QVariant() const;
- bool isNull() const;
+ bool isNull() const; // ### Qt 5: make inline
int devType() const;
- int width() const;
- int height() const;
+ int width() const; // ### Qt 5: make inline
+ int height() const; // ### Qt 5: make inline
QSize size() const;
QRect rect() const;
int depth() const;
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index ca9d497..b40694a 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -168,7 +168,7 @@ static inline QRgb qt_conv16ToRgb(ushort c) {
QSet<QMacPixmapData*> QMacPixmapData::validDataPointers;
QMacPixmapData::QMacPixmapData(PixelType type)
- : QPixmapData(type, MacClass), w(0), h(0), d(0), has_alpha(0), has_mask(0),
+ : QPixmapData(type, MacClass), has_alpha(0), has_mask(0),
uninit(true), pixels(0), pixelsToFree(0), bytesPerRow(0),
cg_data(0), cg_dataBeingReleased(0), cg_mask(0),
#ifndef QT_MAC_NO_QUICKDRAW
@@ -188,11 +188,13 @@ void QMacPixmapData::resize(int width, int height)
w = width;
h = height;
+ is_null = (w <= 0 || h <= 0);
d = (pixelType() == BitmapType ? 1 : 32);
bool make_null = w <= 0 || h <= 0; // create null pixmap
if (make_null || d == 0) {
w = 0;
h = 0;
+ is_null = true;
d = 0;
if (!make_null)
qWarning("Qt: QPixmap: Invalid pixmap parameters");
@@ -231,6 +233,7 @@ void QMacPixmapData::fromImage(const QImage &img,
w = img.width();
h = img.height();
+ is_null = (w <= 0 || h <= 0);
d = (pixelType() == BitmapType ? 1 : img.depth());
QImage image = img;
diff --git a/src/gui/image/qpixmap_mac_p.h b/src/gui/image/qpixmap_mac_p.h
index 66797ed..a3ff0d3 100644
--- a/src/gui/image/qpixmap_mac_p.h
+++ b/src/gui/image/qpixmap_mac_p.h
@@ -83,7 +83,6 @@ public:
QPaintEngine* paintEngine() const;
private:
- int w, h, d;
uint has_alpha : 1, has_mask : 1, uninit : 1;
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 2c57ede..9cc896b 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -85,6 +85,10 @@ void QRasterPixmapData::resize(int width, int height)
#endif
image = QImage(width, height, format);
+ w = width;
+ h = height;
+ d = image.depth();
+ is_null = (w <= 0 || h <= 0);
if (pixelType() == BitmapType && !image.isNull()) {
image.setNumColors(2);
@@ -168,6 +172,10 @@ void QRasterPixmapData::fromImage(const QImage &sourceImage,
}
}
#endif
+ w = image.d->width;
+ h = image.d->height;
+ d = image.d->depth;
+ is_null = (w <= 0 || h <= 0);
setSerialNumber(image.serialNumber());
}
@@ -329,9 +337,9 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
// override the image dpi with the screen dpi when rendering to a pixmap
switch (metric) {
case QPaintDevice::PdmWidth:
- return d->width;
+ return w;
case QPaintDevice::PdmHeight:
- return d->height;
+ return h;
case QPaintDevice::PdmWidthMM:
return qRound(d->width * 25.4 / qt_defaultDpiX());
case QPaintDevice::PdmHeightMM:
@@ -339,7 +347,7 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
case QPaintDevice::PdmNumColors:
return d->colortable.size();
case QPaintDevice::PdmDepth:
- return d->depth;
+ return this->d;
case QPaintDevice::PdmDpiX: // fall-through
case QPaintDevice::PdmPhysicalDpiX:
return qt_defaultDpiX();
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index b7fe92a..86cf515 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -312,7 +312,7 @@ static int qt_pixmap_serial = 0;
int Q_GUI_EXPORT qt_x11_preferred_pixmap_depth = 0;
QX11PixmapData::QX11PixmapData(PixelType type)
- : QPixmapData(type, X11Class), hd(0), w(0), h(0), d(0),
+ : QPixmapData(type, X11Class), hd(0),
uninit(true), read_only(false), x11_mask(0), picture(0), mask_picture(0), hd2(0),
share_mode(QPixmap::ImplicitlyShared), pengine(0)
{
@@ -324,6 +324,7 @@ void QX11PixmapData::resize(int width, int height)
w = width;
h = height;
+ is_null = (w <= 0 || h <= 0);
if (defaultScreen >= 0 && defaultScreen != xinfo.screen()) {
QX11InfoData* xd = xinfo.getX11Data(true);
@@ -347,6 +348,7 @@ void QX11PixmapData::resize(int width, int height)
if (make_null || d == 0) {
w = 0;
h = 0;
+ is_null = true;
hd = 0;
picture = 0;
d = 0;
@@ -375,6 +377,7 @@ void QX11PixmapData::fromImage(const QImage &img,
w = img.width();
h = img.height();
d = img.depth();
+ is_null = (w <= 0 || h <= 0);
if (defaultScreen >= 0 && defaultScreen != xinfo.screen()) {
QX11InfoData* xd = xinfo.getX11Data(true);
@@ -395,6 +398,7 @@ void QX11PixmapData::fromImage(const QImage &img,
if (uint(w) >= 32768 || uint(h) >= 32768) {
w = h = 0;
+ is_null = true;
return;
}
@@ -1109,6 +1113,7 @@ void QX11PixmapData::bitmapFromImage(const QImage &image)
w = img.width();
h = img.height();
d = 1;
+ is_null = (w <= 0 || h <= 0);
int bpl = (w + 7) / 8;
int ibpl = img.bytesPerLine();
if (bpl != ibpl) {
@@ -1876,6 +1881,7 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform,
x11Data->d = d;
x11Data->w = w;
x11Data->h = h;
+ x11Data->is_null = (w <= 0 || h <= 0);
x11Data->hd = (Qt::HANDLE)XCreatePixmap(X11->display,
RootWindow(X11->display, xinfo.screen()),
w, h, d);
@@ -2132,6 +2138,7 @@ void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect)
d = x11Data->d;
w = rect.width();
h = rect.height();
+ is_null = (w <= 0 || h <= 0);
hd = (Qt::HANDLE)XCreatePixmap(X11->display,
RootWindow(X11->display, x11Data->xinfo.screen()),
w, h, d);
@@ -2250,6 +2257,7 @@ QPixmap QPixmap::fromX11Pixmap(Qt::HANDLE pixmap, QPixmap::ShareMode mode)
data->uninit = false;
data->w = width;
data->h = height;
+ data->is_null = (width <= 0 || height <= 0);
data->d = depth;
data->hd = pixmap;
diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h
index addcc7c..3de9a0f 100644
--- a/src/gui/image/qpixmap_x11_p.h
+++ b/src/gui/image/qpixmap_x11_p.h
@@ -108,8 +108,6 @@ private:
Qt::HANDLE hd;
- int w, h;
- short d;
uint uninit : 1;
uint read_only : 1;
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index 094d7e4..b50d664 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -49,9 +49,17 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
0x10, 0x20, 0x40, 0x80 };
QPixmapData::QPixmapData(PixelType pixelType, int objectId)
- : ref(0), detach_no(0), type(pixelType), id(objectId), ser_no(0), is_cached(false)
+ : w(0),
+ h(0),
+ d(0),
+ is_null(true),
+ ref(0),
+ detach_no(0),
+ type(pixelType),
+ id(objectId),
+ ser_no(0),
+ is_cached(false)
{
-
}
QPixmapData::~QPixmapData()
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index 4c49dd2..29dafaf 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -99,13 +99,18 @@ public:
virtual QImage* buffer();
- int width() const { return metric(QPaintDevice::PdmWidth); }
- int height() const { return metric(QPaintDevice::PdmHeight); }
- int numColors() const { return metric(QPaintDevice::PdmNumColors); }
- int depth() const { return metric(QPaintDevice::PdmDepth); }
+ inline int width() const { return w; }
+ inline int height() const { return h; }
+ inline int numColors() const { return metric(QPaintDevice::PdmNumColors); }
+ inline int depth() const { return d; }
+ inline bool isNull() const { return is_null; }
protected:
void setSerialNumber(int serNo);
+ int w;
+ int h;
+ int d;
+ bool is_null;
private:
friend class QPixmap;
diff --git a/src/gui/itemviews/qitemeditorfactory.cpp b/src/gui/itemviews/qitemeditorfactory.cpp
index c576e40..480a472 100644
--- a/src/gui/itemviews/qitemeditorfactory.cpp
+++ b/src/gui/itemviews/qitemeditorfactory.cpp
@@ -158,6 +158,10 @@ QByteArray QItemEditorFactory::valuePropertyName(QVariant::Type type) const
*/
QItemEditorFactory::~QItemEditorFactory()
{
+ //we make sure we delete all the QItemEditorCreatorBase
+ //this has to be done only once, hence the QSet
+ QSet<QItemEditorCreatorBase*> set = creatorMap.values().toSet();
+ qDeleteAll(set);
}
/*!
@@ -170,8 +174,16 @@ QItemEditorFactory::~QItemEditorFactory()
*/
void QItemEditorFactory::registerEditor(QVariant::Type type, QItemEditorCreatorBase *creator)
{
- delete creatorMap.value(type, 0);
- creatorMap[type] = creator;
+ QHash<QVariant::Type, QItemEditorCreatorBase *>::iterator it = creatorMap.find(type);
+ if (it != creatorMap.end()) {
+ QItemEditorCreatorBase *oldCreator = it.value();
+ Q_ASSERT(oldCreator);
+ creatorMap.erase(it);
+ if (!creatorMap.values().contains(oldCreator))
+ delete oldCreator; // if it is no more in use we can delete it
+ }
+
+ creatorMap[type] = creator;
}
class QDefaultItemEditorFactory : public QItemEditorFactory
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 9b25730..f1b0d19 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -827,6 +827,8 @@ void QListView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
*/
void QListView::mouseMoveEvent(QMouseEvent *e)
{
+ if (!isVisible())
+ return;
Q_D(QListView);
QAbstractItemView::mouseMoveEvent(e);
if (state() == DragSelectingState
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 988b34a..942836a 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -4611,6 +4611,46 @@ void fetchWacomToolId(int &deviceType, qint64 &serialId)
}
#endif
+struct qt_tablet_motion_data
+{
+ Time timestamp;
+ int tabletMotionType;
+ bool error; // found a reason to stop searching
+};
+
+static Bool qt_mouseMotion_scanner(Display *, XEvent *event, XPointer arg)
+{
+ qt_tablet_motion_data *data = (qt_tablet_motion_data *) arg;
+ if (data->error)
+ return false;
+
+ if (event->type == MotionNotify)
+ return true;
+
+ data->error = event->type != data->tabletMotionType; // we stop compression when another event gets in between.
+ return false;
+}
+
+static Bool qt_tabletMotion_scanner(Display *, XEvent *event, XPointer arg)
+{
+ qt_tablet_motion_data *data = (qt_tablet_motion_data *) arg;
+ if (data->error)
+ return false;
+
+ if (event->type == data->tabletMotionType) {
+ if (data->timestamp > 0) {
+ if ((reinterpret_cast<const XDeviceMotionEvent*>(event))->time > data->timestamp) {
+ data->error = true;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ data->error = event->type != MotionNotify; // we stop compression when another event gets in between.
+ return false;
+}
+
bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet)
{
#if defined (Q_OS_IRIX)
@@ -4637,7 +4677,6 @@ bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet
qreal rotation = 0;
int deviceType = QTabletEvent::NoDevice;
int pointerType = QTabletEvent::UnknownPointer;
- XEvent xinputMotionEvent;
XEvent mouseMotionEvent;
const XDeviceMotionEvent *motion = 0;
XDeviceButtonEvent *button = 0;
@@ -4645,8 +4684,6 @@ bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet
QEvent::Type t;
Qt::KeyboardModifiers modifiers = 0;
bool reinsertMouseEvent = false;
- bool neverFoundMouseEvent = true;
- XEvent xinputMotionEventNext;
XEvent mouseMotionEventSave;
#if !defined (Q_OS_IRIX)
XID device_id;
@@ -4654,72 +4691,41 @@ bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet
if (ev->type == tablet->xinput_motion) {
motion = reinterpret_cast<const XDeviceMotionEvent*>(ev);
- for (;;) {
- // get the corresponding mouseMotionEvent for motion
- if (XCheckTypedWindowEvent(X11->display, internalWinId(), MotionNotify, &mouseMotionEvent)) {
+
+ // Do event compression. Skip over tablet+mouse move events if there are newer ones.
+ qt_tablet_motion_data tabletMotionData;
+ tabletMotionData.tabletMotionType = tablet->xinput_motion;
+ while (true) {
+ // Find first mouse event since we expect them in pairs inside Qt
+ tabletMotionData.error =false;
+ tabletMotionData.timestamp = 0;
+ if (XCheckIfEvent(X11->display, &mouseMotionEvent, &qt_mouseMotion_scanner, (XPointer) &tabletMotionData)) {
mouseMotionEventSave = mouseMotionEvent;
reinsertMouseEvent = true;
- neverFoundMouseEvent = false;
-
- if (mouseMotionEvent.xmotion.time > motion->time) {
- XEvent xinputMotionEventLoop = *ev;
-
- // xinput event is older than the mouse event --> search for the corresponding xinput event for the given mouse event
- while (mouseMotionEvent.xmotion.time > (reinterpret_cast<const XDeviceMotionEvent*>(&xinputMotionEventLoop))->time) {
- if (XCheckTypedWindowEvent(X11->display, internalWinId(), tablet->xinput_motion, &xinputMotionEventLoop)) {
- xinputMotionEvent = xinputMotionEventLoop;
- }
- else {
- break;
- }
- }
- motion = reinterpret_cast<const XDeviceMotionEvent*>(&xinputMotionEvent);
- }
-
- // get the next xinputMotionEvent, for the next loop run
- if (!XCheckTypedWindowEvent(X11->display, internalWinId(), tablet->xinput_motion, &xinputMotionEventNext)) {
- XPutBackEvent(X11->display, &mouseMotionEvent);
- reinsertMouseEvent = false;
- break;
- }
-
- if (mouseMotionEvent.xmotion.time != motion->time) {
- // reinsert in order
- if (mouseMotionEvent.xmotion.time >= motion->time) {
- XPutBackEvent(X11->display, &mouseMotionEvent);
- XPutBackEvent(X11->display, &xinputMotionEventNext);
- // next entry in queue is xinputMotionEventNext
- }
- else {
- XPutBackEvent(X11->display, &xinputMotionEventNext);
- XPutBackEvent(X11->display, &mouseMotionEvent);
- // next entry in queue is mouseMotionEvent
- }
- reinsertMouseEvent = false;
- break;
- }
- }
- else {
+ } else {
break;
}
- xinputMotionEvent = xinputMotionEventNext;
- motion = (reinterpret_cast<const XDeviceMotionEvent*>(&xinputMotionEvent));
- }
+ // Now discard any duplicate tablet events.
+ XEvent dummy;
+ tabletMotionData.error = false;
+ tabletMotionData.timestamp = mouseMotionEvent.xmotion.time;
+ while (XCheckIfEvent(X11->display, &dummy, &qt_tabletMotion_scanner, (XPointer) &tabletMotionData)) {
+ motion = reinterpret_cast<const XDeviceMotionEvent*>(&dummy);
+ }
- if (reinsertMouseEvent) {
- XPutBackEvent(X11->display, &mouseMotionEventSave);
+ // now check if there are more recent tablet motion events since we'll compress the current one with
+ // newer ones in that case
+ tabletMotionData.error = false;
+ tabletMotionData.timestamp = 0;
+ if (! XCheckIfEvent(X11->display, &dummy, &qt_tabletMotion_scanner, (XPointer) &tabletMotionData)) {
+ break; // done with compression
+ }
+ motion = reinterpret_cast<const XDeviceMotionEvent*>(&dummy);
}
- if (neverFoundMouseEvent) {
- XEvent xinputMotionEventLoop;
- bool eventFound = false;
- // xinput event without mouseMotionEvent --> search the newest xinputMotionEvent
- while (XCheckTypedWindowEvent(X11->display, internalWinId(), tablet->xinput_motion, &xinputMotionEventLoop)) {
- xinputMotionEvent = xinputMotionEventLoop;
- eventFound = true;
- }
- if (eventFound) motion = reinterpret_cast<const XDeviceMotionEvent*>(&xinputMotionEvent);
+ if (reinsertMouseEvent) {
+ XPutBackEvent(X11->display, &mouseMotionEventSave);
}
t = QEvent::TabletMove;
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 7c50b80..62addd3 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -197,6 +197,10 @@ QT_BEGIN_NAMESPACE
/*****************************************************************************
QMatrix member functions
*****************************************************************************/
+/*!
+ \fn QMatrix::QMatrix(Qt::Uninitialized)
+ \internal
+*/
/*!
Constructs an identity matrix.
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index e28c950..b2e5d70 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -61,6 +61,7 @@ class QVariant;
class Q_GUI_EXPORT QMatrix // 2D transform matrix
{
public:
+ inline explicit QMatrix(enum Qt::Uninitialized) {}
QMatrix();
QMatrix(qreal m11, qreal m12, qreal m21, qreal m22,
qreal dx, qreal dy);
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index 8e8485d..4fb1832 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -1008,8 +1008,7 @@ void QPaintEnginePrivate::drawBoxTextItem(const QPointF &p, const QTextItemInt &
const int size = qRound(ti.fontEngine->ascent());
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix;
- matrix.translate(p.x(), p.y() - size);
+ QTransform matrix = QTransform::fromTranslate(p.x(), p.y() - size);
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
if (glyphs.size() == 0)
return;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 1d3e38e..78515ac 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3996,7 +3996,7 @@ void QRasterPaintEnginePrivate::initializeRasterizer(QSpanData *data)
const QClipData *c = clip();
if (c) {
const QRect r(QPoint(c->xmin, c->ymin),
- QPoint(c->xmax, c->ymax));
+ QSize(c->xmax - c->xmin, c->ymax - c->ymin));
clipRect = clipRect.intersected(r);
blend = data->blend;
} else {
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 5ebca47..a4db284 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -848,8 +848,7 @@ void QPaintEngineEx::drawImage(const QPointF &pos, const QImage &image)
void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
QBrush brush(state()->pen.color(), pixmap);
- QTransform xform;
- xform.translate(r.x() - s.x(), r.y() - s.y());
+ QTransform xform = QTransform::fromTranslate(r.x() - s.x(), r.y() - s.y());
brush.setTransform(xform);
qreal pts[] = { r.x(), r.y(),
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 9625b28..053955c 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -45,9 +45,6 @@
#include <private/qdatabuffer_p.h>
#include <qmath.h>
-#include <QImage>
-#include <QPainter>
-
/**
The algorithm is as follows:
@@ -68,6 +65,20 @@
QT_BEGIN_NAMESPACE
+static inline bool fuzzyIsNull(qreal d)
+{
+ if (sizeof(qreal) == sizeof(double))
+ return qAbs(d) <= 1e-12;
+ else
+ return qAbs(d) <= 1e-5f;
+}
+
+static inline bool comparePoints(const QPointF &a, const QPointF &b)
+{
+ return fuzzyIsNull(a.x() - b.x())
+ && fuzzyIsNull(a.y() - b.y());
+}
+
//#define QDEBUG_CLIPPER
static qreal dot(const QPointF &a, const QPointF &b)
{
@@ -105,8 +116,10 @@ private:
bool QIntersectionFinder::beziersIntersect(const QBezier &one, const QBezier &two) const
{
- return (one.pt1() == two.pt1() && one.pt2() == two.pt2() && one.pt3() == two.pt3() && one.pt4() == two.pt4())
- || (one.pt1() == two.pt4() && one.pt2() == two.pt3() && one.pt3() == two.pt2() && one.pt4() == two.pt1())
+ return (comparePoints(one.pt1(), two.pt1()) && comparePoints(one.pt2(), two.pt2())
+ && comparePoints(one.pt3(), two.pt3()) && comparePoints(one.pt4(), two.pt4()))
+ || (comparePoints(one.pt1(), two.pt4()) && comparePoints(one.pt2(), two.pt3())
+ && comparePoints(one.pt3(), two.pt2()) && comparePoints(one.pt4(), two.pt1()))
|| QBezier::findIntersections(one, two, 0);
}
@@ -118,17 +131,17 @@ bool QIntersectionFinder::linesIntersect(const QLineF &a, const QLineF &b) const
const QPointF q1 = b.p1();
const QPointF q2 = b.p2();
- if (p1 == p2 || q1 == q2)
+ if (comparePoints(p1, p2) || comparePoints(q1, q2))
return false;
- const bool p1_equals_q1 = (p1 == q1);
- const bool p2_equals_q2 = (p2 == q2);
+ const bool p1_equals_q1 = comparePoints(p1, q1);
+ const bool p2_equals_q2 = comparePoints(p2, q2);
if (p1_equals_q1 && p2_equals_q2)
return true;
- const bool p1_equals_q2 = (p1 == q2);
- const bool p2_equals_q1 = (p2 == q1);
+ const bool p1_equals_q2 = comparePoints(p1, q2);
+ const bool p2_equals_q1 = comparePoints(p2, q1);
if (p1_equals_q2 && p2_equals_q1)
return true;
@@ -184,8 +197,10 @@ bool QIntersectionFinder::linesIntersect(const QLineF &a, const QLineF &b) const
void QIntersectionFinder::intersectBeziers(const QBezier &one, const QBezier &two, QVector<QPair<qreal, qreal> > &t, QDataBuffer<QIntersection> &intersections)
{
- if ((one.pt1() == two.pt1() && one.pt2() == two.pt2() && one.pt3() == two.pt3() && one.pt4() == two.pt4())
- || (one.pt1() == two.pt4() && one.pt2() == two.pt3() && one.pt3() == two.pt2() && one.pt4() == two.pt1())) {
+ if ((comparePoints(one.pt1(), two.pt1()) && comparePoints(one.pt2(), two.pt2())
+ && comparePoints(one.pt3(), two.pt3()) && comparePoints(one.pt4(), two.pt4()))
+ || (comparePoints(one.pt1(), two.pt4()) && comparePoints(one.pt2(), two.pt3())
+ && comparePoints(one.pt3(), two.pt2()) && comparePoints(one.pt4(), two.pt1()))) {
return;
}
@@ -230,17 +245,17 @@ void QIntersectionFinder::intersectLines(const QLineF &a, const QLineF &b, QData
const QPointF q1 = b.p1();
const QPointF q2 = b.p2();
- if (p1 == p2 || q1 == q2)
+ if (comparePoints(p1, p2) || comparePoints(q1, q2))
return;
- const bool p1_equals_q1 = (p1 == q1);
- const bool p2_equals_q2 = (p2 == q2);
+ const bool p1_equals_q1 = comparePoints(p1, q1);
+ const bool p2_equals_q2 = comparePoints(p2, q2);
if (p1_equals_q1 && p2_equals_q2)
return;
- const bool p1_equals_q2 = (p1 == q2);
- const bool p2_equals_q1 = (p2 == q1);
+ const bool p1_equals_q2 = comparePoints(p1, q2);
+ const bool p2_equals_q1 = comparePoints(p2, q1);
if (p1_equals_q2 && p2_equals_q1)
return;
@@ -624,11 +639,11 @@ public:
const qreal pivot = pivotComponents[depth & 1];
const qreal value = pointComponents[depth & 1];
- if (qFuzzyCompare(pivot, value)) {
+ if (fuzzyIsNull(pivot - value)) {
const qreal pivot2 = pivotComponents[(depth + 1) & 1];
const qreal value2 = pointComponents[(depth + 1) & 1];
- if (qFuzzyCompare(pivot2, value2)) {
+ if (fuzzyIsNull(pivot2 - value2)) {
if (node.id < 0)
node.id = m_tree->nextId();
@@ -802,15 +817,15 @@ QWingedEdge::TraversalStatus QWingedEdge::next(const QWingedEdge::TraversalStatu
static bool isLine(const QBezier &bezier)
{
- const bool equal_1_2 = bezier.pt1() == bezier.pt2();
- const bool equal_2_3 = bezier.pt2() == bezier.pt3();
- const bool equal_3_4 = bezier.pt3() == bezier.pt4();
+ const bool equal_1_2 = comparePoints(bezier.pt1(), bezier.pt2());
+ const bool equal_2_3 = comparePoints(bezier.pt2(), bezier.pt3());
+ const bool equal_3_4 = comparePoints(bezier.pt3(), bezier.pt4());
// point?
if (equal_1_2 && equal_2_3 && equal_3_4)
return true;
- if (bezier.pt1() == bezier.pt4())
+ if (comparePoints(bezier.pt1(), bezier.pt4()))
return equal_1_2 || equal_3_4;
return (equal_1_2 && equal_3_4) || (equal_1_2 && equal_2_3) || (equal_2_3 && equal_3_4);
@@ -844,14 +859,14 @@ void QPathSegments::addPath(const QPainterPath &path)
else
currentPoint = path.elementAt(i);
- if (i > 0 && m_points.at(lastMoveTo) == currentPoint)
+ if (i > 0 && comparePoints(m_points.at(lastMoveTo), currentPoint))
current = lastMoveTo;
else
m_points << currentPoint;
switch (path.elementAt(i).type) {
case QPainterPath::MoveToElement:
- if (hasMoveTo && last != lastMoveTo && m_points.at(last) != m_points.at(lastMoveTo))
+ if (hasMoveTo && last != lastMoveTo && !comparePoints(m_points.at(last), m_points.at(lastMoveTo)))
m_segments << Segment(m_pathId, last, lastMoveTo);
hasMoveTo = true;
last = lastMoveTo = current;
@@ -879,7 +894,7 @@ void QPathSegments::addPath(const QPainterPath &path)
}
}
- if (hasMoveTo && last != lastMoveTo && m_points.at(last) != m_points.at(lastMoveTo))
+ if (hasMoveTo && last != lastMoveTo && !comparePoints(m_points.at(last), m_points.at(lastMoveTo)))
m_segments << Segment(m_pathId, last, lastMoveTo);
for (int i = firstSegment; i < m_segments.size(); ++i) {
@@ -1357,7 +1372,7 @@ void QWingedEdge::addBezierEdge(const QBezier *bezier, const QPointF &a, const Q
if (qFuzzyCompare(alphaA, alphaB))
return;
- if (a == b) {
+ if (comparePoints(a, b)) {
int v = insert(a);
addBezierEdge(bezier, v, v, alphaA, alphaB, path);
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index c3452e1..664751a 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1929,8 +1929,7 @@ void QPdfBaseEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &t
QVarLengthArray<glyph_t> glyphs;
QVarLengthArray<QFixedPoint> positions;
- QTransform m;
- m.translate(p.x(), p.y());
+ QTransform m = QTransform::fromTranslate(p.x(), p.y());
ti.fontEngine->getGlyphPositions(ti.glyphs, m, ti.flags,
glyphs, positions);
if (glyphs.size() == 0)
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index 179927f..72faf7c 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -663,8 +663,7 @@ void QWin32PrintEngine::drawPixmap(const QRectF &targetRect,
qreal scaleX = 1.0f;
qreal scaleY = 1.0f;
- QTransform scaleMatrix;
- scaleMatrix.scale(r.width() / pixmap.width(), r.height() / pixmap.height());
+ QTransform scaleMatrix = QTransform::fromScale(r.width() / pixmap.width(), r.height() / pixmap.height());
QTransform adapted = QPixmap::trueMatrix(d->painterMatrix * scaleMatrix,
pixmap.width(), pixmap.height());
@@ -1875,8 +1874,7 @@ static void draw_text_item_win(const QPointF &_pos, const QTextItemInt &ti, HDC
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> _glyphs;
- QTransform matrix;
- matrix.translate(baseline_pos.x(), baseline_pos.y());
+ QTransform matrix = QTransform::fromTranslate(baseline_pos.x(), baseline_pos.y());
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags,
_glyphs, positions);
if (_glyphs.size() == 0) {
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 629b38e..58e4b4e 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -703,7 +703,7 @@ static inline qreal qRoundF(qreal v)
void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap)
{
- if (a == b || width == 0)
+ if (a == b || width == 0 || d->clipRect.isEmpty())
return;
QPointF pa = a;
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 5b1ae07..85adb27 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -232,6 +232,11 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QTransform::QTransform(Qt::Uninitialized)
+ \internal
+*/
+
+/*!
Constructs an identity matrix.
All elements are set to zero except \c m11 and \c m22 (specifying
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index bb04f7b..f99b0e7 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -71,6 +71,7 @@ public:
TxProject = 0x10
};
+ inline explicit QTransform(enum Qt::Uninitialized) : affine(Qt::Uninitialized) {}
QTransform();
QTransform(qreal h11, qreal h12, qreal h13,
qreal h21, qreal h22, qreal h23,
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index 902ffdd..3855ba7 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -1738,8 +1738,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
// same rendering code for both orientations.
if (vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height
- QTransform m;
- m.translate(rect.height()-1, -1.0);
+ QTransform m = QTransform::fromTranslate(rect.height()-1, -1.0);
m.rotate(90.0);
painter->setTransform(m, true);
}
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 682e00b..c5c6973 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1963,8 +1963,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
newRot = -90;
}
tr.setRect(0, 0, tr.height(), tr.width());
- QTransform m;
- m.translate(newX, newY);
+ QTransform m = QTransform::fromTranslate(newX, newY);
m.rotate(newRot);
p->setTransform(m, true);
}
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index a4a468d..8499811 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -2848,8 +2848,7 @@ void QGtkStyle::drawControl(ControlElement element,
if (vertical) {
rect.translate(xt, -yt * 2);
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // Flip width and height
- QTransform m;
- m.translate(rect.height(), 0);
+ QTransform m = QTransform::fromTranslate(rect.height(), 0);
m.rotate(90.0);
painter->setTransform(m);
}
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 3935dc1..12aa679 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -2642,8 +2642,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// same rendering code for both orientations.
if (vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height
- QTransform m;
- m.translate(rect.height()-1, 0);
+ QTransform m = QTransform::fromTranslate(rect.height()-1, 0);
m.rotate(90.0);
painter->setTransform(m, true);
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 25bdfd2..05b3695 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -422,8 +422,7 @@ void QFontEngine::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs,
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> positioned_glyphs;
- QTransform matrix;
- matrix.translate(x, y);
+ QTransform matrix = QTransform::fromTranslate(x, y);
getGlyphPositions(glyphs, matrix, flags, positioned_glyphs, positions);
addGlyphsToPath(positioned_glyphs.data(), positions.data(), positioned_glyphs.size(), path, flags);
}
@@ -1151,8 +1150,7 @@ void QFontEngineBox::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyp
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> positioned_glyphs;
- QTransform matrix;
- matrix.translate(x, y - _size);
+ QTransform matrix = QTransform::fromTranslate(x, y - _size);
getGlyphPositions(glyphs, matrix, flags, positioned_glyphs, positions);
QSize s(_size - 3, _size - 3);
@@ -1180,8 +1178,7 @@ void QFontEngineBox::draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix;
- matrix.translate(x, y - _size);
+ QTransform matrix = QTransform::fromTranslate(x, y - _size);
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
if (glyphs.size() == 0)
return;
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 3857e30..34de252 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -1253,7 +1253,8 @@ void QMenuBar::mouseMoveEvent(QMouseEvent *e)
void QMenuBar::leaveEvent(QEvent *)
{
Q_D(QMenuBar);
- if(!hasFocus() && !d->popupState)
+ if((!hasFocus() && !d->popupState) ||
+ (d->currentAction && d->currentAction->menu() == 0))
d->setCurrentAction(0);
}
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index d1978e3..efacd00 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1725,8 +1725,7 @@ static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, QRectF
p->save();
if (brush.style() >= Qt::LinearGradientPattern && brush.style() <= Qt::ConicalGradientPattern) {
if (!gradientRect.isNull()) {
- QTransform m;
- m.translate(gradientRect.left(), gradientRect.top());
+ QTransform m = QTransform::fromTranslate(gradientRect.left(), gradientRect.top());
m.scale(gradientRect.width(), gradientRect.height());
brush.setTransform(m);
const_cast<QGradient *>(brush.gradient())->setCoordinateMode(QGradient::LogicalMode);
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index cfce735..f0c694d 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -1020,7 +1020,8 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
for (int i = 0; i < channelCount; ++i) {
if (channels[i].reply == reply) {
channels[i].reply = 0;
- closeChannel(i);
+ if (reply->d_func()->connectionCloseEnabled())
+ closeChannel(i);
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
return;
}
diff --git a/src/network/access/qnetworkaccesscache_p.h b/src/network/access/qnetworkaccesscache_p.h
index 3fdfbb4..439b3a0 100644
--- a/src/network/access/qnetworkaccesscache_p.h
+++ b/src/network/access/qnetworkaccesscache_p.h
@@ -64,6 +64,9 @@ QT_BEGIN_NAMESPACE
class QNetworkRequest;
class QUrl;
+// this class is not about caching files but about
+// caching objects used by QNetworkAccessManager, e.g. existing TCP connections
+// or credentials.
class QNetworkAccessCache: public QObject
{
Q_OBJECT
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index 9be433d..d6276a3 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -82,11 +82,11 @@ QNetworkAccessFtpBackendFactory::create(QNetworkAccessManager::Operation op,
return 0;
}
-class QNetworkAccessFtpFtp: public QFtp, public QNetworkAccessCache::CacheableObject
+class QNetworkAccessCachedFtpConnection: public QFtp, public QNetworkAccessCache::CacheableObject
{
// Q_OBJECT
public:
- QNetworkAccessFtpFtp()
+ QNetworkAccessCachedFtpConnection()
{
setExpires(true);
setShareable(false);
@@ -148,11 +148,11 @@ void QNetworkAccessFtpBackend::open()
}
state = LoggingIn;
- QNetworkAccessCache* cache = QNetworkAccessManagerPrivate::getCache(this);
+ QNetworkAccessCache* objectCache = QNetworkAccessManagerPrivate::getObjectCache(this);
QByteArray cacheKey = makeCacheKey(url);
- if (!cache->requestEntry(cacheKey, this,
+ if (!objectCache->requestEntry(cacheKey, this,
SLOT(ftpConnectionReady(QNetworkAccessCache::CacheableObject*)))) {
- ftp = new QNetworkAccessFtpFtp;
+ ftp = new QNetworkAccessCachedFtpConnection;
#ifndef QT_NO_NETWORKPROXY
if (proxy.type() == QNetworkProxy::FtpCachingProxy)
ftp->setProxy(proxy.hostName(), proxy.port());
@@ -160,7 +160,7 @@ void QNetworkAccessFtpBackend::open()
ftp->connectToHost(url.host(), url.port(DefaultFtpPort));
ftp->login(url.userName(), url.password());
- cache->addEntry(cacheKey, ftp);
+ objectCache->addEntry(cacheKey, ftp);
ftpConnectionReady(ftp);
}
@@ -207,7 +207,7 @@ void QNetworkAccessFtpBackend::downstreamReadyWrite()
void QNetworkAccessFtpBackend::ftpConnectionReady(QNetworkAccessCache::CacheableObject *o)
{
- ftp = static_cast<QNetworkAccessFtpFtp *>(o);
+ ftp = static_cast<QNetworkAccessCachedFtpConnection *>(o);
connect(ftp, SIGNAL(done(bool)), SLOT(ftpDone()));
connect(ftp, SIGNAL(rawCommandReply(int,QString)), SLOT(ftpRawCommandReply(int,QString)));
connect(ftp, SIGNAL(readyRead()), SLOT(ftpReadyRead()));
@@ -227,7 +227,7 @@ void QNetworkAccessFtpBackend::disconnectFromFtp()
disconnect(ftp, 0, this, 0);
QByteArray key = makeCacheKey(url());
- QNetworkAccessManagerPrivate::getCache(this)->releaseEntry(key);
+ QNetworkAccessManagerPrivate::getObjectCache(this)->releaseEntry(key);
ftp = 0;
}
@@ -278,7 +278,7 @@ void QNetworkAccessFtpBackend::ftpDone()
// we're not connected, so remove the cache entry:
QByteArray key = makeCacheKey(url());
- QNetworkAccessManagerPrivate::getCache(this)->removeEntry(key);
+ QNetworkAccessManagerPrivate::getObjectCache(this)->removeEntry(key);
disconnect(ftp, 0, this, 0);
ftp->dispose();
diff --git a/src/network/access/qnetworkaccessftpbackend_p.h b/src/network/access/qnetworkaccessftpbackend_p.h
index 9626403..bb6d766 100644
--- a/src/network/access/qnetworkaccessftpbackend_p.h
+++ b/src/network/access/qnetworkaccessftpbackend_p.h
@@ -66,7 +66,7 @@
QT_BEGIN_NAMESPACE
class QNetworkAccessFtpIODevice;
-class QNetworkAccessFtpFtp;
+class QNetworkAccessCachedFtpConnection;
class QNetworkAccessFtpBackend: public QNetworkAccessBackend
{
@@ -101,7 +101,7 @@ public slots:
private:
friend class QNetworkAccessFtpIODevice;
- QPointer<QNetworkAccessFtpFtp> ftp;
+ QPointer<QNetworkAccessCachedFtpConnection> ftp;
QIODevice *uploadDevice;
qint64 totalBytes;
int helpId, sizeId, mdtmId;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 460cbe3..71808d4 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -270,12 +270,12 @@ static QNetworkReply::NetworkError statusCodeFromHttp(int httpStatusCode, const
return code;
}
-class QNetworkAccessHttpBackendCache: public QHttpNetworkConnection,
+class QNetworkAccessCachedHttpConnection: public QHttpNetworkConnection,
public QNetworkAccessCache::CacheableObject
{
// Q_OBJECT
public:
- QNetworkAccessHttpBackendCache(const QString &hostName, quint16 port, bool encrypt)
+ QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt)
: QHttpNetworkConnection(hostName, port, encrypt)
{
setExpires(true);
@@ -311,11 +311,15 @@ QNetworkAccessHttpBackend::~QNetworkAccessHttpBackend()
void QNetworkAccessHttpBackend::disconnectFromHttp()
{
if (http) {
+ // This is abut disconnecting signals, not about disconnecting TCP connections
disconnect(http, 0, this, 0);
- QNetworkAccessCache *cache = QNetworkAccessManagerPrivate::getCache(this);
+
+ // Get the object cache that stores our QHttpNetworkConnection objects
+ QNetworkAccessCache *cache = QNetworkAccessManagerPrivate::getObjectCache(this);
cache->releaseEntry(cacheKey);
}
+ // This is abut disconnecting signals, not about disconnecting TCP connections
if (httpReply)
disconnect(httpReply, 0, this, 0);
@@ -582,16 +586,20 @@ void QNetworkAccessHttpBackend::open()
// check if we have an open connection to this host
cacheKey = makeCacheKey(this, theProxy);
- QNetworkAccessCache *cache = QNetworkAccessManagerPrivate::getCache(this);
- if ((http = static_cast<QNetworkAccessHttpBackendCache *>(cache->requestEntryNow(cacheKey))) == 0) {
+ QNetworkAccessCache *cache = QNetworkAccessManagerPrivate::getObjectCache(this);
+ // the http object is actually a QHttpNetworkConnection
+ http = static_cast<QNetworkAccessCachedHttpConnection *>(cache->requestEntryNow(cacheKey));
+ if (http == 0) {
// no entry in cache; create an object
- http = new QNetworkAccessHttpBackendCache(url.host(), url.port(), encrypt);
+ // the http object is actually a QHttpNetworkConnection
+ http = new QNetworkAccessCachedHttpConnection(url.host(), url.port(), encrypt);
#ifndef QT_NO_NETWORKPROXY
http->setTransparentProxy(transparentProxy);
http->setCacheProxy(cacheProxy);
#endif
+ // cache the QHttpNetworkConnection corresponding to this cache key
cache->addEntry(cacheKey, http);
}
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index e0801ce..dec69d0 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -66,7 +66,7 @@
QT_BEGIN_NAMESPACE
-class QNetworkAccessHttpBackendCache;
+class QNetworkAccessCachedHttpConnection;
class QNetworkAccessHttpBackendIODevice;
@@ -106,7 +106,7 @@ private slots:
private:
QHttpNetworkReply *httpReply;
- QPointer<QNetworkAccessHttpBackendCache> http;
+ QPointer<QNetworkAccessCachedHttpConnection> http;
QByteArray cacheKey;
QNetworkAccessBackendUploadIODevice *uploadDevice;
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 0ae920b..ed2f220 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -836,7 +836,7 @@ void QNetworkAccessManagerPrivate::addCredentials(const QNetworkProxy &p,
QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache;
auth->insert(QString(), authenticator->user(), authenticator->password());
- cache.addEntry(cacheKey, auth); // replace the existing one, if there's any
+ objectCache.addEntry(cacheKey, auth); // replace the existing one, if there's any
if (realm.isEmpty()) {
break;
@@ -870,13 +870,13 @@ QNetworkAccessManagerPrivate::fetchCachedCredentials(const QNetworkProxy &p,
QByteArray cacheKey = proxyAuthenticationKey(proxy, realm);
if (cacheKey.isEmpty())
return 0;
- if (!cache.hasEntry(cacheKey))
+ if (!objectCache.hasEntry(cacheKey))
return 0;
QNetworkAuthenticationCache *auth =
- static_cast<QNetworkAuthenticationCache *>(cache.requestEntryNow(cacheKey));
+ static_cast<QNetworkAuthenticationCache *>(objectCache.requestEntryNow(cacheKey));
QNetworkAuthenticationCredential *cred = auth->findClosestMatch(QString());
- cache.releaseEntry(cacheKey);
+ objectCache.releaseEntry(cacheKey);
// proxy cache credentials always have exactly one item
Q_ASSERT_X(cred, "QNetworkAccessManager",
@@ -917,15 +917,15 @@ void QNetworkAccessManagerPrivate::addCredentials(const QUrl &url,
copy.setUserName(authenticator->user());
do {
QByteArray cacheKey = authenticationKey(copy, realm);
- if (cache.hasEntry(cacheKey)) {
+ if (objectCache.hasEntry(cacheKey)) {
QNetworkAuthenticationCache *auth =
- static_cast<QNetworkAuthenticationCache *>(cache.requestEntryNow(cacheKey));
+ static_cast<QNetworkAuthenticationCache *>(objectCache.requestEntryNow(cacheKey));
auth->insert(domain, authenticator->user(), authenticator->password());
- cache.releaseEntry(cacheKey);
+ objectCache.releaseEntry(cacheKey);
} else {
QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache;
auth->insert(domain, authenticator->user(), authenticator->password());
- cache.addEntry(cacheKey, auth);
+ objectCache.addEntry(cacheKey, auth);
}
if (copy.userName().isEmpty()) {
@@ -959,19 +959,19 @@ QNetworkAccessManagerPrivate::fetchCachedCredentials(const QUrl &url,
realm = authentication->realm();
QByteArray cacheKey = authenticationKey(url, realm);
- if (!cache.hasEntry(cacheKey))
+ if (!objectCache.hasEntry(cacheKey))
return 0;
QNetworkAuthenticationCache *auth =
- static_cast<QNetworkAuthenticationCache *>(cache.requestEntryNow(cacheKey));
+ static_cast<QNetworkAuthenticationCache *>(objectCache.requestEntryNow(cacheKey));
QNetworkAuthenticationCredential *cred = auth->findClosestMatch(url.path());
- cache.releaseEntry(cacheKey);
+ objectCache.releaseEntry(cacheKey);
return cred;
}
void QNetworkAccessManagerPrivate::clearCache(QNetworkAccessManager *manager)
{
- manager->d_func()->cache.clear();
+ manager->d_func()->objectCache.clear();
}
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index c80613b..bcf9a2b 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -98,10 +98,12 @@ public:
QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request);
+ // this is the cache for storing downloaded files
QAbstractNetworkCache *networkCache;
+
QNetworkCookieJar *cookieJar;
- QNetworkAccessCache cache;
+
#ifndef QT_NO_NETWORKPROXY
QNetworkProxy proxy;
QNetworkProxyFactory *proxyFactory;
@@ -109,8 +111,12 @@ public:
bool cookieJarCreated;
- static inline QNetworkAccessCache *getCache(QNetworkAccessBackend *backend)
- { return &backend->manager->cache; }
+
+ // this cache can be used by individual backends to cache e.g. their TCP connections to a server
+ // and use the connections for multiple requests.
+ QNetworkAccessCache objectCache;
+ static inline QNetworkAccessCache *getObjectCache(QNetworkAccessBackend *backend)
+ { return &backend->manager->objectCache; }
Q_AUTOTEST_EXPORT static void clearCache(QNetworkAccessManager *manager);
Q_DECLARE_PUBLIC(QNetworkAccessManager)
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 19bfe51..d099382 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1658,13 +1658,13 @@ bool QAbstractSocket::waitForConnected(int msecs)
}
/*!
- This function blocks until data is available for reading and the
+ This function blocks until new data is available for reading and the
\l{QIODevice::}{readyRead()} signal has been emitted. The function
will timeout after \a msecs milliseconds; the default timeout is
30000 milliseconds.
The function returns true if the readyRead() signal is emitted and
- there is data available for reading; otherwise it returns false
+ there is new data available for reading; otherwise it returns false
(if an error occurred or the operation timed out).
\sa waitForBytesWritten()
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index d2cd0d6..9d8cfb0 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -71,9 +71,10 @@
After loading a certificate, you can find information about the
certificate, its subject, and its issuer, by calling one of the
many accessor functions, including version(), serialNumber(),
- issuerInfo() and subjectInfo(). You can call notValidBefore() and
- notValidAfter() to check when the certificate was issued, and when
- it expires. The publicKey() function returns the certificate
+ issuerInfo() and subjectInfo(). You can call effectiveDate() and
+ expiryDate() to check when the certificate starts being
+ effective and when it expires.
+ The publicKey() function returns the certificate
subject's public key as a QSslKey. You can call issuerInfo() or
subjectInfo() to get detailed information about the certificate
issuer and its subject.
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 75d8a56..6ff0c53 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1063,8 +1063,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, const QTextIte
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix;
- matrix.translate(p.x(), p.y());
+ QTransform matrix = QTransform::fromTranslate(p.x(), p.y());
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 84ad4d5..e173a8d 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -662,6 +662,7 @@ public:
, txop(QTransform::TxNone)
, inverseScale(1)
, moveToCount(0)
+ , last_created_state(0)
, shader_ctx(0)
, grad_palette(0)
, drawable_texture(0)
@@ -788,6 +789,8 @@ public:
void updateGLMatrix() const;
+ mutable QPainterState *last_created_state;
+
QGLContext *shader_ctx;
GLuint grad_palette;
@@ -2219,6 +2222,8 @@ void QOpenGLPaintEnginePrivate::updateDepthClip()
{
Q_Q(QOpenGLPaintEngine);
+ ++q->state()->depthClipId;
+
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
@@ -4201,8 +4206,7 @@ void QOpenGLPaintEnginePrivate::drawImageAsPath(const QRectF &r, const QImage &i
qreal scaleX = r.width() / sr.width();
qreal scaleY = r.height() / sr.height();
- QTransform brush_matrix;
- brush_matrix.translate(r.left(), r.top());
+ QTransform brush_matrix = QTransform::fromTranslate(r.left(), r.top());
brush_matrix.scale(scaleX, scaleY);
brush_matrix.translate(-sr.left(), -sr.top());
@@ -4223,8 +4227,7 @@ void QOpenGLPaintEnginePrivate::drawTiledImageAsPath(const QRectF &r, const QIma
QBrush old_brush = cbrush;
QPointF old_brush_origin = brush_origin;
- QTransform brush_matrix;
- brush_matrix.translate(r.left(), r.top());
+ QTransform brush_matrix = QTransform::fromTranslate(r.left(), r.top());
brush_matrix.scale(sx, sy);
cbrush = QBrush(img);
@@ -4866,8 +4869,7 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
// add the glyphs used to the glyph texture cache
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix;
- matrix.translate(qRound(p.x()), qRound(p.y()));
+ QTransform matrix = QTransform::fromTranslate(qRound(p.x()), qRound(p.y()));
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
// make sure the glyphs we want to draw are in the cache
@@ -5501,9 +5503,20 @@ void QOpenGLPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
void QOpenGLPaintEngine::setState(QPainterState *s)
{
Q_D(QOpenGLPaintEngine);
+ QOpenGLPaintEngineState *new_state = static_cast<QOpenGLPaintEngineState *>(s);
+ QOpenGLPaintEngineState *old_state = state();
+
QPaintEngineEx::setState(s);
+
+ // are we in a save() ?
+ if (s == d->last_created_state) {
+ d->last_created_state = 0;
+ return;
+ }
+
if (isActive()) {
- d->updateDepthClip();
+ if (old_state->depthClipId != new_state->depthClipId)
+ d->updateDepthClip();
penChanged();
brushChanged();
opacityChanged();
@@ -5515,12 +5528,15 @@ void QOpenGLPaintEngine::setState(QPainterState *s)
QPainterState *QOpenGLPaintEngine::createState(QPainterState *orig) const
{
+ const Q_D(QOpenGLPaintEngine);
+
QOpenGLPaintEngineState *s;
if (!orig)
s = new QOpenGLPaintEngineState();
else
s = new QOpenGLPaintEngineState(*static_cast<QOpenGLPaintEngineState *>(orig));
+ d->last_created_state = s;
return s;
}
@@ -5534,11 +5550,13 @@ QOpenGLPaintEngineState::QOpenGLPaintEngineState(QOpenGLPaintEngineState &other)
clipRegion = other.clipRegion;
hasClipping = other.hasClipping;
fastClip = other.fastClip;
+ depthClipId = other.depthClipId;
}
QOpenGLPaintEngineState::QOpenGLPaintEngineState()
{
hasClipping = false;
+ depthClipId = 0;
}
QOpenGLPaintEngineState::~QOpenGLPaintEngineState()
diff --git a/src/opengl/qpaintengine_opengl_p.h b/src/opengl/qpaintengine_opengl_p.h
index 891cbd6..439782b 100644
--- a/src/opengl/qpaintengine_opengl_p.h
+++ b/src/opengl/qpaintengine_opengl_p.h
@@ -69,6 +69,7 @@ public:
QRegion clipRegion;
bool hasClipping;
QRect fastClip;
+ uint depthClipId;
};
class QOpenGLPaintEngine : public QPaintEngineEx
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index f745aae..8a2187c 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -96,8 +96,6 @@ static int qt_gl_pixmap_serial = 0;
QGLPixmapData::QGLPixmapData(PixelType type)
: QPixmapData(type, OpenGLClass)
- , m_width(0)
- , m_height(0)
, m_renderFbo(0)
, m_textureId(0)
, m_engine(0)
@@ -123,7 +121,7 @@ QGLPixmapData::~QGLPixmapData()
bool QGLPixmapData::isValid() const
{
- return m_width > 0 && m_height > 0;
+ return w > 0 && h > 0;
}
bool QGLPixmapData::isValidContext(const QGLContext *ctx) const
@@ -137,7 +135,7 @@ bool QGLPixmapData::isValidContext(const QGLContext *ctx) const
void QGLPixmapData::resize(int width, int height)
{
- if (width == m_width && height == m_height)
+ if (width == w && height == h)
return;
if (width <= 0 || height <= 0) {
@@ -145,8 +143,10 @@ void QGLPixmapData::resize(int width, int height)
height = 0;
}
- m_width = width;
- m_height = height;
+ w = width;
+ h = height;
+ is_null = (w <= 0 || h <= 0);
+ d = pixelType() == QPixmapData::PixmapType ? 32 : 1;
if (m_textureId) {
QGLShareContextScope ctx(qt_gl_share_widget()->context());
@@ -176,7 +176,7 @@ void QGLPixmapData::ensureCreated() const
glGenTextures(1, &m_textureId);
glBindTexture(target, m_textureId);
GLenum format = m_hasAlpha ? GL_RGBA : GL_RGB;
- glTexImage2D(target, 0, format, m_width, m_height, 0,
+ glTexImage2D(target, 0, format, w, h, 0,
GL_RGBA, GL_UNSIGNED_BYTE, 0);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -186,7 +186,7 @@ void QGLPixmapData::ensureCreated() const
const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, format);
glBindTexture(target, m_textureId);
- glTexSubImage2D(target, 0, 0, 0, m_width, m_height, format,
+ glTexSubImage2D(target, 0, 0, 0, w, h, format,
GL_UNSIGNED_BYTE, tx.bits());
if (useFramebufferObjects())
@@ -202,7 +202,7 @@ QGLFramebufferObject *QGLPixmapData::fbo() const
void QGLPixmapData::fromImage(const QImage &image,
Qt::ImageConversionFlags)
{
- if (image.size() == QSize(m_width, m_height))
+ if (image.size() == QSize(w, h))
setSerialNumber(++qt_gl_pixmap_serial);
resize(image.width(), image.height());
@@ -218,6 +218,10 @@ void QGLPixmapData::fromImage(const QImage &image,
m_hasFillColor = false;
m_hasAlpha = image.hasAlphaChannel();
+ w = image.width();
+ h = image.height();
+ is_null = (w <= 0 || h <= 0);
+ d = pixelType() == QPixmapData::PixmapType ? 32 : 1;
if (m_textureId) {
QGLShareContextScope ctx(qt_gl_share_widget()->context());
@@ -272,7 +276,7 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
{
QImage img;
if (pixelType() == BitmapType) {
- img = QImage(m_width, m_height, QImage::Format_MonoLSB);
+ img = QImage(w, h, QImage::Format_MonoLSB);
img.setNumColors(2);
img.setColor(0, QColor(Qt::color0).rgba());
img.setColor(1, QColor(Qt::color1).rgba());
@@ -283,7 +287,7 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
else
img.fill(1);
} else {
- img = QImage(m_width, m_height,
+ img = QImage(w, h,
m_hasAlpha
? QImage::Format_ARGB32_Premultiplied
: QImage::Format_RGB32);
@@ -310,7 +314,7 @@ QImage QGLPixmapData::toImage() const
QGLShareContextScope ctx(qt_gl_share_widget()->context());
extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha);
glBindTexture(GL_TEXTURE_2D, m_textureId);
- return qt_gl_read_texture(QSize(m_width, m_height), true, true);
+ return qt_gl_read_texture(QSize(w, h), true, true);
}
struct TextureBuffer
@@ -342,9 +346,9 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const
GL_TEXTURE_2D, m_textureId, 0);
const int x0 = 0;
- const int x1 = m_width;
+ const int x1 = w;
const int y0 = 0;
- const int y1 = m_height;
+ const int y1 = h;
glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_renderFbo->handle());
@@ -424,15 +428,15 @@ QPaintEngine* QGLPixmapData::paintEngine() const
textureBufferStack << createTextureBuffer(size());
} else {
QSize sz = textureBufferStack.at(currentTextureBuffer).fbo->size();
- if (sz.width() < m_width || sz.height() < m_height) {
- if (sz.width() < m_width)
- sz.setWidth(qMax(m_width, qRound(sz.width() * 1.5)));
- if (sz.height() < m_height)
- sz.setHeight(qMax(m_height, qRound(sz.height() * 1.5)));
+ if (sz.width() < w || sz.height() < h) {
+ if (sz.width() < w)
+ sz.setWidth(qMax(w, qRound(sz.width() * 1.5)));
+ if (sz.height() < h)
+ sz.setHeight(qMax(h, qRound(sz.height() * 1.5)));
// wasting too much space?
- if (sz.width() * sz.height() > m_width * m_height * 2.5)
- sz = QSize(m_width, m_height);
+ if (sz.width() * sz.height() > w * h * 2.5)
+ sz = QSize(w, h);
delete textureBufferStack.at(currentTextureBuffer).fbo;
textureBufferStack[currentTextureBuffer] =
@@ -470,7 +474,7 @@ GLuint QGLPixmapData::bind(bool copyBack) const
} else {
if (m_hasFillColor) {
m_dirty = true;
- m_source = QImage(m_width, m_height, QImage::Format_ARGB32_Premultiplied);
+ m_source = QImage(w, h, QImage::Format_ARGB32_Premultiplied);
m_source.fill(PREMUL(m_fillColor.rgba()));
m_hasFillColor = false;
}
@@ -493,22 +497,22 @@ extern int qt_defaultDpiY();
int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
- if (m_width == 0)
+ if (w == 0)
return 0;
switch (metric) {
case QPaintDevice::PdmWidth:
- return m_width;
+ return w;
case QPaintDevice::PdmHeight:
- return m_height;
+ return h;
case QPaintDevice::PdmNumColors:
return 0;
case QPaintDevice::PdmDepth:
- return pixelType() == QPixmapData::PixmapType ? 32 : 1;
+ return d;
case QPaintDevice::PdmWidthMM:
- return qRound(m_width * 25.4 / qt_defaultDpiX());
+ return qRound(w * 25.4 / qt_defaultDpiX());
case QPaintDevice::PdmHeightMM:
- return qRound(m_height * 25.4 / qt_defaultDpiY());
+ return qRound(h * 25.4 / qt_defaultDpiY());
case QPaintDevice::PdmDpiX:
case QPaintDevice::PdmPhysicalDpiX:
return qt_defaultDpiX();
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h
index 605b25b..a6aa22d 100644
--- a/src/opengl/qpixmapdata_gl_p.h
+++ b/src/opengl/qpixmapdata_gl_p.h
@@ -94,9 +94,7 @@ public:
bool needsFill() const { return m_hasFillColor; }
QColor fillColor() const { return m_fillColor; }
- QSize size() const { return QSize(m_width, m_height); }
- int width() const { return m_width; }
- int height() const { return m_height; }
+ QSize size() const { return QSize(w, h); }
QGLFramebufferObject *fbo() const;
@@ -117,9 +115,6 @@ private:
QImage fillImage(const QColor &color) const;
- int m_width;
- int m_height;
-
mutable QGLFramebufferObject *m_renderFbo;
mutable GLuint m_textureId;
mutable QPaintEngine *m_engine;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index 52f6a37..905fec3 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -129,18 +129,14 @@ int QDirectFBPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
if (!dfbSurface)
return 0;
- int w, h;
- dfbSurface->GetSize(dfbSurface, &w, &h);
-
switch (metric) {
case QPaintDevice::PdmWidth:
- return w;
case QPaintDevice::PdmHeight:
- return h;
+ return (metric == PdmWidth ? size().width() : size().height());
case QPaintDevice::PdmWidthMM:
- return (w * 1000) / dotsPerMeterX();
+ return (size().width() * 1000) / dotsPerMeterX();
case QPaintDevice::PdmHeightMM:
- return (h * 1000) / dotsPerMeterY();
+ return (size().height() * 1000) / dotsPerMeterY();
case QPaintDevice::PdmPhysicalDpiX:
case QPaintDevice::PdmDpiX:
return (dotsPerMeterX() * 254) / 10000; // 0.0254 meters-per-inch
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index c2048d8..1c86466 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -72,9 +72,10 @@ void QDirectFBPixmapData::resize(int width, int height)
}
format = screen->pixelFormat();
- dfbSurface = QDirectFBScreen::instance()->createDFBSurface(QSize(width, height),
- format,
- QDirectFBScreen::TrackSurface);
+ dfbSurface = screen->createDFBSurface(QSize(width, height),
+ format,
+ QDirectFBScreen::TrackSurface);
+ d = screen->depth();
alpha = false;
if (!dfbSurface) {
invalidate();
@@ -82,6 +83,10 @@ void QDirectFBPixmapData::resize(int width, int height)
return;
}
+ w = width;
+ h = height;
+ is_null = (w <= 0 || h <= 0);
+ d = metric(QPaintDevice::PdmDepth);
setSerialNumber(++global_ser_no);
}
@@ -191,6 +196,10 @@ void QDirectFBPixmapData::fromImage(const QImage &i,
invalidate();
return;
}
+ w = img.width();
+ h = img.height();
+ is_null = (w <= 0 || h <= 0);
+ d = metric(QPaintDevice::PdmDepth);
setSerialNumber(++global_ser_no);
}
@@ -201,7 +210,8 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
return;
}
- IDirectFBSurface *src = static_cast<const QDirectFBPixmapData*>(data)->directFBSurface();
+ const QDirectFBPixmapData *otherData = static_cast<const QDirectFBPixmapData*>(data);
+ IDirectFBSurface *src = otherData->directFBSurface();
alpha = data->hasAlphaChannel();
format = (alpha
? QDirectFBScreen::instance()->alphaPixmapFormat()
@@ -224,6 +234,9 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
}
const DFBRectangle blitRect = { rect.x(), rect.y(),
rect.width(), rect.height() };
+ w = rect.width();
+ h = rect.height();
+ d = otherData->d;
DFBResult result = dfbSurface->Blit(dfbSurface, src, &blitRect, 0, 0);
#if (Q_DIRECTFB_VERSION >= 0x010000)
dfbSurface->ReleaseSource(dfbSurface);
@@ -295,9 +308,6 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform,
return QPixmap(data);
}
- int w, h;
- dfbSurface->GetSize(dfbSurface, &w, &h);
-
const QSize size = transform.mapRect(QRect(0, 0, w, h)).size();
if (size.isEmpty())
return QPixmap();
@@ -318,6 +328,8 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform,
const DFBRectangle destRect = { 0, 0, size.width(), size.height() };
data->dfbSurface->StretchBlit(data->dfbSurface, dfbSurface, 0, &destRect);
+ data->w = size.width();
+ data->h = size.height();
#if (Q_DIRECTFB_VERSION >= 0x010000)
data->dfbSurface->ReleaseSource(data->dfbSurface);
#endif
@@ -330,7 +342,7 @@ QImage QDirectFBPixmapData::toImage() const
return QImage();
#ifndef QT_NO_DIRECTFB_PREALLOCATED
- QImage ret(size(), QDirectFBScreen::getImageFormat(dfbSurface));
+ QImage ret(w, h, QDirectFBScreen::getImageFormat(dfbSurface));
if (IDirectFBSurface *imgSurface = screen->createDFBSurface(ret, QDirectFBScreen::DontTrackSurface)) {
if (hasAlphaChannel()) {
imgSurface->SetBlittingFlags(imgSurface, DSBLIT_BLEND_ALPHACHANNEL);
@@ -379,6 +391,7 @@ void QDirectFBPixmapData::invalidate()
{
setSerialNumber(0);
alpha = false;
+ d = w = h = 0;
format = QImage::Format_Invalid;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 5d89994..62fef5b 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -751,12 +751,7 @@ QPixmapData *QDirectFBScreenPrivate::createPixmapData(QPixmapData::PixelType typ
return new QDirectFBPixmapData(type);
}
-#ifdef QT_NO_DEBUG
-struct FlagDescription;
-static const FlagDescription *accelerationDescriptions = 0;
-static const FlagDescription *blitDescriptions = 0;
-static const FlagDescription *drawDescriptions = 0;
-#else
+#ifndef QT_NO_DEBUG
struct FlagDescription {
const char *name;
uint flag;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index c2c9a59..4239156 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -118,6 +118,7 @@ public:
SurfaceCreationOptions options);
void releaseDFBSurface(IDirectFBSurface *surface);
+ using QScreen::depth;
static int depth(DFBSurfacePixelFormat format);
static DFBSurfacePixelFormat getSurfacePixelFormat(QImage::Format format);
diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp
index 9cca8ad..20de788 100644
--- a/src/scripttools/debugging/qscriptdebugger.cpp
+++ b/src/scripttools/debugging/qscriptdebugger.cpp
@@ -75,10 +75,6 @@
#include "qscriptdebuggerjob_p_p.h"
#include "qscriptxmlparser_p.h"
-#include "qscriptenginedebuggerfrontend_p.h"
-#include "qscriptdebuggerbackend_p.h"
-#include <QtScript/qscriptengine.h>
-
#include "private/qobject_p.h"
#include <QtScript/qscriptcontext.h>
@@ -1946,6 +1942,12 @@ QToolBar *QScriptDebugger::createStandardToolBar(QWidget *widgetParent, QObject
return tb;
}
+bool QScriptDebugger::isInteractive() const
+{
+ Q_D(const QScriptDebugger);
+ return d->interactive;
+}
+
/*!
\reimp
*/
diff --git a/src/scripttools/debugging/qscriptdebugger_p.h b/src/scripttools/debugging/qscriptdebugger_p.h
index 9ed7e0a..ba27200 100644
--- a/src/scripttools/debugging/qscriptdebugger_p.h
+++ b/src/scripttools/debugging/qscriptdebugger_p.h
@@ -172,6 +172,8 @@ public:
bool eventFilter(QObject *, QEvent *e);
+ bool isInteractive() const;
+
Q_SIGNALS:
void stopped() const;
void started() const;
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
index 9eaf571..7f4211c 100644
--- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
@@ -412,14 +412,15 @@ void QScriptDebuggerBackend::attachTo(QScriptEngine *engine)
detach();
d->agent = new QScriptDebuggerAgent(d, engine);
QScriptValue global = engine->globalObject();
+ d->origTraceFunction = global.property(QString::fromLatin1("print"));
global.setProperty(QString::fromLatin1("print"), traceFunction());
// global.setProperty(QString::fromLatin1("qAssert"), assertFunction());
+ d->origFileNameFunction = global.property(QString::fromLatin1("__FILE__"));
global.setProperty(QString::fromLatin1("__FILE__"), fileNameFunction(),
- QScriptValue::PropertyGetter | QScriptValue::PropertySetter
- | QScriptValue::ReadOnly);
+ QScriptValue::PropertyGetter | QScriptValue::ReadOnly);
+ d->origLineNumberFunction = global.property(QString::fromLatin1("__LINE__"));
global.setProperty(QString::fromLatin1("__LINE__"), lineNumberFunction(),
- QScriptValue::PropertyGetter | QScriptValue::PropertySetter
- | QScriptValue::ReadOnly);
+ QScriptValue::PropertyGetter | QScriptValue::ReadOnly);
engine->setAgent(d->agent);
}
@@ -433,21 +434,25 @@ void QScriptDebuggerBackend::attachTo(QScriptEngine *engine)
void QScriptDebuggerBackend::detach()
{
Q_D(QScriptDebuggerBackend);
- if (!d->agent)
- return;
- QScriptEngine *eng = d->agent->engine();
- if (eng && eng->agent() == d->agent) {
- eng->setAgent(0);
- QScriptValue global = eng->globalObject();
- if (global.property(QString::fromLatin1("print")).strictlyEquals(traceFunction()))
- global.setProperty(QString::fromLatin1("print"), QScriptValue());
-// global.setProperty(QString::fromLatin1("qAssert"), QScriptValue());
- if (global.property(QString::fromLatin1("__FILE__")).strictlyEquals(fileNameFunction()))
- global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue());
- if (global.property(QString::fromLatin1("__LINE__")).strictlyEquals(lineNumberFunction()))
- global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue());
- d->agent->nullifyBackendPointer();
- d->agent = 0; // agent is owned by engine
+ if (d->agent) {
+ QScriptEngine *eng = d->agent->engine();
+ if (eng && eng->agent() == d->agent) {
+ eng->setAgent(0);
+ QScriptValue global = eng->globalObject();
+ global.setProperty(QString::fromLatin1("print"), d->origTraceFunction);
+ d->origTraceFunction = QScriptValue();
+// global.setProperty(QString::fromLatin1("qAssert"), QScriptValue());
+ global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue(),
+ QScriptValue::PropertyGetter);
+ global.setProperty(QString::fromLatin1("__FILE__"), d->origFileNameFunction);
+ d->origFileNameFunction = QScriptValue();
+ global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue(),
+ QScriptValue::PropertyGetter);
+ global.setProperty(QString::fromLatin1("__LINE__"), d->origLineNumberFunction);
+ d->origLineNumberFunction = QScriptValue();
+ d->agent->nullifyBackendPointer();
+ d->agent = 0; // agent is owned by engine
+ }
}
d->pendingEvaluateLineNumber = -1;
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h b/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h
index de18304..a356762 100644
--- a/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h
+++ b/src/scripttools/debugging/qscriptdebuggerbackend_p_p.h
@@ -57,6 +57,7 @@
#include <QtCore/qhash.h>
#include <QtCore/qlist.h>
+#include <QtScript/qscriptvalue.h>
#include "qscriptdebuggerbackend_p.h"
@@ -66,7 +67,6 @@ class QEvent;
class QString;
class QScriptContext;
class QScriptEngine;
-class QScriptValue;
class QScriptValueIterator;
class QScriptObjectSnapshot;
class QScriptDebuggerAgent;
@@ -126,6 +126,10 @@ public:
QObject *eventReceiver;
QScriptDebuggerBackend *q_ptr;
+
+ QScriptValue origTraceFunction;
+ QScriptValue origFileNameFunction;
+ QScriptValue origLineNumberFunction;
};
QT_END_NAMESPACE
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index 948a01a..f2245cc 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -126,7 +126,7 @@ public:
mode in which it accepts input from the user. The
evaluationResumed() signal is emitted when script evaluation is
resumed, i.e, when execution control is given back to the script
- engine.
+ engine. The state() function returns the debugger's current state.
When calling QScriptEngine::evaluate() it is useful to pass a
descriptive script name (file name) as second argument, as this is
@@ -226,6 +226,16 @@ public:
\value GoToLineAction Shows the "Go to Line" dialog.
*/
+/*!
+ \enum QScriptEngineDebugger::DebuggerState
+ \since 4.6
+
+ This enum specifies the current state of the debugger.
+
+ \value RunningState The debugger is running. (Script evaluation is allowed.)
+ \value SuspendedState The debugger has suspended script evaluation.
+*/
+
class QScriptEngineDebuggerPrivate
: public QObjectPrivate
{
@@ -387,6 +397,20 @@ void QScriptEngineDebugger::detach()
}
/*!
+ \since 4.6
+
+ Returns the current state of the debugger.
+
+ \sa evaluationResumed()
+ \sa evaluationSuspended()
+*/
+QScriptEngineDebugger::DebuggerState QScriptEngineDebugger::state() const
+{
+ Q_D(const QScriptEngineDebugger);
+ return !d->debugger || !d->debugger->isInteractive() ? SuspendedState : RunningState;
+}
+
+/*!
Returns a pointer to the instance of the specified standard \a
widget. The widgets available are defined by the DebuggerWidget
diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h
index 0fd4963..b9061a2 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.h
+++ b/src/scripttools/debugging/qscriptenginedebugger.h
@@ -92,6 +92,11 @@ public:
GoToLineAction
};
+ enum DebuggerState {
+ RunningState,
+ SuspendedState
+ };
+
QScriptEngineDebugger(QObject *parent = 0);
~QScriptEngineDebugger();
@@ -108,6 +113,8 @@ public:
QWidget *widget(DebuggerWidget widget) const;
QAction *action(DebuggerAction action) const;
+ DebuggerState state() const;
+
Q_SIGNALS:
void evaluationSuspended();
void evaluationResumed();
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 44477e5..e2c1312 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -3378,6 +3378,7 @@ void QSvgHandler::init()
{
m_doc = 0;
m_style = 0;
+ m_animEnd = 0;
m_defaultCoords = LT_PX;
m_defaultPen = QPen(Qt::black, 1, Qt::NoPen, Qt::FlatCap, Qt::SvgMiterJoin);
m_defaultPen.setMiterLimit(4);
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index c1a69f7..f04a4d7 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -148,6 +148,7 @@ class tst_MediaObject : public QObject
void testPlayBeforeFinish();
void testPauseOnFinish();
void testReconnectBetweenTwoMediaObjects();
+ void volumeSliderMuteVisibility();
void cleanupTestCase();
private:
void _startPlayback(Phonon::State currentState = Phonon::StoppedState);
@@ -937,6 +938,28 @@ void tst_MediaObject::_testOneSeek(qint64 seekTo)
m_success = true;
}
+void tst_MediaObject::volumeSliderMuteVisibility()
+{
+ //this test doesn't really belong to mediaobject
+ // ### see if we should create a realy Phonon::VolumeSlider autotest
+ Phonon::VolumeSlider slider;
+ QVERIFY(slider.isMuteVisible()); // that is the default value
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+
+ //let's check that changing the visibility of the slider itself
+ //doesn't change what the slider reports
+ slider.setVisible(false);
+ QVERIFY(slider.isMuteVisible());
+ slider.setVisible(true);
+
+ slider.setMuteVisible(false);
+ QVERIFY(!slider.isMuteVisible());
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+}
+
+
#endif //QT_NO_PHONON
diff --git a/tests/auto/modeltest/modeltest.cpp b/tests/auto/modeltest/modeltest.cpp
index 68b723f..c4cc820 100644
--- a/tests/auto/modeltest/modeltest.cpp
+++ b/tests/auto/modeltest/modeltest.cpp
@@ -475,7 +475,7 @@ void ModelTest::data()
void ModelTest::rowsAboutToBeInserted ( const QModelIndex &parent, int start, int end )
{
// Q_UNUSED(end);
- qDebug() << "rowsAboutToBeInserted" << "start=" << start << "end=" << end << "parent=" << model->data ( parent ).value<QString>()
+ qDebug() << "rowsAboutToBeInserted" << "start=" << start << "end=" << end << "parent=" << model->data ( parent ).toString()
<< "current count of parent=" << model->rowCount ( parent ); // << "display of last=" << model->data( model->index(start-1, 0, parent) );
// qDebug() << model->index(start-1, 0, parent) << model->data( model->index(start-1, 0, parent) );
Changing c;
@@ -496,7 +496,7 @@ void ModelTest::rowsInserted ( const QModelIndex & parent, int start, int end )
Changing c = insert.pop();
Q_ASSERT ( c.parent == parent );
qDebug() << "rowsInserted" << "start=" << start << "end=" << end << "oldsize=" << c.oldSize
- << "parent=" << model->data ( parent ).value<QString>() << "current rowcount of parent=" << model->rowCount ( parent );
+ << "parent=" << model->data ( parent ).toString() << "current rowcount of parent=" << model->rowCount ( parent );
for (int ii=start; ii <= end; ii++)
{
diff --git a/tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp b/tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp
index b81fa12..deb6c8d 100644
--- a/tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp
+++ b/tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp
@@ -833,9 +833,14 @@ void tst_accessibility_mac::testTabWidget()
// Window is not reported properly on 10.5
if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5) {
QVERIFY(equal(window(tabGroup), form));
- QVERIFY(equal(window(tabButton1), form));
+
+ // ### hangs on 10.4
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ QVERIFY(equal(window(tabButton1), form));
+#endif
}
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+// ### hangs on 10.4
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
QVERIFY(equal(topLevelUIElement(tabGroup), form));
QVERIFY(equal(topLevelUIElement(tabButton1), form));
#endif
@@ -1423,7 +1428,6 @@ void tst_accessibility_mac::testListView()
const AXUIElementRef listElement = childByRole(scrollAreaElement, "AXList");
QVERIFY(listElement);
QVERIFY(equal(::parent(listElement), scrollAreaElement));
-
// Window is not reported properly on 10.5
if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5)
QVERIFY(equal(::window(listElement), windowElement));
@@ -1438,9 +1442,11 @@ void tst_accessibility_mac::testListView()
QVERIFY(value(A) == "A");
QVERIFY(equal(::parent(A), listElement));
QVERIFY(enabled(A));
- // Window is not reported properly on 10.5
- if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5)
- QVERIFY(equal(::window(A), windowElement));
+
+ // Window is not reported properly on 10.5, this test
+ // hangs on 10.4. Disable it for now.
+ // if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5)
+ // QVERIFY(equal(::window(A), windowElement));
QVERIFY(above(A, B));
QVERIFY(!above(B, A));
diff --git a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
index 0457f8f..0e98797 100644
--- a/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/qanimationgroup/tst_qanimationgroup.cpp
@@ -206,9 +206,9 @@ void tst_QAnimationGroup::setCurrentTime()
// sequence operating on same object/property
QSequentialAnimationGroup *sequence = new QSequentialAnimationGroup();
- QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
- QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value");
- QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value");
a2_s_o1->setLoopCount(3);
sequence->addAnimation(a1_s_o1);
sequence->addAnimation(a2_s_o1);
@@ -216,25 +216,25 @@ void tst_QAnimationGroup::setCurrentTime()
// sequence operating on different object/properties
QAnimationGroup *sequence2 = new QSequentialAnimationGroup();
- QVariantAnimation *a1_s_o2 = new QPropertyAnimation(&s_o2, "value");
- QVariantAnimation *a1_s_o3 = new QPropertyAnimation(&s_o3, "value");
+ QAbstractAnimation *a1_s_o2 = new QPropertyAnimation(&s_o2, "value");
+ QAbstractAnimation *a1_s_o3 = new QPropertyAnimation(&s_o3, "value");
sequence2->addAnimation(a1_s_o2);
sequence2->addAnimation(a1_s_o3);
// parallel operating on different object/properties
QAnimationGroup *parallel = new QParallelAnimationGroup();
- QVariantAnimation *a1_p_o1 = new QPropertyAnimation(&p_o1, "value");
- QVariantAnimation *a1_p_o2 = new QPropertyAnimation(&p_o2, "value");
- QVariantAnimation *a1_p_o3 = new QPropertyAnimation(&p_o3, "value");
+ QAbstractAnimation *a1_p_o1 = new QPropertyAnimation(&p_o1, "value");
+ QAbstractAnimation *a1_p_o2 = new QPropertyAnimation(&p_o2, "value");
+ QAbstractAnimation *a1_p_o3 = new QPropertyAnimation(&p_o3, "value");
a1_p_o2->setLoopCount(3);
parallel->addAnimation(a1_p_o1);
parallel->addAnimation(a1_p_o2);
parallel->addAnimation(a1_p_o3);
- UncontrolledAnimation *notTimeDriven = new UncontrolledAnimation(&t_o1, "value");
+ QAbstractAnimation *notTimeDriven = new UncontrolledAnimation(&t_o1, "value");
QCOMPARE(notTimeDriven->totalDuration(), -1);
- QVariantAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value");
+ QAbstractAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value");
loopsForever->setLoopCount(-1);
QCOMPARE(loopsForever->totalDuration(), -1);
@@ -318,7 +318,7 @@ void tst_QAnimationGroup::setParentAutoAdd()
{
QParallelAnimationGroup group;
QVariantAnimation *animation = new QPropertyAnimation(&group);
- QCOMPARE(animation->group(), &group);
+ QCOMPARE(animation->group(), static_cast<QAnimationGroup*>(&group));
}
void tst_QAnimationGroup::beginNestedGroup()
@@ -347,8 +347,8 @@ void tst_QAnimationGroup::beginNestedGroup()
void tst_QAnimationGroup::addChildTwice()
{
- QPropertyAnimation *subGroup;
- QPropertyAnimation *subGroup2;
+ QAbstractAnimation *subGroup;
+ QAbstractAnimation *subGroup2;
QAnimationGroup *parent = new QSequentialAnimationGroup();
subGroup = new QPropertyAnimation();
diff --git a/tests/auto/qfontdialog/tst_qfontdialog.cpp b/tests/auto/qfontdialog/tst_qfontdialog.cpp
index c12c229..1444ee0 100644
--- a/tests/auto/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/qfontdialog/tst_qfontdialog.cpp
@@ -47,7 +47,9 @@
#include <qfontinfo.h>
#include <qtimer.h>
#include <qmainwindow.h>
+#include <qlistview.h>
#include "qfontdialog.h"
+#include <private/qfontdialog_p.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -74,6 +76,7 @@ public slots:
private slots:
void defaultOkButton();
void setFont();
+ void task256466_wrongStyle();
};
tst_QFontDialog::tst_QFontDialog()
@@ -151,6 +154,29 @@ void tst_QFontDialog::setFont()
}
+class FriendlyFontDialog : public QFontDialog
+{
+ friend tst_QFontDialog;
+ Q_DECLARE_PRIVATE(QFontDialog);
+};
+
+void tst_QFontDialog::task256466_wrongStyle()
+{
+ QFontDatabase fdb;
+ FriendlyFontDialog dialog;
+ QListView *familyList = reinterpret_cast<QListView*>(dialog.d_func()->familyList);
+ QListView *styleList = reinterpret_cast<QListView*>(dialog.d_func()->styleList);
+ QListView *sizeList = reinterpret_cast<QListView*>(dialog.d_func()->sizeList);
+ for (int i = 0; i < familyList->model()->rowCount(); ++i) {
+ QModelIndex currentFamily = familyList->model()->index(i, 0);
+ familyList->setCurrentIndex(currentFamily);
+ QCOMPARE(dialog.currentFont(), fdb.font(currentFamily.data().toString(),
+ styleList->currentIndex().data().toString(), sizeList->currentIndex().data().toInt()));
+ }
+}
+
+
+
QTEST_MAIN(tst_QFontDialog)
#include "tst_qfontdialog.moc"
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 2b936d6..1ca6c98 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -3952,7 +3952,7 @@ void tst_QGraphicsItem::itemChange()
QCOMPARE(tester.changes.size(), changeCount);
QCOMPARE(tester.changes.at(tester.changes.size() - 2), QGraphicsItem::ItemFlagsChange);
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemFlagsHaveChanged);
- QVariant expectedFlags = qVariantFromValue<quint32>(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges);
+ QVariant expectedFlags = qVariantFromValue<quint32>(QGraphicsItem::GraphicsItemFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges));
QCOMPARE(tester.values.at(tester.values.size() - 2), expectedFlags);
QCOMPARE(tester.values.at(tester.values.size() - 1), qVariantFromValue<quint32>(QGraphicsItem::ItemIsSelectable));
}
diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
index bc750c5..3283873 100644
--- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -1,4 +1,5 @@
load(qttest_p4)
SOURCES += tst_qhttpnetworkconnection.cpp
+INCLUDEPATH += $$(QTDIR)/src/3rdparty/zlib
QT = core network
diff --git a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
index 9593c55..0755055 100644
--- a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
+++ b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
@@ -1,4 +1,5 @@
load(qttest_p4)
SOURCES += tst_qhttpnetworkreply.cpp
+INCLUDEPATH += $$(QTDIR)/src/3rdparty/zlib
QT = core network
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp
index a658aeb..7e4b828 100644
--- a/tests/auto/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/qinputdialog/tst_qinputdialog.cpp
@@ -56,6 +56,7 @@ class tst_QInputDialog : public QObject
{
Q_OBJECT
QWidget *parent;
+ QDialog::DialogCode doneCode;
void (*testFunc)(QInputDialog *);
static void testFuncGetInteger(QInputDialog *dialog);
static void testFuncGetDouble(QInputDialog *dialog);
@@ -72,6 +73,7 @@ private slots:
void getText();
void getItem_data();
void getItem();
+ void task256299_getTextReturnNullStringOnRejected();
};
QString stripFraction(const QString &s)
@@ -245,8 +247,9 @@ void tst_QInputDialog::timerEvent(QTimerEvent *event)
killTimer(event->timerId());
QInputDialog *dialog = qFindChild<QInputDialog *>(parent);
Q_ASSERT(dialog);
- testFunc(dialog);
- dialog->done(QDialog::Accepted); // cause static function call to return
+ if (testFunc)
+ testFunc(dialog);
+ dialog->done(doneCode); // cause static function call to return
}
void tst_QInputDialog::getInteger_data()
@@ -266,6 +269,7 @@ void tst_QInputDialog::getInteger()
QFETCH(int, max);
Q_ASSERT(min < max);
parent = new QWidget;
+ doneCode = QDialog::Accepted;
testFunc = &tst_QInputDialog::testFuncGetInteger;
startTimer(0);
bool ok = false;
@@ -305,6 +309,7 @@ void tst_QInputDialog::getDouble()
QFETCH(int, decimals);
Q_ASSERT(min < max && decimals >= 0 && decimals <= 13);
parent = new QWidget;
+ doneCode = QDialog::Accepted;
testFunc = &tst_QInputDialog::testFuncGetDouble;
startTimer(0);
bool ok = false;
@@ -322,6 +327,7 @@ void tst_QInputDialog::getDouble()
void tst_QInputDialog::task255502getDouble()
{
parent = new QWidget;
+ doneCode = QDialog::Accepted;
testFunc = &tst_QInputDialog::testFuncGetDouble;
startTimer(0);
bool ok = false;
@@ -347,6 +353,7 @@ void tst_QInputDialog::getText()
{
QFETCH(QString, text);
parent = new QWidget;
+ doneCode = QDialog::Accepted;
testFunc = &tst_QInputDialog::testFuncGetText;
startTimer(0);
bool ok = false;
@@ -356,6 +363,19 @@ void tst_QInputDialog::getText()
delete parent;
}
+void tst_QInputDialog::task256299_getTextReturnNullStringOnRejected()
+{
+ parent = new QWidget;
+ doneCode = QDialog::Rejected;
+ testFunc = 0;
+ startTimer(0);
+ bool ok = true;
+ const QString result = QInputDialog::getText(parent, "", "", QLineEdit::Normal, "foobar", &ok);
+ QVERIFY(!ok);
+ QVERIFY(result.isNull());
+ delete parent;
+}
+
void tst_QInputDialog::getItem_data()
{
QTest::addColumn<QStringList>("items");
@@ -373,6 +393,7 @@ void tst_QInputDialog::getItem()
QFETCH(QStringList, items);
QFETCH(bool, editable);
parent = new QWidget;
+ doneCode = QDialog::Accepted;
testFunc = &tst_QInputDialog::testFuncGetItem;
startTimer(0);
bool ok = false;
diff --git a/tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp b/tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp
index 5540b38..d9a7d56 100644
--- a/tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp
+++ b/tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp
@@ -61,16 +61,40 @@ void tst_QItemEditorFactory::createEditor()
void tst_QItemEditorFactory::createCustomEditor()
{
- QItemEditorFactory editorFactory;
+ //we make it inherit from QObject so that we can use QPointer
+ class MyEditor : public QObject, public QStandardItemEditorCreator<QDoubleSpinBox>
+ {
+ };
- QItemEditorCreatorBase *creator = new QStandardItemEditorCreator<QDoubleSpinBox>();
- editorFactory.registerEditor(QVariant::Rect, creator);
+ QPointer<MyEditor> creator = new MyEditor;
+ QPointer<MyEditor> creator2 = new MyEditor;
- QWidget parent;
+ {
+ QItemEditorFactory editorFactory;
+
+ editorFactory.registerEditor(QVariant::Rect, creator);
+ editorFactory.registerEditor(QVariant::RectF, creator);
+
+ //creator should not be deleted as a result of calling the next line
+ editorFactory.registerEditor(QVariant::Rect, creator2);
+ QVERIFY(creator);
+
+ //this should erase creator2
+ editorFactory.registerEditor(QVariant::Rect, creator);
+ QVERIFY(creator2.isNull());
+
+
+ QWidget parent;
+
+ QWidget *w = editorFactory.createEditor(QVariant::Rect, &parent);
+ QCOMPARE(w->metaObject()->className(), "QDoubleSpinBox");
+ QCOMPARE(w->metaObject()->userProperty().type(), QVariant::Double);
+ }
- QWidget *w = editorFactory.createEditor(QVariant::Rect, &parent);
- QCOMPARE(w->metaObject()->className(), "QDoubleSpinBox");
- QCOMPARE(w->metaObject()->userProperty().type(), QVariant::Double);
+ //editorFactory has been deleted, so should be creator
+ //because editorFActory has the ownership
+ QVERIFY(creator.isNull());
+ QVERIFY(creator2.isNull());
delete creator;
}
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp
index 5404d46..8a38782 100644
--- a/tests/auto/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/qmenubar/tst_qmenubar.cpp
@@ -149,6 +149,7 @@ private slots:
void check_shortcutPress();
void check_menuPosition();
void task223138_triggered();
+ void task256322_highlight();
#if defined(QT3_SUPPORT)
void indexBasedInsertion_data();
@@ -1520,6 +1521,41 @@ void tst_QMenuBar::task223138_triggered()
QCOMPARE(submenuSpy.count(), 1);
}
+void tst_QMenuBar::task256322_highlight()
+{
+ QMainWindow win;
+ QMenu menu;
+ QAction *file = win.menuBar()->addMenu(&menu);
+ file->setText("file");
+ QMenu menu2;
+ QAction *file2 = win.menuBar()->addMenu(&menu2);
+ file2->setText("file2");
+ QAction *nothing = win.menuBar()->addAction("nothing");
+
+ win.show();
+
+ QTest::mouseClick(win.menuBar(), Qt::LeftButton, 0, win.menuBar()->actionGeometry(file).center());
+ QVERIFY(menu.isVisible());
+ QVERIFY(!menu2.isVisible());
+ QCOMPARE(win.menuBar()->activeAction(), file);
+
+ QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(file2).center());
+ QVERIFY(!menu.isVisible());
+ QVERIFY(menu2.isVisible());
+ QCOMPARE(win.menuBar()->activeAction(), file2);
+
+ QTest::mouseMove(win.menuBar(), win.menuBar()->actionGeometry(nothing).center());
+ QVERIFY(!menu.isVisible());
+ QVERIFY(!menu2.isVisible());
+ QCOMPARE(win.menuBar()->activeAction(), nothing);
+
+ QTest::mouseMove(&win, win.menuBar()->geometry().bottomLeft() + QPoint(1,1));
+
+ QVERIFY(!menu.isVisible());
+ QVERIFY(!menu2.isVisible());
+ QVERIFY(!win.menuBar()->activeAction());
+}
+
#if defined(QT3_SUPPORT)
void tst_QMenuBar::indexBasedInsertion_data()
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 3f36729..7e42da8 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -228,6 +228,7 @@ private slots:
void zeroOpacity();
void clippingBug();
+ void emptyClip();
private:
void fillData();
@@ -4218,5 +4219,23 @@ void tst_QPainter::clippingBug()
QCOMPARE(img, expected);
}
+void tst_QPainter::emptyClip()
+{
+ QImage img(64, 64, QImage::Format_ARGB32_Premultiplied);
+ QPainter p(&img);
+ p.setRenderHints(QPainter::Antialiasing);
+ p.setClipRect(0, 32, 64, 0);
+ p.fillRect(0, 0, 64, 64, Qt::white);
+
+ QPainterPath path;
+ path.lineTo(64, 0);
+ path.lineTo(64, 64);
+ path.lineTo(40, 64);
+ path.lineTo(40, 80);
+ path.lineTo(0, 80);
+
+ p.fillPath(path, Qt::green);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"
diff --git a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 9f66fe0..d7d6b88 100644
--- a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -253,16 +253,16 @@ void tst_QParallelAnimationGroup::setCurrentTime()
void tst_QParallelAnimationGroup::clearGroup()
{
QParallelAnimationGroup group;
+ static const int animationCount = 10;
- for (int i = 0; i < 10; ++i) {
+ for (int i = 0; i < animationCount; ++i) {
new QParallelAnimationGroup(&group);
}
- QCOMPARE(group.animationCount(), 10);
+ QCOMPARE(group.animationCount(), animationCount);
- int count = group.animationCount();
- QPointer<QAbstractAnimation> *children = new QPointer<QAbstractAnimation>[count];
- for (int i = 0; i < count; ++i) {
+ QPointer<QAbstractAnimation> children[animationCount];
+ for (int i = 0; i < animationCount; ++i) {
QVERIFY(group.animationAt(i) != 0);
children[i] = group.animationAt(i);
}
@@ -270,10 +270,8 @@ void tst_QParallelAnimationGroup::clearGroup()
group.clearAnimations();
QCOMPARE(group.animationCount(), 0);
QCOMPARE(group.currentTime(), 0);
- for (int i = 0; i < count; ++i)
- QCOMPARE(children[i], QPointer<QAbstractAnimation>());
-
- delete[] children;
+ for (int i = 0; i < animationCount; ++i)
+ QVERIFY(children[i].isNull());
}
void tst_QParallelAnimationGroup::propagateGroupUpdateToChildren()
@@ -807,15 +805,15 @@ void tst_QParallelAnimationGroup::autoAdd()
QParallelAnimationGroup group;
QCOMPARE(group.duration(), 0);
TestAnimation2 *test = new TestAnimation2(250, &group); // 0, duration = 250;
- QCOMPARE(test->group(), &group);
+ QCOMPARE(test->group(), static_cast<QAnimationGroup*>(&group));
QCOMPARE(test->duration(), 250);
QCOMPARE(group.duration(), 250);
test = new TestAnimation2(750, &group); // 1
- QCOMPARE(test->group(), &group);
+ QCOMPARE(test->group(), static_cast<QAnimationGroup*>(&group));
QCOMPARE(group.duration(), 750);
test = new TestAnimation2(500, &group); // 2
- QCOMPARE(test->group(), &group);
+ QCOMPARE(test->group(), static_cast<QAnimationGroup*>(&group));
QCOMPARE(group.duration(), 750);
delete group.animationAt(1); // remove the one with duration = 750
diff --git a/tests/auto/qpathclipper/tst_qpathclipper.cpp b/tests/auto/qpathclipper/tst_qpathclipper.cpp
index f3077ee..6e6b632 100644
--- a/tests/auto/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/qpathclipper/tst_qpathclipper.cpp
@@ -93,6 +93,7 @@ private slots:
void task204301();
void task209056();
+ void task251909();
};
Q_DECLARE_METATYPE(QPainterPath)
@@ -1397,6 +1398,25 @@ void tst_QPathClipper::task209056()
QVERIFY(p3 != QPainterPath());
}
+void tst_QPathClipper::task251909()
+{
+ QPainterPath p1;
+ p1.moveTo(0, -10);
+ p1.lineTo(10, -10);
+ p1.lineTo(10, 0);
+ p1.lineTo(0, 0);
+
+ QPainterPath p2;
+ p2.moveTo(0, 8e-14);
+ p2.lineTo(10, -8e-14);
+ p2.lineTo(10, 10);
+ p2.lineTo(0, 10);
+
+ QPainterPath result = p1.united(p2);
+
+ QVERIFY(result.elementCount() <= 5);
+}
+
QTEST_APPLESS_MAIN(tst_QPathClipper)
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
index 5d9f56f..cbdaf1e 100644
--- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
+++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
@@ -111,9 +111,11 @@ void tst_QScriptEngineDebugger::attachAndDetach()
{
{
QScriptEngineDebugger debugger;
+ QCOMPARE(debugger.state(), QScriptEngineDebugger::SuspendedState);
debugger.attachTo(0);
QScriptEngine engine;
debugger.attachTo(&engine);
+ QCOMPARE(debugger.state(), QScriptEngineDebugger::SuspendedState);
}
{
QScriptEngineDebugger debugger;
@@ -129,11 +131,9 @@ void tst_QScriptEngineDebugger::attachAndDetach()
QVERIFY(!engine.globalObject().property("print").strictlyEquals(oldPrint));
debugger.detach();
- QEXPECT_FAIL("", "Task 256184", Continue);
- QVERIFY(!engine.globalObject().property("print").isValid());
- QEXPECT_FAIL("", "Task 256184", Continue);
+ QVERIFY(engine.globalObject().property("print").strictlyEquals(oldPrint));
QVERIFY(!engine.globalObject().property("__FILE__").isValid());
-// QVERIFY(!engine.globalObject().property("__LINE__").isValid());
+ QVERIFY(!engine.globalObject().property("__LINE__").isValid());
}
{
QScriptEngineDebugger debugger;
@@ -161,6 +161,14 @@ void tst_QScriptEngineDebugger::attachAndDetach()
debugger2.attachTo(&engine);
}
#endif
+ {
+ QScriptEngine *engine = new QScriptEngine;
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(engine);
+ delete engine;
+ QScriptEngine engine2;
+ debugger.attachTo(&engine2);
+ }
}
void tst_QScriptEngineDebugger::action()
diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index 522a900..97ff04b 100644
--- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -321,15 +321,15 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation()
// sequence operating on different object/properties
QAnimationGroup *sequence = new QSequentialAnimationGroup();
- QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
- QVariantAnimation *a1_s_o2 = new QPropertyAnimation(&s_o2, "value");
+ QAbstractAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a1_s_o2 = new QPropertyAnimation(&s_o2, "value");
sequence->addAnimation(a1_s_o1);
sequence->addAnimation(a1_s_o2);
- UncontrolledAnimation *notTimeDriven = new UncontrolledAnimation(&t_o1, "value");
+ QAbstractAnimation *notTimeDriven = new UncontrolledAnimation(&t_o1, "value");
QCOMPARE(notTimeDriven->totalDuration(), -1);
- QVariantAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value");
+ QAbstractAnimation *loopsForever = new QPropertyAnimation(&t_o2, "value");
loopsForever->setLoopCount(-1);
QCOMPARE(loopsForever->totalDuration(), -1);
@@ -818,7 +818,7 @@ void tst_QSequentialAnimationGroup::restart()
QCOMPARE(seqCurrentAnimChangedSpy.count(), 6);
for(int i=0; i<seqCurrentAnimChangedSpy.count(); i++)
- QCOMPARE(anims[i%3], qVariantValue<QAbstractAnimation*>(seqCurrentAnimChangedSpy.at(i).at(0)));
+ QCOMPARE(static_cast<QAbstractAnimation*>(anims[i%3]), qVariantValue<QAbstractAnimation*>(seqCurrentAnimChangedSpy.at(i).at(0)));
group.start();
@@ -836,9 +836,9 @@ void tst_QSequentialAnimationGroup::looping()
// sequence operating on same object/property
QSequentialAnimationGroup *sequence = new QSequentialAnimationGroup();
- QVariantAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
- QVariantAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value");
- QVariantAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a1_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a2_s_o1 = new QPropertyAnimation(&s_o1, "value");
+ QAbstractAnimation *a3_s_o1 = new QPropertyAnimation(&s_o1, "value");
QSignalSpy a1Spy(a1_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
QSignalSpy a2Spy(a2_s_o1, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
@@ -951,18 +951,19 @@ void tst_QSequentialAnimationGroup::startDelay()
void tst_QSequentialAnimationGroup::clearGroup()
{
QSequentialAnimationGroup group;
+
+ static const int animationCount = 20;
- for (int i = 0; i < 10; ++i) {
+ for (int i = 0; i < animationCount/2; ++i) {
QSequentialAnimationGroup *subGroup = new QSequentialAnimationGroup(&group);
group.addPause(100);
subGroup->addPause(10);
}
- QCOMPARE(group.animationCount(), 20);
+ QCOMPARE(group.animationCount(), animationCount);
- int count = group.animationCount();
- QPointer<QAbstractAnimation> *children = new QPointer<QAbstractAnimation>[count];
- for (int i = 0; i < count; ++i) {
+ QPointer<QAbstractAnimation> children[animationCount];
+ for (int i = 0; i < animationCount; ++i) {
QVERIFY(group.animationAt(i) != 0);
children[i] = group.animationAt(i);
}
@@ -970,10 +971,8 @@ void tst_QSequentialAnimationGroup::clearGroup()
group.clearAnimations();
QCOMPARE(group.animationCount(), 0);
QCOMPARE(group.currentTime(), 0);
- for (int i = 0; i < count; ++i)
- QCOMPARE(children[i], QPointer<QAbstractAnimation>());
-
- delete[] children;
+ for (int i = 0; i < animationCount; ++i)
+ QVERIFY(children[i].isNull());
}
void tst_QSequentialAnimationGroup::groupWithZeroDurationAnimations()
@@ -995,7 +994,7 @@ void tst_QSequentialAnimationGroup::groupWithZeroDurationAnimations()
//this should just run fine and change nothing
group.setCurrentTime(0);
- QCOMPARE(group.currentAnimation(), a1);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(a1));
QVariantAnimation *a2 = new QPropertyAnimation(&o2, "myOtherProperty");
a2->setDuration(500);
@@ -1457,7 +1456,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
group.setCurrentTime(300);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
QCOMPARE(notTimeDriven.currentTime(), actualDuration);
- QCOMPARE(group.currentAnimation(), &anim);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
//3rd case:
//now let's add a perfectly defined animation at the end
@@ -1474,7 +1473,7 @@ void tst_QSequentialAnimationGroup::finishWithUncontrolledAnimation()
QCOMPARE(notTimeDriven.state(), QAnimationGroup::Stopped);
QCOMPARE(group.state(), QAnimationGroup::Running);
QCOMPARE(anim.state(), QAnimationGroup::Running);
- QCOMPARE(group.currentAnimation(), &anim);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
QCOMPARE(animStateChangedSpy.count(), 1);
QTest::qWait(300); //wait for the end of anim
@@ -1494,21 +1493,21 @@ void tst_QSequentialAnimationGroup::addRemoveAnimation()
QCOMPARE(group.duration(), 0);
QCOMPARE(group.currentTime(), 0);
- QVariantAnimation *anim1 = new QPropertyAnimation;
+ QAbstractAnimation *anim1 = new QPropertyAnimation;
group.addAnimation(anim1);
QCOMPARE(group.duration(), 250);
QCOMPARE(group.currentTime(), 0);
QCOMPARE(group.currentAnimation(), anim1);
//let's append an animation
- QVariantAnimation *anim2 = new QPropertyAnimation;
+ QAbstractAnimation *anim2 = new QPropertyAnimation;
group.addAnimation(anim2);
QCOMPARE(group.duration(), 500);
QCOMPARE(group.currentTime(), 0);
QCOMPARE(group.currentAnimation(), anim1);
//let's prepend an animation
- QVariantAnimation *anim0 = new QPropertyAnimation;
+ QAbstractAnimation *anim0 = new QPropertyAnimation;
group.insertAnimationAt(0, anim0);
QCOMPARE(group.duration(), 750);
QCOMPARE(group.currentTime(), 0);
@@ -1545,7 +1544,7 @@ void tst_QSequentialAnimationGroup::currentAnimation()
QPropertyAnimation anim;
anim.setDuration(0);
group.addAnimation(&anim);
- QCOMPARE(group.currentAnimation(), &anim);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
}
void tst_QSequentialAnimationGroup::currentAnimationWithZeroDuration()
@@ -1572,21 +1571,21 @@ void tst_QSequentialAnimationGroup::currentAnimationWithZeroDuration()
group.addAnimation(&zero3);
group.addAnimation(&zero4);
- QCOMPARE(group.currentAnimation(), &zero1);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&zero1));
group.setCurrentTime(0);
- QCOMPARE(group.currentAnimation(), &anim);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
group.setCurrentTime(group.duration());
- QCOMPARE(group.currentAnimation(), &zero4);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&zero4));
group.setDirection(QAbstractAnimation::Backward);
group.setCurrentTime(0);
- QCOMPARE(group.currentAnimation(), &zero1);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&zero1));
group.setCurrentTime(group.duration());
- QCOMPARE(group.currentAnimation(), &anim);
+ QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation*>(&anim));
}
void tst_QSequentialAnimationGroup::insertAnimation()
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index d17706b..825db6c 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -177,9 +177,10 @@ private slots:
#ifdef NOT_READY_YET
void task_217003_data() { generic_data(); }
void task_217003();
-
void task_229811();
void task_229811_data() { generic_data(); }
+ void task_234422_data() { generic_data(); }
+ void task_234422();
#endif
void task_250026_data() { generic_data("QODBC"); }
void task_250026();
@@ -2775,6 +2776,44 @@ void tst_QSqlQuery::task_229811()
q.exec("DROP TABLE " + tableName );
}
+
+void tst_QSqlQuery::task_234422()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+
+ QSqlQuery query(db);
+ QStringList m_airlines;
+ QStringList m_countries;
+
+ m_airlines << "Lufthansa" << "SAS" << "United" << "KLM" << "Aeroflot";
+ m_countries << "DE" << "SE" << "US" << "NL" << "RU";
+
+ QString tableName = qTableName( "task_234422" );
+
+ query.exec("DROP TABLE " + tableName);
+ QVERIFY_SQL(query,exec("CREATE TABLE " + tableName + " (id int primary key, "
+ "name varchar(20), homecountry varchar(2))"));
+ for (int i = 0; i < m_airlines.count(); ++i) {
+ QVERIFY(query.exec(QString("INSERT INTO " + tableName + " values(%1, '%2', '%3')")
+ .arg(i).arg(m_airlines[i], m_countries[i])));
+ }
+
+ QVERIFY_SQL(query, exec("SELECT name FROM " + tableName));
+ QVERIFY(query.isSelect());
+ QVERIFY(query.first());
+ QVERIFY(query.next());
+ QCOMPARE(query.at(), 1);
+
+ QSqlQuery query2(query);
+
+ QVERIFY_SQL(query2,exec());
+ QVERIFY(query2.first());
+ QCOMPARE(query2.at(), 0);
+ QCOMPARE(query.at(), 1);
+}
+
#endif
QTEST_MAIN( tst_QSqlQuery )
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 9bccb97..b39f0a1 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -413,7 +413,7 @@ void tst_QStateMachine::customGlobalErrorState()
machine.start();
QCoreApplication::processEvents();
- QCOMPARE(machine.errorState(), customErrorState);
+ QCOMPARE(machine.errorState(), static_cast<QAbstractState*>(customErrorState));
QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(initialState));
@@ -778,7 +778,7 @@ void tst_QStateMachine::customErrorStateIsNull()
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: Missing initial state in compound state ''");
QCoreApplication::processEvents();
- QCOMPARE(machine.errorState(), reinterpret_cast<void *>(0));
+ QCOMPARE(machine.errorState(), reinterpret_cast<QAbstractState *>(0));
QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(oldErrorState));
}
@@ -1103,29 +1103,29 @@ void tst_QStateMachine::stateEntryAndExit()
TestTransition *t = new TestTransition(s2);
QCOMPARE(t->machine(), (QStateMachine*)0);
QCOMPARE(t->sourceState(), (QState*)0);
- QCOMPARE(t->targetState(), s2);
+ QCOMPARE(t->targetState(), (QAbstractState*)s2);
QCOMPARE(t->targetStates().size(), 1);
- QCOMPARE(t->targetStates().at(0), s2);
+ QCOMPARE(t->targetStates().at(0), (QAbstractState*)s2);
t->setTargetState(0);
- QCOMPARE(t->targetState(), (QState*)0);
+ QCOMPARE(t->targetState(), (QAbstractState*)0);
QVERIFY(t->targetStates().isEmpty());
t->setTargetState(s2);
- QCOMPARE(t->targetState(), s2);
+ QCOMPARE(t->targetState(), (QAbstractState*)s2);
QTest::ignoreMessage(QtWarningMsg, "QAbstractTransition::setTargetStates: target state(s) cannot be null");
t->setTargetStates(QList<QAbstractState*>() << 0);
- QCOMPARE(t->targetState(), s2);
+ QCOMPARE(t->targetState(), (QAbstractState*)s2);
t->setTargetStates(QList<QAbstractState*>() << s2);
- QCOMPARE(t->targetState(), s2);
+ QCOMPARE(t->targetState(), (QAbstractState*)s2);
QCOMPARE(t->targetStates().size(), 1);
- QCOMPARE(t->targetStates().at(0), s2);
+ QCOMPARE(t->targetStates().at(0), (QAbstractState*)s2);
QCOMPARE(s1->addTransition(t), (QAbstractTransition*)t);
- QCOMPARE(t->sourceState(), s1);
+ QCOMPARE(t->sourceState(), (QState*)s1);
QCOMPARE(t->machine(), &machine);
{
QAbstractTransition *trans = s2->addTransition(s3);
QVERIFY(trans != 0);
- QCOMPARE(trans->sourceState(), (QAbstractState*)s2);
+ QCOMPARE(trans->sourceState(), (QState*)s2);
QCOMPARE(trans->targetState(), (QAbstractState*)s3);
{
char warning[256];
@@ -1134,10 +1134,10 @@ void tst_QStateMachine::stateEntryAndExit()
s1->removeTransition(trans);
}
s2->removeTransition(trans);
- QCOMPARE(trans->sourceState(), (QAbstractState*)0);
+ QCOMPARE(trans->sourceState(), (QState*)0);
QCOMPARE(trans->targetState(), (QAbstractState*)s3);
QCOMPARE(s2->addTransition(trans), trans);
- QCOMPARE(trans->sourceState(), (QAbstractState*)s2);
+ QCOMPARE(trans->sourceState(), (QState*)s2);
}
QSignalSpy startedSpy(&machine, SIGNAL(started()));
@@ -1269,25 +1269,33 @@ void tst_QStateMachine::assignProperty()
s1->addTransition(s2);
machine.setInitialState(s1);
machine.start();
- QCoreApplication::processEvents();
- QCOMPARE(s1->objectName(), QString::fromLatin1("s1"));
+ QTRY_COMPARE(s1->objectName(), QString::fromLatin1("s1"));
s1->assignProperty(s1, "objectName", "foo");
machine.start();
- QCoreApplication::processEvents();
- QCOMPARE(s1->objectName(), QString::fromLatin1("foo"));
+ QTRY_COMPARE(s1->objectName(), QString::fromLatin1("foo"));
s1->assignProperty(s1, "noSuchProperty", 123);
machine.start();
- QCoreApplication::processEvents();
- QCOMPARE(s1->objectName(), QString::fromLatin1("foo"));
- QCOMPARE(s1->dynamicPropertyNames().size(), 1);
+ QTRY_COMPARE(s1->dynamicPropertyNames().size(), 1);
QCOMPARE(s1->dynamicPropertyNames().at(0), QByteArray("noSuchProperty"));
+ QCOMPARE(s1->objectName(), QString::fromLatin1("foo"));
- QSignalSpy polishedSpy(s1, SIGNAL(polished()));
- machine.start();
- QCoreApplication::processEvents();
- QCOMPARE(polishedSpy.count(), 1);
+ {
+ QSignalSpy polishedSpy(s1, SIGNAL(polished()));
+ machine.start();
+ QTRY_COMPARE(polishedSpy.count(), 1);
+ }
+
+ // nested states
+ {
+ QState *s11 = new QState(s1);
+ QString str = QString::fromLatin1("set by nested state");
+ s11->assignProperty(s11, "objectName", str);
+ s1->setInitialState(s11);
+ machine.start();
+ QTRY_COMPARE(s11->objectName(), str);
+ }
}
void tst_QStateMachine::assignPropertyWithAnimation()
@@ -1716,18 +1724,18 @@ void tst_QStateMachine::signalTransitions()
QStateMachine machine;
QState *s0 = new QState(machine.rootState());
QTest::ignoreMessage(QtWarningMsg, "QState::addTransition: sender cannot be null");
- QCOMPARE(s0->addTransition(0, SIGNAL(noSuchSignal()), 0), (QObject*)0);
+ QCOMPARE(s0->addTransition(0, SIGNAL(noSuchSignal()), 0), (QSignalTransition*)0);
SignalEmitter emitter;
QTest::ignoreMessage(QtWarningMsg, "QState::addTransition: signal cannot be null");
- QCOMPARE(s0->addTransition(&emitter, 0, 0), (QObject*)0);
+ QCOMPARE(s0->addTransition(&emitter, 0, 0), (QSignalTransition*)0);
QTest::ignoreMessage(QtWarningMsg, "QState::addTransition: cannot add transition to null state");
- QCOMPARE(s0->addTransition(&emitter, SIGNAL(signalWithNoArg()), 0), (QObject*)0);
+ QCOMPARE(s0->addTransition(&emitter, SIGNAL(signalWithNoArg()), 0), (QSignalTransition*)0);
QFinalState *s1 = new QFinalState(machine.rootState());
QTest::ignoreMessage(QtWarningMsg, "QState::addTransition: no such signal SignalEmitter::noSuchSignal()");
- QCOMPARE(s0->addTransition(&emitter, SIGNAL(noSuchSignal()), s1), (QObject*)0);
+ QCOMPARE(s0->addTransition(&emitter, SIGNAL(noSuchSignal()), s1), (QSignalTransition*)0);
QSignalTransition *trans = s0->addTransition(&emitter, SIGNAL(signalWithNoArg()), s1);
QVERIFY(trans != 0);
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 29f42df..f908d3f 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -370,7 +370,7 @@ void tst_QTabBar::tabButton()
tabbar.setTabButton(0, position, button);
- QCOMPARE(tabbar.tabButton(0, position), static_cast<const QWidget *>(button));
+ QCOMPARE(tabbar.tabButton(0, position), static_cast<QWidget *>(button));
QTRY_VERIFY(!button->isHidden());
QVERIFY(tabbar.tabButton(0, otherSide) == 0);
QCOMPARE(button->parent(), static_cast<QObject *>(&tabbar));
diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
index 843974d..8c7c021 100644
--- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
@@ -44,8 +44,10 @@
#include <QtCore/QDebug>
#include <QtCore/QObject>
#include <QtGui>
+#ifdef Q_OS_WINCE_WM
#include <windows.h>
#include <ddhelper.h>
+#endif
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index fbd9923..3bca573 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -63,7 +63,7 @@
QT_BEGIN_NAMESPACE
BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
- const QString &url, QWidget *parent)
+ const QString &url, QWidget *parent)
: QDialog(parent)
, m_url(url)
, m_title(title)
@@ -95,21 +95,21 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(addAccepted()));
connect(ui.newFolderButton, SIGNAL(clicked()), this, SLOT(addNewFolder()));
connect(ui.toolButton, SIGNAL(clicked()), this, SLOT(toolButtonClicked()));
- connect(ui.bookmarkEdit, SIGNAL(textChanged(const QString&)), this,
- SLOT(textChanged(const QString&)));
+ connect(ui.bookmarkEdit, SIGNAL(textChanged(QString)), this,
+ SLOT(textChanged(QString)));
- connect(bookmarkManager->treeBookmarkModel(), SIGNAL(itemChanged(QStandardItem*)),
+ connect(bookmarkManager->treeBookmarkModel(),
+ SIGNAL(itemChanged(QStandardItem*)),
this, SLOT(itemChanged(QStandardItem*)));
- connect(ui.bookmarkFolders, SIGNAL(currentIndexChanged(const QString&)), this,
- SLOT(selectBookmarkFolder(const QString&)));
+ connect(ui.bookmarkFolders, SIGNAL(currentIndexChanged(QString)), this,
+ SLOT(selectBookmarkFolder(QString)));
- connect(ui.treeView, SIGNAL(customContextMenuRequested(const QPoint&)), this,
- SLOT(customContextMenuRequested(const QPoint&)));
+ connect(ui.treeView, SIGNAL(customContextMenuRequested(QPoint)), this,
+ SLOT(customContextMenuRequested(QPoint)));
- connect(ui.treeView->selectionModel(),
- SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)),
- this, SLOT(currentChanged(const QModelIndex&, const QModelIndex&)));
+ connect(ui.treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,
+ QModelIndex)), this, SLOT(currentChanged(QModelIndex)));
}
BookmarkDialog::~BookmarkDialog()
@@ -118,8 +118,8 @@ BookmarkDialog::~BookmarkDialog()
void BookmarkDialog::addAccepted()
{
- const QItemSelection selection = ui.treeView->selectionModel()->selection();
- const QModelIndexList list = selection.indexes();
+ QItemSelectionModel *model = ui.treeView->selectionModel();
+ const QModelIndexList &list = model->selection().indexes();
QModelIndex index;
if (!list.isEmpty())
@@ -131,8 +131,8 @@ void BookmarkDialog::addAccepted()
void BookmarkDialog::addNewFolder()
{
- const QItemSelection selection = ui.treeView->selectionModel()->selection();
- const QModelIndexList list = selection.indexes();
+ QItemSelectionModel *model = ui.treeView->selectionModel();
+ const QModelIndexList &list = model->selection().indexes();
QModelIndex index;
if (!list.isEmpty())
@@ -143,13 +143,12 @@ void BookmarkDialog::addNewFolder()
if (newFolder.isValid()) {
ui.treeView->expand(index);
const QModelIndex &index = proxyModel->mapFromSource(newFolder);
- ui.treeView->selectionModel()->setCurrentIndex(index,
- QItemSelectionModel::ClearAndSelect);
+ model->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect);
ui.bookmarkFolders->clear();
ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
- const QString name = index.data().toString();
+ const QString &name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
}
ui.treeView->setFocus();
@@ -183,14 +182,14 @@ void BookmarkDialog::itemChanged(QStandardItem *item)
ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
QString name = tr("Bookmarks");
- const QModelIndex& index = ui.treeView->currentIndex();
+ const QModelIndex &index = ui.treeView->currentIndex();
if (index.isValid())
name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
}
}
-void BookmarkDialog::textChanged(const QString& string)
+void BookmarkDialog::textChanged(const QString &string)
{
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!string.isEmpty());
}
@@ -209,9 +208,12 @@ void BookmarkDialog::selectBookmarkFolder(const QString &folderName)
QList<QStandardItem*> list = model->findItems(folderName,
Qt::MatchCaseSensitive | Qt::MatchRecursive, 0);
if (!list.isEmpty()) {
- QModelIndex index = model->indexFromItem(list.at(0));
- ui.treeView->selectionModel()->setCurrentIndex(
- proxyModel->mapFromSource(index), QItemSelectionModel::ClearAndSelect);
+ const QModelIndex &index = model->indexFromItem(list.at(0));
+ QItemSelectionModel *model = ui.treeView->selectionModel();
+ if (model) {
+ model->setCurrentIndex(proxyModel->mapFromSource(index),
+ QItemSelectionModel::ClearAndSelect);
+ }
}
}
@@ -226,13 +228,13 @@ void BookmarkDialog::customContextMenuRequested(const QPoint &point)
QAction *removeItem = menu.addAction(tr("Delete Folder"));
QAction *renameItem = menu.addAction(tr("Rename Folder"));
- QAction *picked_action = menu.exec(ui.treeView->mapToGlobal(point));
- if (!picked_action)
+ QAction *picked = menu.exec(ui.treeView->mapToGlobal(point));
+ if (!picked)
return;
- if (picked_action == removeItem) {
- bookmarkManager->removeBookmarkItem(ui.treeView,
- proxyModel->mapToSource(index));
+ const QModelIndex &proxyIndex = proxyModel->mapToSource(index);
+ if (picked == removeItem) {
+ bookmarkManager->removeBookmarkItem(ui.treeView, proxyIndex);
ui.bookmarkFolders->clear();
ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
@@ -242,10 +244,9 @@ void BookmarkDialog::customContextMenuRequested(const QPoint &point)
name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
}
- else if (picked_action == renameItem) {
- QStandardItem *item = bookmarkManager->treeBookmarkModel()->
- itemFromIndex(proxyModel->mapToSource(index));
- if (item) {
+ else if (picked == renameItem) {
+ BookmarkModel *model = bookmarkManager->treeBookmarkModel();
+ if (QStandardItem *item = model->itemFromIndex(proxyIndex)) {
item->setEditable(true);
ui.treeView->edit(index);
item->setEditable(false);
@@ -253,19 +254,12 @@ void BookmarkDialog::customContextMenuRequested(const QPoint &point)
}
}
-void BookmarkDialog::currentChanged(const QModelIndex& current,
- const QModelIndex& previous)
+void BookmarkDialog::currentChanged(const QModelIndex &current)
{
- Q_UNUSED(previous)
-
- if (!current.isValid()) {
- ui.bookmarkFolders->setCurrentIndex(
- ui.bookmarkFolders->findText(tr("Bookmarks")));
- return;
- }
-
- ui.bookmarkFolders->setCurrentIndex(
- ui.bookmarkFolders->findText(current.data().toString()));
+ QString text = tr("Bookmarks");
+ if (current.isValid())
+ text = current.data().toString();
+ ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(text));
}
bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
@@ -276,7 +270,7 @@ bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
QModelIndex index = ui.treeView->currentIndex();
switch (ke->key()) {
case Qt::Key_F2: {
- const QModelIndex& source = proxyModel->mapToSource(index);
+ const QModelIndex &source = proxyModel->mapToSource(index);
QStandardItem *item =
bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
if (item) {
@@ -307,10 +301,11 @@ bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
}
+// #pragma mark -- BookmarkWidget
BookmarkWidget::BookmarkWidget(BookmarkManager *manager, QWidget *parent,
- bool showButtons)
+ bool showButtons)
: QWidget(parent)
, addButton(0)
, removeButton(0)
@@ -326,7 +321,7 @@ BookmarkWidget::~BookmarkWidget()
void BookmarkWidget::removeClicked()
{
- const QModelIndex& index = treeView->currentIndex();
+ const QModelIndex &index = treeView->currentIndex();
if (searchField->text().isEmpty()) {
bookmarkManager->removeBookmarkItem(treeView,
filterBookmarkModel->mapToSource(index));
@@ -360,10 +355,11 @@ void BookmarkWidget::filterChanged()
expandItems();
}
-void BookmarkWidget::expand(const QModelIndex& index)
+void BookmarkWidget::expand(const QModelIndex &index)
{
- const QModelIndex& source = filterBookmarkModel->mapToSource(index);
- QStandardItem *item = bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
+ const QModelIndex &source = filterBookmarkModel->mapToSource(index);
+ QStandardItem *item =
+ bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
if (item)
item->setData(treeView->isExpanded(index), Qt::UserRole + 11);
}
@@ -404,22 +400,22 @@ void BookmarkWidget::customContextMenuRequested(const QPoint &point)
}
}
- QAction *picked_action = menu.exec(treeView->mapToGlobal(point));
- if (!picked_action)
+ QAction *pickedAction = menu.exec(treeView->mapToGlobal(point));
+ if (!pickedAction)
return;
- if (picked_action == showItem) {
+ if (pickedAction == showItem) {
emit requestShowLink(data);
}
- else if (picked_action == showItemNewTab) {
+ else if (pickedAction == showItemNewTab) {
CentralWidget::instance()->setSourceInNewTab(data);
}
- else if (picked_action == removeItem) {
+ else if (pickedAction == removeItem) {
bookmarkManager->removeBookmarkItem(treeView,
filterBookmarkModel->mapToSource(index));
}
- else if (picked_action == renameItem) {
- const QModelIndex& source = filterBookmarkModel->mapToSource(index);
+ else if (pickedAction == renameItem) {
+ const QModelIndex &source = filterBookmarkModel->mapToSource(index);
QStandardItem *item =
bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
if (item) {
@@ -443,7 +439,7 @@ void BookmarkWidget::setup(bool showButtons)
searchField = new QLineEdit(this);
vlayout->addWidget(searchField);
- connect(searchField, SIGNAL(textChanged(const QString &)), this,
+ connect(searchField, SIGNAL(textChanged(QString)), this,
SLOT(filterChanged()));
treeView = new TreeView(this);
@@ -490,17 +486,14 @@ void BookmarkWidget::setup(bool showButtons)
treeView->viewport()->installEventFilter(this);
treeView->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(treeView, SIGNAL(expanded(const QModelIndex&)), this,
- SLOT(expand(const QModelIndex&)));
-
- connect(treeView, SIGNAL(collapsed(const QModelIndex&)), this,
- SLOT(expand(const QModelIndex&)));
-
- connect(treeView, SIGNAL(activated(const QModelIndex&)), this,
- SLOT(activated(const QModelIndex&)));
-
- connect(treeView, SIGNAL(customContextMenuRequested(const QPoint&)),
- this, SLOT(customContextMenuRequested(const QPoint&)));
+ connect(treeView, SIGNAL(expanded(QModelIndex)), this,
+ SLOT(expand(QModelIndex)));
+ connect(treeView, SIGNAL(collapsed(QModelIndex)), this,
+ SLOT(expand(QModelIndex)));
+ connect(treeView, SIGNAL(activated(QModelIndex)), this,
+ SLOT(activated(QModelIndex)));
+ connect(treeView, SIGNAL(customContextMenuRequested(QPoint)),
+ this, SLOT(customContextMenuRequested(QPoint)));
filterBookmarkModel->setFilterKeyColumn(0);
filterBookmarkModel->setDynamicSortFilter(true);
@@ -514,8 +507,8 @@ void BookmarkWidget::expandItems()
QStandardItemModel *model = bookmarkManager->treeBookmarkModel();
QList<QStandardItem*>list = model->findItems(QLatin1String("*"),
Qt::MatchWildcard | Qt::MatchRecursive, 0);
- foreach (const QStandardItem* item, list) {
- const QModelIndex& index = model->indexFromItem(item);
+ foreach (const QStandardItem *item, list) {
+ const QModelIndex &index = model->indexFromItem(item);
treeView->setExpanded(filterBookmarkModel->mapFromSource(index),
item->data(Qt::UserRole + 11).toBool());
}
@@ -541,17 +534,17 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
if (e->type() == QEvent::KeyPress) {
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
if (index.isValid() && searchField->text().isEmpty()) {
+ const QModelIndex &src = filterBookmarkModel->mapToSource(index);
if (ke->key() == Qt::Key_F2) {
- QStandardItem *item = bookmarkManager->treeBookmarkModel()
- ->itemFromIndex(filterBookmarkModel->mapToSource(index));
+ QStandardItem *item =
+ bookmarkManager->treeBookmarkModel()->itemFromIndex(src);
if (item) {
item->setEditable(true);
treeView->edit(index);
item->setEditable(false);
}
} else if (ke->key() == Qt::Key_Delete) {
- bookmarkManager->removeBookmarkItem(treeView,
- filterBookmarkModel->mapToSource(index));
+ bookmarkManager->removeBookmarkItem(treeView, src);
}
}
@@ -559,7 +552,7 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
default: break;
case Qt::Key_Up: {
case Qt::Key_Down:
- treeView->subclassKeyPressEvent(ke);
+ treeView->subclassKeyPressEvent(ke);
} break;
case Qt::Key_Enter: {
@@ -593,9 +586,10 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
}
+// #pragma mark -- BookmarkModel
-BookmarkModel::BookmarkModel(int rows, int columns, QObject * parent)
+BookmarkModel::BookmarkModel(int rows, int columns, QObject *parent)
: QStandardItemModel(rows, columns, parent)
{
}
@@ -612,23 +606,23 @@ Qt::DropActions BookmarkModel::supportedDropActions() const
Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
{
Qt::ItemFlags defaultFlags = QStandardItemModel::flags(index);
- if (index.data(Qt::UserRole + 10).toString() == QLatin1String("Folder"))
+ if ((!index.isValid()) // can only happen for the invisible root item
+ || index.data(Qt::UserRole + 10).toString() == QLatin1String("Folder"))
return (Qt::ItemIsDropEnabled | defaultFlags) &~ Qt::ItemIsDragEnabled;
return (Qt::ItemIsDragEnabled | defaultFlags) &~ Qt::ItemIsDropEnabled;
}
+// #pragma mark -- BookmarkManager
-BookmarkManager::BookmarkManager(QHelpEngineCore* _helpEngine)
+BookmarkManager::BookmarkManager(QHelpEngineCore *_helpEngine)
: treeModel(new BookmarkModel(0, 1, this))
, listModel(new BookmarkModel(0, 1, this))
, helpEngine(_helpEngine)
{
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
- treeModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Bookmark"));
- listModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Bookmark"));
connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this,
SLOT(itemChanged(QStandardItem*)));
@@ -652,22 +646,10 @@ BookmarkModel* BookmarkManager::listBookmarkModel()
void BookmarkManager::saveBookmarks()
{
- qint32 depth = 0;
QByteArray bookmarks;
QDataStream stream(&bookmarks, QIODevice::WriteOnly);
- QStandardItem *root = treeModel->invisibleRootItem();
-
- for (int i = 0; i < root->rowCount(); ++i) {
- const QStandardItem *item = root->child(i);
- stream << depth; // root
- stream << item->data(Qt::DisplayRole).toString();
- stream << item->data(Qt::UserRole + 10).toString();
- stream << item->data(Qt::UserRole + 11).toBool();
- if (item->rowCount() > 0) {
- readBookmarksRecursive(item, stream, (depth +1));
- }
- }
+ readBookmarksRecursive(treeModel->invisibleRootItem(), stream, 0);
helpEngine->setCustomValue(QLatin1String("Bookmarks"), bookmarks);
}
@@ -687,7 +669,7 @@ QStringList BookmarkManager::bookmarkFolders() const
return folders;
}
-QModelIndex BookmarkManager::addNewFolder(const QModelIndex& index)
+QModelIndex BookmarkManager::addNewFolder(const QModelIndex &index)
{
QStandardItem *item = new QStandardItem(uniqueFolderName());
item->setEditable(false);
@@ -703,16 +685,17 @@ QModelIndex BookmarkManager::addNewFolder(const QModelIndex& index)
return treeModel->indexFromItem(item);
}
-void BookmarkManager::removeBookmarkItem(QTreeView *treeView, const QModelIndex& index)
+void BookmarkManager::removeBookmarkItem(QTreeView *treeView,
+ const QModelIndex &index)
{
QStandardItem *item = treeModel->itemFromIndex(index);
if (item) {
QString data = index.data(Qt::UserRole + 10).toString();
if (data == QLatin1String("Folder") && item->rowCount() > 0) {
int value = QMessageBox::question(treeView, tr("Remove"),
- tr("You are going to delete a Folder, this will also<br>"
- "remove it's content. Are you sure to continue?"),
- QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+ tr("You are going to delete a Folder, this will also<br>"
+ "remove it's content. Are you sure to continue?"),
+ QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
if (value == QMessageBox::Cancel)
return;
@@ -733,28 +716,26 @@ void BookmarkManager::removeBookmarkItem(QTreeView *treeView, const QModelIndex&
}
}
-void BookmarkManager::showBookmarkDialog(QWidget* parent, const QString &name,
- const QString &url)
+void BookmarkManager::showBookmarkDialog(QWidget *parent, const QString &name,
+ const QString &url)
{
BookmarkDialog dialog(this, name, url, parent);
dialog.exec();
}
-void BookmarkManager::addNewBookmark(const QModelIndex& index,
- const QString &name, const QString &url)
+void BookmarkManager::addNewBookmark(const QModelIndex &index,
+ const QString &name, const QString &url)
{
QStandardItem *item = new QStandardItem(name);
item->setEditable(false);
item->setData(false, Qt::UserRole + 11);
item->setData(url, Qt::UserRole + 10);
- if (index.isValid()) {
+ if (index.isValid())
treeModel->itemFromIndex(index)->appendRow(item);
- listModel->appendRow(item->clone());
- } else {
+ else
treeModel->appendRow(item);
- listModel->appendRow(item->clone());
- }
+ listModel->appendRow(item->clone());
}
void BookmarkManager::itemChanged(QStandardItem *item)
@@ -785,7 +766,8 @@ void BookmarkManager::setupBookmarkModels()
QList<int> lastDepths;
QList<QStandardItem*> parents;
- QByteArray ba = helpEngine->customValue(QLatin1String("Bookmarks")).toByteArray();
+ QByteArray ba =
+ helpEngine->customValue(QLatin1String("Bookmarks")).toByteArray();
QDataStream stream(ba);
while (!stream.atEnd()) {
stream >> depth >> name >> type >> expanded;
@@ -855,8 +837,7 @@ void BookmarkManager::removeBookmarkFolderItems(QStandardItem *item)
}
void BookmarkManager::readBookmarksRecursive(const QStandardItem *item,
- QDataStream &stream,
- const qint32 depth) const
+ QDataStream &stream, const qint32 depth) const
{
for (int j = 0; j < item->rowCount(); ++j) {
const QStandardItem *child = item->child(j);
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.h b/tools/assistant/tools/assistant/bookmarkmanager.h
index 29da5f3..bf7af41 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.h
+++ b/tools/assistant/tools/assistant/bookmarkmanager.h
@@ -74,7 +74,7 @@ class BookmarkDialog : public QDialog
Q_OBJECT
public:
- BookmarkDialog(BookmarkManager *manager, const QString &title,
+ BookmarkDialog(BookmarkManager *manager, const QString &title,
const QString &url, QWidget *parent = 0);
~BookmarkDialog();
@@ -86,8 +86,8 @@ private slots:
void textChanged(const QString& string);
void selectBookmarkFolder(const QString &folderName);
void customContextMenuRequested(const QPoint &point);
- void currentChanged(const QModelIndex& current, const QModelIndex& previous);
-
+ void currentChanged(const QModelIndex& current);
+
private:
bool eventFilter(QObject *object, QEvent *e);
@@ -177,14 +177,16 @@ public:
QStringList bookmarkFolders() const;
QModelIndex addNewFolder(const QModelIndex& index);
void removeBookmarkItem(QTreeView *treeView, const QModelIndex& index);
- void showBookmarkDialog(QWidget* parent, const QString &name, const QString &url);
- void addNewBookmark(const QModelIndex& index, const QString &name, const QString &url);
+ void showBookmarkDialog(QWidget* parent, const QString &name,
+ const QString &url);
+ void addNewBookmark(const QModelIndex& index, const QString &name,
+ const QString &url);
void setupBookmarkModels();
private slots:
void itemChanged(QStandardItem *item);
-private:
+private:
QString uniqueFolderName() const;
void removeBookmarkFolderItems(QStandardItem *item);
void readBookmarksRecursive(const QStandardItem *item, QDataStream &stream,
@@ -193,7 +195,7 @@ private:
private:
QString oldText;
QIcon folderIcon;
-
+
BookmarkModel *treeModel;
BookmarkModel *listModel;
QStandardItem *renameItem;
diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro
index e6208a6..9f4d7d8 100644
--- a/tools/assistant/translations/qt_help.pro
+++ b/tools/assistant/translations/qt_help.pro
@@ -42,6 +42,7 @@ HEADERS += ../lib/qhelpcollectionhandler_p.h \
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qt_help_de.ts \
$$[QT_INSTALL_TRANSLATIONS]/qt_help_ja.ts \
$$[QT_INSTALL_TRANSLATIONS]/qt_help_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/qt_help_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/qt_help_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts \
diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro
index 8572123..4b836e6 100644
--- a/tools/assistant/translations/translations.pro
+++ b/tools/assistant/translations/translations.pro
@@ -43,6 +43,7 @@ HEADERS += ../tools/assistant/aboutdialog.h \
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_de.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_ja.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/assistant_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts \
diff --git a/tools/assistant/translations/translations_adp.pro b/tools/assistant/translations/translations_adp.pro
index e3edca4..c6f3e81 100644
--- a/tools/assistant/translations/translations_adp.pro
+++ b/tools/assistant/translations/translations_adp.pro
@@ -34,6 +34,7 @@ HEADERS += ../compat/helpwindow.h \
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_de.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_ja.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_zh_TW.ts
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index dcc955b..e8fb282 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3087,7 +3087,6 @@ void Configure::buildHostTools()
<< "src/tools/moc"
<< "src/tools/rcc"
<< "src/tools/uic"
- << "tools/linguist/lrelease"
<< "tools/checksdk";
if (dictionary[ "CETEST" ] == "yes")
diff --git a/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp b/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp
index 38b1d7c..0b45b7b 100644
--- a/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp
@@ -315,7 +315,7 @@ QMenu *QStackedWidgetEventFilter::addContextMenuActions(QMenu *popup)
QMenu *pageMenu = 0;
const int count = stackedWidget()->count();
const bool hasSeveralPages = count > 1;
- m_actionDeletePage->setEnabled(hasSeveralPages);
+ m_actionDeletePage->setEnabled(count);
if (count) {
const QString pageSubMenuLabel = tr("Page %1 of %2").arg(stackedWidget()->currentIndex() + 1).arg(count);
pageMenu = popup->addMenu(pageSubMenuLabel);
@@ -327,10 +327,13 @@ QMenu *QStackedWidgetEventFilter::addContextMenuActions(QMenu *popup)
qdesigner_internal::PromotionTaskMenu::SuppressGlobalEdit,
pageMenu);
}
+ QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
+ insertPageMenu->addAction(m_actionInsertPageAfter);
+ insertPageMenu->addAction(m_actionInsertPage);
+ } else {
+ QAction *insertPageAction = popup->addAction(tr("Insert Page"));
+ connect(insertPageAction, SIGNAL(triggered()), this, SLOT(addPage()));
}
- QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
- insertPageMenu->addAction(m_actionInsertPageAfter);
- insertPageMenu->addAction(m_actionInsertPage);
popup->addAction(m_actionNextPage);
m_actionNextPage->setEnabled(hasSeveralPages);
popup->addAction(m_actionPreviousPage);
diff --git a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
index 22833b3..eb4dfa2 100644
--- a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -368,7 +368,7 @@ QMenu *QTabWidgetEventFilter::addContextMenuActions(QMenu *popup)
{
QMenu *pageMenu = 0;
const int count = m_tabWidget->count();
- m_actionDeletePage->setEnabled(count > 1);
+ m_actionDeletePage->setEnabled(count);
if (count) {
const int currentIndex = m_tabWidget->currentIndex();
const QString pageSubMenuLabel = tr("Page %1 of %2").arg(currentIndex + 1).arg(count);
@@ -381,11 +381,13 @@ QMenu *QTabWidgetEventFilter::addContextMenuActions(QMenu *popup)
qdesigner_internal::PromotionTaskMenu::SuppressGlobalEdit,
pageMenu);
}
+ QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
+ insertPageMenu->addAction(m_actionInsertPageAfter);
+ insertPageMenu->addAction(m_actionInsertPage);
+ } else {
+ QAction *insertPageAction = popup->addAction(tr("Insert Page"));
+ connect(insertPageAction, SIGNAL(triggered()), this, SLOT(addPage()));
}
-
- QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
- insertPageMenu->addAction(m_actionInsertPageAfter);
- insertPageMenu->addAction(m_actionInsertPage);
popup->addSeparator();
return pageMenu;
}
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 234b0b1..890b252 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -101,6 +101,7 @@ RESOURCES += linguist.qrc
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/linguist_ja.ts \
$$[QT_INSTALL_TRANSLATIONS]/linguist_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/linguist_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/linguist_untranslated.ts \
$$[QT_INSTALL_TRANSLATIONS]/linguist_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/linguist_zh_TW.ts \
diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph
index 0b06cea..629c60b 100644
--- a/tools/linguist/phrasebooks/russian.qph
+++ b/tools/linguist/phrasebooks/russian.qph
@@ -1,4 +1,5 @@
-<!DOCTYPE QPH><QPH language="ru">
+<!DOCTYPE QPH>
+<QPH language="ru">
<phrase>
<source>About</source>
<target>О программе</target>
@@ -68,10 +69,6 @@
<target>авто-прокрутка</target>
</phrase>
<phrase>
- <source>Back</source>
- <target>Назад</target>
-</phrase>
-<phrase>
<source>boxed edit</source>
<target>окно редактирования</target>
</phrase>
@@ -117,11 +114,11 @@
</phrase>
<phrase>
<source>Close button</source>
- <target>кнопка закрытия</target>
+ <target>Кнопка закрытия</target>
</phrase>
<phrase>
<source>collapse</source>
- <target>крах</target>
+ <target>свернуть</target>
</phrase>
<phrase>
<source>column heading</source>
@@ -257,7 +254,7 @@
</phrase>
<phrase>
<source>expand</source>
- <target>расширять</target>
+ <target>развернуть</target>
</phrase>
<phrase>
<source>Explore</source>
@@ -285,15 +282,15 @@
</phrase>
<phrase>
<source>Find Next</source>
- <target>Продолжить поиск</target>
+ <target>Найти далее</target>
</phrase>
<phrase>
<source>Find What</source>
- <target>Поиск</target>
+ <target>Искать</target>
</phrase>
<phrase>
<source>folder</source>
- <target>каталог</target>
+ <target>папка</target>
</phrase>
<phrase>
<source>font</source>
@@ -385,7 +382,7 @@
</phrase>
<phrase>
<source>landscape</source>
- <target>альбом</target>
+ <target>альбомная</target>
</phrase>
<phrase>
<source>link</source>
@@ -513,7 +510,7 @@
</phrase>
<phrase>
<source>OK</source>
- <target>OK</target>
+ <target>Готово</target>
</phrase>
<phrase>
<source>OLE</source>
@@ -525,7 +522,7 @@
</phrase>
<phrase>
<source>OLE embedded object</source>
- <target>внедренный OLE-объект</target>
+ <target>внедрённый OLE-объект</target>
</phrase>
<phrase>
<source>OLE linked object</source>
@@ -533,7 +530,7 @@
</phrase>
<phrase>
<source>OLE nondefault drag and drop</source>
- <target>предопределенный OLE-механизм</target>
+ <target>предопределённый OLE-механизм</target>
</phrase>
<phrase>
<source>Open</source>
@@ -557,7 +554,7 @@
</phrase>
<phrase>
<source>Page Setup</source>
- <target>шаг установки</target>
+ <target>Параметры страницы</target>
</phrase>
<phrase>
<source>palette window</source>
@@ -625,11 +622,11 @@
</phrase>
<phrase>
<source>portrait</source>
- <target>портрет</target>
+ <target>книжная</target>
</phrase>
<phrase>
<source>press</source>
- <target>нажимать</target>
+ <target>нажать</target>
</phrase>
<phrase>
<source>primary container</source>
@@ -757,7 +754,7 @@
</phrase>
<phrase>
<source>secondary window</source>
- <target>подчиненное окно</target>
+ <target>подчинённое окно</target>
</phrase>
<phrase>
<source>select</source>
@@ -765,7 +762,7 @@
</phrase>
<phrase>
<source>Select All</source>
- <target>Выделить все</target>
+ <target>Выделить всё</target>
</phrase>
<phrase>
<source>selection</source>
@@ -861,11 +858,11 @@
</phrase>
<phrase>
<source>status bar</source>
- <target>статусная строка</target>
+ <target>строка состояния</target>
</phrase>
<phrase>
<source>Stop</source>
- <target>Стоп</target>
+ <target>Остановить</target>
</phrase>
<phrase>
<source>tab control</source>
@@ -897,7 +894,7 @@
</phrase>
<phrase>
<source>toggle key</source>
- <target>кнопка-выключатель</target>
+ <target>кнопка-переключатель</target>
</phrase>
<phrase>
<source>toolbar</source>
@@ -979,4 +976,88 @@
<source>Yes</source>
<target>Да</target>
</phrase>
+<phrase>
+ <source>No</source>
+ <target>Нет</target>
+</phrase>
+<phrase>
+ <source>Options</source>
+ <target>Параметры</target>
+</phrase>
+<phrase>
+ <source>directory</source>
+ <target>каталог</target>
+</phrase>
+<phrase>
+ <source>Finish</source>
+ <target>Завершить</target>
+</phrase>
+<phrase>
+ <source>Continue</source>
+ <target>Продолжить</target>
+</phrase>
+<phrase>
+ <source>advanced</source>
+ <target>расширенный</target>
+</phrase>
+<phrase>
+ <source>layout</source>
+ <target>компоновка</target>
+</phrase>
+<phrase>
+ <source>layout</source>
+ <target>компоновщик</target>
+</phrase>
+<phrase>
+ <source>plugin</source>
+ <target>модуль</target>
+</phrase>
+<phrase>
+ <source>script</source>
+ <target>сценарий</target>
+</phrase>
+<phrase>
+ <source>spacer</source>
+ <target>разделитель</target>
+</phrase>
+<phrase>
+ <source>tabbar</source>
+ <target>панель вкладок</target>
+</phrase>
+<phrase>
+ <source>whitespace</source>
+ <target>символ пробела</target>
+</phrase>
+<phrase>
+ <source>Forward</source>
+ <target>Вперёд</target>
+</phrase>
+<phrase>
+ <source>Back</source>
+ <target>Назад</target>
+</phrase>
+<phrase>
+ <source>Search wrapped</source>
+ <target>Поиск с начала</target>
+</phrase>
+<phrase>
+ <source>OK</source>
+ <target>Выбрать</target>
+</phrase>
+<phrase>
+ <source>OK</source>
+ <target>Закрыть</target>
+</phrase>
+<phrase>
+ <source>Match case</source>
+ <target>С учётом регистра</target>
+</phrase>
+<phrase>
+ <source>Case Sensitive</source>
+ <target>Регистрозависимо</target>
+</phrase>
+<phrase>
+ <source>Whole words</source>
+ <target>Слова полностью</target>
+</phrase>
</QPH>
diff --git a/tools/porting/src/qt3headers0.resource b/tools/porting/src/qt3headers0.resource
index 13be468..8e24385 100644
--- a/tools/porting/src/qt3headers0.resource
+++ b/tools/porting/src/qt3headers0.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers1.resource b/tools/porting/src/qt3headers1.resource
index e06d270..8da4b9a 100644
--- a/tools/porting/src/qt3headers1.resource
+++ b/tools/porting/src/qt3headers1.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers2.resource b/tools/porting/src/qt3headers2.resource
index e44c81d..62bdb8e 100644
--- a/tools/porting/src/qt3headers2.resource
+++ b/tools/porting/src/qt3headers2.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers3.resource b/tools/porting/src/qt3headers3.resource
index 6d259f2..6a096e8 100644
--- a/tools/porting/src/qt3headers3.resource
+++ b/tools/porting/src/qt3headers3.resource
Binary files differ
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index c14b46d..8ef4f0b 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1850,8 +1850,10 @@ HtmlGenerator::generateAnnotatedList(const Node *relative,
out() << "</table></p>\n";
}
-void HtmlGenerator::generateCompactList(const Node *relative, CodeMarker *marker,
- const QMap<QString, const Node *> &classMap)
+void
+HtmlGenerator::generateCompactList(const Node *relative,
+ CodeMarker *marker,
+ const QMap<QString,const Node*> &classMap)
{
const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_'
const int NumColumns = 4; // number of columns in the result
@@ -1994,28 +1996,29 @@ void HtmlGenerator::generateCompactList(const Node *relative, CodeMarker *marker
<< "&nbsp;</b>";
}
out() << "</td>\n";
-
- // bad loop
- QMap<QString, const Node *>::Iterator it;
- it = paragraph[currentParagraphNo[i]].begin();
- for (j = 0; j < currentOffsetInParagraph[i]; j++)
- ++it;
-
- out() << "<td>";
- // Previously, we used generateFullName() for this, but we
- // require some special formatting.
- out() << "<a href=\""
- << linkForNode(it.value(), relative)
- << "\">";
- QStringList pieces = fullName(it.value(), relative, marker).split("::");
- out() << protect(pieces.last());
- out() << "</a>";
- if (pieces.size() > 1) {
- out() << " (";
- generateFullName(it.value()->parent(), relative, marker);
- out() << ")";
- }
- out() << "</td>\n";
+
+ if (!paragraphName[currentParagraphNo[i]].isEmpty()) {
+ QMap<QString, const Node *>::Iterator it;
+ it = paragraph[currentParagraphNo[i]].begin();
+ for (j = 0; j < currentOffsetInParagraph[i]; j++)
+ ++it;
+
+ out() << "<td>";
+ // Previously, we used generateFullName() for this, but we
+ // require some special formatting.
+ out() << "<a href=\""
+ << linkForNode(it.value(), relative)
+ << "\">";
+ QStringList pieces = fullName(it.value(), relative, marker).split("::");
+ out() << protect(pieces.last());
+ out() << "</a>";
+ if (pieces.size() > 1) {
+ out() << " (";
+ generateFullName(it.value()->parent(), relative, marker);
+ out() << ")";
+ }
+ out() << "</td>\n";
+ }
currentOffset[i]++;
currentOffsetInParagraph[i]++;
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
index eabaec6..a59f790 100644
--- a/tools/qtconfig/mainwindow.cpp
+++ b/tools/qtconfig/mainwindow.cpp
@@ -829,7 +829,7 @@ void MainWindow::removeSubstitute()
int item = sublistbox->currentItem();
QStringList subs = QFont::substitutes(familysubcombo->currentText());
- subs.remove(subs.at(sublistbox->currentItem()));
+ subs.removeAt(sublistbox->currentItem());
sublistbox->clear();
sublistbox->insertStringList(subs);
if (uint(item) > sublistbox->count())
@@ -909,7 +909,7 @@ void MainWindow::removeFontpath()
return;
int item = fontpathlistbox->currentItem();
- fontpaths.remove(fontpaths.at(fontpathlistbox->currentItem()));
+ fontpaths.removeAt(fontpathlistbox->currentItem());
fontpathlistbox->clear();
fontpathlistbox->insertStringList(fontpaths);
if (uint(item) > fontpathlistbox->count())
diff --git a/translations/assistant_adp_ru.ts b/translations/assistant_adp_ru.ts
new file mode 100644
index 0000000..a587a91
--- /dev/null
+++ b/translations/assistant_adp_ru.ts
@@ -0,0 +1,780 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name>AssistantServer</name>
+ <message>
+ <source>Failed to bind to port %1</source>
+ <translation>Не удалось открыть порт %1</translation>
+ </message>
+ <message>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+</context>
+<context>
+ <name>FontPanel</name>
+ <message>
+ <source>&amp;Family</source>
+ <translation>Се&amp;мейство</translation>
+ </message>
+ <message>
+ <source>&amp;Style</source>
+ <translation>&amp;Стиль</translation>
+ </message>
+ <message>
+ <source>Font</source>
+ <translation>Шрифт</translation>
+ </message>
+ <message>
+ <source>&amp;Writing system</source>
+ <translation>Система &amp;письма</translation>
+ </message>
+ <message>
+ <source>&amp;Point size</source>
+ <translation>&amp;Размер в пикселях</translation>
+ </message>
+</context>
+<context>
+ <name>FontSettingsDialog</name>
+ <message>
+ <source>Application</source>
+ <translation>Приложение</translation>
+ </message>
+ <message>
+ <source>Browser</source>
+ <translation>Обозреватель</translation>
+ </message>
+ <message>
+ <source>Font settings for:</source>
+ <translation>Настройки шрифта для:</translation>
+ </message>
+ <message>
+ <source>Use custom settings</source>
+ <translation>Использование индивидуальных настроек</translation>
+ </message>
+ <message>
+ <source>Font Settings</source>
+ <translation>Настройки шрифта</translation>
+ </message>
+</context>
+<context>
+ <name>HelpDialog</name>
+ <message>
+ <source>&amp;Index</source>
+ <translation>&amp;Указатель</translation>
+ </message>
+ <message>
+ <source>&amp;Look For:</source>
+ <translation>&amp;Искать:</translation>
+ </message>
+ <message>
+ <source>&amp;New</source>
+ <translation>&amp;Создать</translation>
+ </message>
+ <message>
+ <source>&amp;Search</source>
+ <translation>&amp;Поиск</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Ввод слова.&lt;/b&gt;&lt;p&gt;В список попадет то, что лучше соответствует введенной строке.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Ввод одного или более слов для поиска.&lt;/b&gt;&lt;p&gt;Сюда следует ввести одно или несколько слов, которые требуется найти. Слова могут содержкать символы-заменители (*). Если требуется найти словосочетание, то его нужно заключить в кавычки.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Найденные документы&lt;/b&gt;&lt;p&gt;В этом списке представлены все найденные при последнем поиске документы. Документы упорядочены по релевантности, т.е. чем выше, тем чаще в нём встречаются указанные слова.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Статьи справки распределённые по разделам.&lt;/b&gt;&lt;p&gt;Дважды кликните по одному из пунктов, чтобы увидеть какие статьи содержатся в данном разделе. Для открытия статьи просто дважды щелкните на ней.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Справка&lt;/b&gt;&lt;p&gt;Выберите необходимую статью справки из списка разделов или воспользуйтесь поиском по предметному указателю.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Список доступных статей справки.&lt;/b&gt;&lt;p&gt;Дважды щёлкните на пункте для открытия страницы помощи. Если найдено более одной, то потребуется выбрать желаемую страницу.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <source>Add new bookmark</source>
+ <translation>Добавить новую закладку</translation>
+ </message>
+ <message>
+ <source>Add the currently displayed page as a new bookmark.</source>
+ <translation>Добавление текущей открытой страницы в закладки.</translation>
+ </message>
+ <message>
+ <source>Cannot open the index file %1</source>
+ <translation>Не удаётся открыть файл индекса %1</translation>
+ </message>
+ <message>
+ <source>Con&amp;tents</source>
+ <translation>Содер&amp;жание</translation>
+ </message>
+ <message>
+ <source>Delete bookmark</source>
+ <translation>Удалить закладку</translation>
+ </message>
+ <message>
+ <source>Delete the selected bookmark.</source>
+ <translation>Удаление выбранной закладки.</translation>
+ </message>
+ <message>
+ <source>Display the help page for the full text search.</source>
+ <translation>Открытие справки по полнотекстовому поиску.</translation>
+ </message>
+ <message>
+ <source>Display the help page.</source>
+ <translation>Открыть страницу справки.</translation>
+ </message>
+ <message>
+ <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
+ <translation>Здесь отображается список тем, распределенных по разделам, указатель или закладки. Последняя вкладка содержит полнотекстовый поиск.</translation>
+ </message>
+ <message>
+ <source>Displays the list of bookmarks.</source>
+ <translation>Отображает список закладок.</translation>
+ </message>
+ <message>
+ <source>Documentation file %1 does not exist!
+Skipping file.</source>
+ <translation>Файл документации %1 не существует!
+Пропущен.</translation>
+ </message>
+ <message>
+ <source>Documentation file %1 is not compatible!
+Skipping file.</source>
+ <translation>Файл документации %1 не совместим!
+Пропущен.</translation>
+ </message>
+ <message>
+ <source>Done</source>
+ <translation>Готово</translation>
+ </message>
+ <message>
+ <source>Enter keyword</source>
+ <translation>Введите ключевое слово</translation>
+ </message>
+ <message>
+ <source>Enter searchword(s).</source>
+ <translation>Введите одно или более слов для поиска.</translation>
+ </message>
+ <message>
+ <source>Failed to load keyword index file
+Assistant will not work!</source>
+ <translation>Не удалось загрузить файл индекса ключевых слов
+Assistant не будет работать!</translation>
+ </message>
+ <message>
+ <source>Failed to save fulltext search index
+Assistant will not work!</source>
+ <translation>Не удалось сохранить индекс полнотекстового поиска
+Assistant не будет работать!</translation>
+ </message>
+ <message>
+ <source>Found &amp;Documents:</source>
+ <translation>Найденные &amp;документы:</translation>
+ </message>
+ <message>
+ <source>Full Text Search</source>
+ <translation>Полнотекстовый поиск</translation>
+ </message>
+ <message>
+ <source>He&amp;lp</source>
+ <translation>&amp;Справка</translation>
+ </message>
+ <message>
+ <source>Help</source>
+ <translation>Справка</translation>
+ </message>
+ <message>
+ <source>Indexing files...</source>
+ <translation>Индексирование файлов...</translation>
+ </message>
+ <message>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+ <message>
+ <source>Open Link in New Window</source>
+ <translation>Открыть ссылку в новом окне</translation>
+ </message>
+ <message>
+ <source>Parse Error</source>
+ <translation>Ошибка обработки</translation>
+ </message>
+ <message>
+ <source>Prepare...</source>
+ <translation>Подготовка...</translation>
+ </message>
+ <message>
+ <source>Preparing...</source>
+ <translation>Подготовка...</translation>
+ </message>
+ <message>
+ <source>Pressing this button starts the search.</source>
+ <translation>Нажатие на эту кнопку запустит процесс поиска.</translation>
+ </message>
+ <message>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <source>Reading dictionary...</source>
+ <translation>Чтение каталога...</translation>
+ </message>
+ <message>
+ <source>Searching f&amp;or:</source>
+ <translation>&amp;Искать:</translation>
+ </message>
+ <message>
+ <source>Start searching.</source>
+ <translation>Начать поиск.</translation>
+ </message>
+ <message>
+ <source>The closing quotation mark is missing.</source>
+ <translation>Пропущена закрывающая кавычка.</translation>
+ </message>
+ <message>
+ <source>Using a wildcard within phrases is not allowed.</source>
+ <translation>Использование символов-заменителей внутри фраз не допустимо.</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Предупреждение</translation>
+ </message>
+ <message>
+ <source>column 1</source>
+ <translation>столбец 1</translation>
+ </message>
+ <message>
+ <source>Open Link in Current Tab</source>
+ <translation>Открыть ссылку в текущей вкладке</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n document(s) found.</source>
+ <translation>
+ <numerusform>Найден %n документ.</numerusform>
+ <numerusform>Найдено %n документа.</numerusform>
+ <numerusform>Найдено %n документов.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <source>&amp;Bookmarks</source>
+ <translation>&amp;Закладки</translation>
+ </message>
+ <message>
+ <source>&amp;Delete</source>
+ <translation>&amp;Удалить</translation>
+ </message>
+</context>
+<context>
+ <name>HelpWindow</name>
+ <message>
+ <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
+ <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Страница не найдена&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Link Location</source>
+ <translation>Копировать &amp;адрес ссылки</translation>
+ </message>
+ <message>
+ <source>Error...</source>
+ <translation>Ошибка...</translation>
+ </message>
+ <message>
+ <source>Failed to open link: &apos;%1&apos;</source>
+ <translation>Не удалось открыть ссылку: &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <source>Help</source>
+ <translation>Справка</translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation>Закрыть</translation>
+ </message>
+ <message>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+ <message>
+ <source>Open Link in New Window Shift+LMB</source>
+ <translation>Открыть ссылку в новом окне Shift+LMB</translation>
+ </message>
+ <message>
+ <source>Unable to launch web browser.
+</source>
+ <translation>Невозможно запустить вэб-браузер.
+</translation>
+ </message>
+</context>
+<context>
+ <name>Index</name>
+ <message>
+ <source>Untitled</source>
+ <translation>Неозаглавлено</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
+ <translation>&quot;Что это?&quot; - контекстная справка.</translation>
+ </message>
+ <message>
+ <source>&amp;Add Bookmark</source>
+ <translation>&amp;Добавление закладки</translation>
+ </message>
+ <message>
+ <source>&amp;Close</source>
+ <translation>&amp;Закрыть</translation>
+ </message>
+ <message>
+ <source>&amp;Copy</source>
+ <translation>&amp;Копировать</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Правка</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Файл</translation>
+ </message>
+ <message>
+ <source>&amp;Find in Text...</source>
+ <translation>П&amp;оиск по тексту...</translation>
+ </message>
+ <message>
+ <source>&amp;Go</source>
+ <translation>&amp;Перейти</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Справка</translation>
+ </message>
+ <message>
+ <source>&amp;Home</source>
+ <translation>&amp;Домой</translation>
+ </message>
+ <message>
+ <source>&amp;Next</source>
+ <translation>&amp;Вперёд</translation>
+ </message>
+ <message>
+ <source>&amp;Previous</source>
+ <translation>&amp;Назад</translation>
+ </message>
+ <message>
+ <source>&amp;Print...</source>
+ <translation>&amp;Печать...</translation>
+ </message>
+ <message>
+ <source>&amp;View</source>
+ <translation>&amp;Вид</translation>
+ </message>
+ <message>
+ <source>&amp;Window</source>
+ <translation>&amp;Окно</translation>
+ </message>
+ <message>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <source>About Qt</source>
+ <translation>О Qt</translation>
+ </message>
+ <message>
+ <source>About Qt Assistant</source>
+ <translation>О Qt Assistant</translation>
+ </message>
+ <message>
+ <source>Add Tab</source>
+ <translation>Добавить вкладку</translation>
+ </message>
+ <message>
+ <source>Add the currently displayed page as a new bookmark.</source>
+ <translation>Добавление текущей открытой страницы в закладки.</translation>
+ </message>
+ <message>
+ <source>Boo&amp;kmarks</source>
+ <translation>&amp;Закладки</translation>
+ </message>
+ <message>
+ <source>Cannot open file for writing!</source>
+ <translation>Не удается открыть файл для записи!</translation>
+ </message>
+ <message>
+ <source>Close Tab</source>
+ <translation>Закрыть вкладку</translation>
+ </message>
+ <message>
+ <source>Close the current window.</source>
+ <translation>Закрыть текущее окно.</translation>
+ </message>
+ <message>
+ <source>Display further information about Qt Assistant.</source>
+ <translation>Показать дополнительную информацию о Qt Assistant.</translation>
+ </message>
+ <message>
+ <source>Displays the main page of a specific documentation set.</source>
+ <translation>Открывает главную страницу выбранного набора документации.</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Вы&amp;ход</translation>
+ </message>
+ <message>
+ <source>Failed to open about application contents in file: &apos;%1&apos;</source>
+ <translation>Не удалось получить информацию о приложении из файла: &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <source>Find &amp;Next</source>
+ <translation>Продолжить п&amp;оиск</translation>
+ </message>
+ <message>
+ <source>Find &amp;Previous</source>
+ <translation>Найти &amp;предыдущее</translation>
+ </message>
+ <message>
+ <source>Font Settings...</source>
+ <translation>Настройки шрифта...</translation>
+ </message>
+ <message>
+ <source>Go</source>
+ <translation>Перейти</translation>
+ </message>
+ <message>
+ <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
+ <translation>Перейти на домашнюю страницу. Домашная страница Qt Assistant - Справочная документация по Qt.</translation>
+ </message>
+ <message>
+ <source>Go to the next page.</source>
+ <translation>Переход на следующую страницу.</translation>
+ </message>
+ <message>
+ <source>Initializing Qt Assistant...</source>
+ <translation>Инициализация Qt Assistant...</translation>
+ </message>
+ <message>
+ <source>Minimize</source>
+ <translation>Свернуть</translation>
+ </message>
+ <message>
+ <source>New Window</source>
+ <translation>Новое окно</translation>
+ </message>
+ <message>
+ <source>Next Tab</source>
+ <translation>Следующая вкладка</translation>
+ </message>
+ <message>
+ <source>Open a new window.</source>
+ <translation>Открыть новое окно.</translation>
+ </message>
+ <message>
+ <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
+ <translation>Открыть окно поиска. Qt Assistant произведёт поиск введённого текста на текущей открытой странице.</translation>
+ </message>
+ <message>
+ <source>Previous Tab</source>
+ <translation>Предыдущая вкладка</translation>
+ </message>
+ <message>
+ <source>Print the currently displayed page.</source>
+ <translation>Печать текущей открытой страницы.</translation>
+ </message>
+ <message>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <source>Qt Assistant Manual</source>
+ <translation>Руководство по Qt Assistant</translation>
+ </message>
+ <message>
+ <source>Qt Assistant by Nokia</source>
+ <translation>Qt Assistant от Nokia</translation>
+ </message>
+ <message>
+ <source>Quit Qt Assistant.</source>
+ <translation>Выйти из Qt Assistant.</translation>
+ </message>
+ <message>
+ <source>Save Page</source>
+ <translation>Сохранить страницу</translation>
+ </message>
+ <message>
+ <source>Save Page As...</source>
+ <translation>Сохранить страницу как...</translation>
+ </message>
+ <message>
+ <source>Select the page in contents tab.</source>
+ <translation>Выбор страницы в оглавлении.</translation>
+ </message>
+ <message>
+ <source>Sidebar</source>
+ <translation>Боковая панель</translation>
+ </message>
+ <message>
+ <source>Sync with Table of Contents</source>
+ <translation>Синхронизировать с оглавлением</translation>
+ </message>
+ <message>
+ <source>Toolbar</source>
+ <translation>Панель инструментов</translation>
+ </message>
+ <message>
+ <source>Views</source>
+ <translation>Виды</translation>
+ </message>
+ <message>
+ <source>What&apos;s This?</source>
+ <translation>Что это?</translation>
+ </message>
+ <message>
+ <source>Zoom &amp;in</source>
+ <translation>У&amp;величить</translation>
+ </message>
+ <message>
+ <source>Zoom &amp;out</source>
+ <translation>У&amp;меньшить</translation>
+ </message>
+ <message>
+ <source>Zoom in on the document, i.e. increase the font size.</source>
+ <translation>Увеличение масштаба документа, т.е. увеличение размера шрифта.</translation>
+ </message>
+ <message>
+ <source>Zoom out on the document, i.e. decrease the font size.</source>
+ <translation>Уменьшение масштаба документа, т.е. уменьшение размера шрифта.</translation>
+ </message>
+ <message>
+ <source>Ctrl+M</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>SHIFT+CTRL+=</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+T</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+I</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+B</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+S</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+]</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+[</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+P</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Copy the selected text to the clipboard.</source>
+ <translation>Скопировать выделенный текст в буфер обмена.</translation>
+ </message>
+ <message>
+ <source>Ctrl+C</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+F</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>F3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Shift+F3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Home</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Go to the previous page.</source>
+ <translation>Переход на предыдущую страницу.</translation>
+ </message>
+ <message>
+ <source>Alt+Left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Alt+Right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl++</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+-</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+N</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+W</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Shift+F1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Alt+N</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Alt+Right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Alt+Left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Alt+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>F1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ctrl+Alt+S</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <source>Qt Assistant by Nokia</source>
+ <translation>Qt Assistant от Nokia</translation>
+ </message>
+</context>
+<context>
+ <name>TabbedBrowser</name>
+ <message>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Поиск с начала</translation>
+ </message>
+ <message>
+ <source>Add page</source>
+ <translation>Добавить страницу</translation>
+ </message>
+ <message>
+ <source>Case Sensitive</source>
+ <translation>Регистрозависимо</translation>
+ </message>
+ <message>
+ <source>Close Other Tabs</source>
+ <translation>Закрыть остальные вкладки</translation>
+ </message>
+ <message>
+ <source>Close Tab</source>
+ <translation>Закрыть вкладку</translation>
+ </message>
+ <message>
+ <source>Close page</source>
+ <translation>Закрыть страницу</translation>
+ </message>
+ <message>
+ <source>New Tab</source>
+ <translation>Новая вкладка</translation>
+ </message>
+ <message>
+ <source>Next</source>
+ <translation>Следующий</translation>
+ </message>
+ <message>
+ <source>Previous</source>
+ <translation>Предыдущий</translation>
+ </message>
+ <message>
+ <source>Untitled</source>
+ <translation>Безымянный</translation>
+ </message>
+ <message>
+ <source>Whole words</source>
+ <translation>Слова полностью</translation>
+ </message>
+ <message>
+ <source>TabbedBrowser</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TopicChooser</name>
+ <message>
+ <source>&amp;Close</source>
+ <translation>&amp;Закрыть</translation>
+ </message>
+ <message>
+ <source>&amp;Display</source>
+ <translation>&amp;Показать</translation>
+ </message>
+ <message>
+ <source>&amp;Topics</source>
+ <translation>&amp;Статьи</translation>
+ </message>
+ <message>
+ <source>Choose Topic</source>
+ <translation>Выбор статьи</translation>
+ </message>
+ <message>
+ <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
+ <translation>Выберите статью для &lt;b&gt;%1&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Close the Dialog.</source>
+ <translation>Закрытие окна.</translation>
+ </message>
+ <message>
+ <source>Displays a list of available help topics for the keyword.</source>
+ <translation>Показывает список доступных статей справки, соответствующих ключевому слову.</translation>
+ </message>
+ <message>
+ <source>Open the topic selected in the list.</source>
+ <translation>Открытие выбранной в списке темы.</translation>
+ </message>
+ <message>
+ <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
+ <translation>Выберите статью из списка и нажмите на кнопку &lt;b&gt;Показать&lt;/b&gt; для открытия онлайн справки.</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/assistant_ru.ts b/translations/assistant_ru.ts
new file mode 100644
index 0000000..32aa739
--- /dev/null
+++ b/translations/assistant_ru.ts
@@ -0,0 +1,1063 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name>AboutDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Закрыть</translation>
+ </message>
+</context>
+<context>
+ <name>AboutLabel</name>
+ <message>
+ <location line="-14"/>
+ <source>Warning</source>
+ <translation>Предупреждение</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Unable to launch external application.
+</source>
+ <translation>Невозможно запустить внешнее приложение.
+</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>OK</source>
+ <translation>Закрыть</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui" line="+19"/>
+ <source>Add Bookmark</source>
+ <translation>Добавление закладки</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Bookmark:</source>
+ <translation>Закладка:</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Add in Folder:</source>
+ <translation>Добавить в папку:</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>+</source>
+ <translation>+</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>New Folder</source>
+ <translation>Новая папка</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+185"/>
+ <location line="+18"/>
+ <location line="+36"/>
+ <location line="+24"/>
+ <location line="+32"/>
+ <source>Bookmarks</source>
+ <translation>Закладки</translation>
+ </message>
+ <message>
+ <location line="-69"/>
+ <source>Delete Folder</source>
+ <translation>Удалить папку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Folder</source>
+ <translation>Переименовать папку</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkManager</name>
+ <message>
+ <location line="+449"/>
+ <source>Bookmarks</source>
+ <translation>Закладки</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Remove</source>
+ <translation>Удалить</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>You are going to delete a Folder, this will also&lt;br&gt;remove it&apos;s content. Are you sure to continue?</source>
+ <translation>Удаление папки приведёт к удалению её содержимого.&lt;br&gt;Желаете продолжить?</translation>
+ </message>
+ <message>
+ <location line="+109"/>
+ <location line="+9"/>
+ <source>New Folder</source>
+ <translation>Новая папка</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkWidget</name>
+ <message>
+ <location line="-436"/>
+ <source>Delete Folder</source>
+ <translation>Удалить папку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Folder</source>
+ <translation>Переименовать папку</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Show Bookmark</source>
+ <translation>Открыть закладку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show Bookmark in New Tab</source>
+ <translation>Открыть закладку в новой вкладке</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete Bookmark</source>
+ <translation>Удалить закладку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Bookmark</source>
+ <translation>Переименовать закладку</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Filter:</source>
+ <translation>Фильтр:</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Add</source>
+ <translation>Добавить</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Remove</source>
+ <translation>Удалить</translation>
+ </message>
+</context>
+<context>
+ <name>CentralWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+237"/>
+ <source>Add new page</source>
+ <translation>Открыть новую страницу</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Close current page</source>
+ <translation>Закрыть текущую страницу</translation>
+ </message>
+ <message>
+ <location line="+284"/>
+ <source>Print Document</source>
+ <translation>Печать документа</translation>
+ </message>
+ <message>
+ <location line="+148"/>
+ <location line="+2"/>
+ <source>unknown</source>
+ <translation>безымянная вкладка</translation>
+ </message>
+ <message>
+ <location line="+91"/>
+ <source>Add New Page</source>
+ <translation>Открыть новую страницу</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close This Page</source>
+ <translation>Закрыть данную страницу</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close Other Pages</source>
+ <translation>Закрыть остальные страницы</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Add Bookmark for this Page...</source>
+ <translation>Добавить закладку для этой страницы...</translation>
+ </message>
+ <message>
+ <location line="+255"/>
+ <source>Search</source>
+ <translation>Поиск</translation>
+ </message>
+</context>
+<context>
+ <name>ContentWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+158"/>
+ <source>Open Link</source>
+ <translation>Открыть ссылку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+</context>
+<context>
+ <name>FilterNameDialogClass</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/filternamedialog.ui" line="+13"/>
+ <source>Add Filter Name</source>
+ <translation>Добавление фильтра</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Filter Name:</source>
+ <translation>Название фильтра:</translation>
+ </message>
+</context>
+<context>
+ <name>FindWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-925"/>
+ <source>Previous</source>
+ <translation>Предыдущее совпадение</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Next</source>
+ <translation>Следующее совпадение</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Case Sensitive</source>
+ <translation>Регистрозависимо</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Whole words</source>
+ <translation>Слова полностью</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Поиск с начала</translation>
+ </message>
+</context>
+<context>
+ <name>FontPanel</name>
+ <message>
+ <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
+ <source>Font</source>
+ <translation>Шрифт</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Writing system</source>
+ <translation>Система &amp;письма</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Family</source>
+ <translation>Се&amp;мейство</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Style</source>
+ <translation>&amp;Стиль</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Point size</source>
+ <translation>&amp;Размер в точках</translation>
+ </message>
+</context>
+<context>
+ <name>HelpViewer</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+284"/>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+ <message>
+ <location line="+147"/>
+ <source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
+ <translation>&lt;title&gt;Ошибка 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Страница не найдена&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>Help</source>
+ <translation>Справка</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Unable to launch external application.
+</source>
+ <translation>Невозможно запустить внешнее приложение.
+</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>OK</source>
+ <translation>Закрыть</translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>Копировать &amp;адрес ссылки</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open Link in New Tab Ctrl+LMB</source>
+ <translation>Открыть ссылку в новой вкладке Ctrl+LMB</translation>
+ </message>
+</context>
+<context>
+ <name>IndexWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/>
+ <source>&amp;Look for:</source>
+ <translation>&amp;Искать:</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Open Link</source>
+ <translation>Открыть ссылку</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+</context>
+<context>
+ <name>InstallDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+75"/>
+ <location filename="../tools/assistant/tools/assistant/installdialog.ui" line="+13"/>
+ <source>Install Documentation</source>
+ <translation>Установка документации</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Downloading documentation info...</source>
+ <translation>Загрузка информации о документации...</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Download canceled.</source>
+ <translation>Загрузка отменена.</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <location line="+78"/>
+ <location line="+27"/>
+ <source>Done.</source>
+ <translation>Готово.</translation>
+ </message>
+ <message>
+ <location line="-90"/>
+ <source>The file %1 already exists. Do you want to overwrite it?</source>
+ <translation>Файл %1 уже существует. Желаете перезаписать его?</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unable to save the file %1: %2.</source>
+ <translation>Невозможно сохранить файл %1: %2.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Downloading %1...</source>
+ <translation>Загрузка %1...</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+42"/>
+ <location line="+38"/>
+ <source>Download failed: %1.</source>
+ <translation>Загрузка не удалась: %1.</translation>
+ </message>
+ <message>
+ <location line="-70"/>
+ <source>Documentation info file is corrupt!</source>
+ <translation>Файл информации о документации повреждён!</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Download failed: Downloaded file is corrupted.</source>
+ <translation>Загрузка не удалась: загруженный файл повреждён.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Installing documentation %1...</source>
+ <translation>Установка документации %1...</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Error while installing documentation:
+%1</source>
+ <translation>При установке документации возникла ошибка:
+%1</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/installdialog.ui" line="+6"/>
+ <source>Available Documentation:</source>
+ <translation>Доступная документация:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Install</source>
+ <translation>Установить</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Cancel</source>
+ <translation>Отмена</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Close</source>
+ <translation>Закрыть</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Installation Path:</source>
+ <translation>Путь установки:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+108"/>
+ <location line="+354"/>
+ <source>Index</source>
+ <translation>Индекс</translation>
+ </message>
+ <message>
+ <location line="-348"/>
+ <location line="+346"/>
+ <source>Contents</source>
+ <translation>Содержание</translation>
+ </message>
+ <message>
+ <location line="-341"/>
+ <location line="+345"/>
+ <source>Bookmarks</source>
+ <translation>Закладки</translation>
+ </message>
+ <message>
+ <location line="-333"/>
+ <location line="+208"/>
+ <location line="+476"/>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <location line="-508"/>
+ <location line="+5"/>
+ <source>Unfiltered</source>
+ <translation>Без фильтрации</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Looking for Qt Documentation...</source>
+ <translation type="unfinished">Поиск по документации Qt...</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>&amp;File</source>
+ <translation>&amp;Файл</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Page Set&amp;up...</source>
+ <translation>Параметры &amp;страницы...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Print Preview...</source>
+ <translation>Предпросмотр печати...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Print...</source>
+ <translation>&amp;Печать...</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>New &amp;Tab</source>
+ <translation>Новая &amp;вкладка</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Close Tab</source>
+ <translation>&amp;Закрыть вкладку</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Quit</source>
+ <translation>В&amp;ыход</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CTRL+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Edit</source>
+ <translation>&amp;Правка</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Copy selected Text</source>
+ <translation>&amp;Копировать выделенный текст</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&amp;Find in Text...</source>
+ <translation>П&amp;оиск в тексте...</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Find &amp;Next</source>
+ <translation>Найти &amp;следующее</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Find &amp;Previous</source>
+ <translation>Найти &amp;предыдущее</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Preferences...</source>
+ <translation>Настройки...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;View</source>
+ <translation>&amp;Вид</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom &amp;in</source>
+ <translation>У&amp;величить</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Zoom &amp;out</source>
+ <translation>У&amp;меньшить</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Normal &amp;Size</source>
+ <translation>Нормальный р&amp;азмер</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+0</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>ALT+C</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>ALT+I</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>ALT+O</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Search</source>
+ <translation>Поиск</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ALT+S</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Go</source>
+ <translation>&amp;Перейти</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Home</source>
+ <translation>&amp;Домой</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ALT+Home</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Back</source>
+ <translation>&amp;Назад</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Forward</source>
+ <translation>&amp;Вперёд</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Sync with Table of Contents</source>
+ <translation>Синхронизировать с содержанием</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Next Page</source>
+ <translation>Следующая страница</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+Alt+Right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Previous Page</source>
+ <translation>Предыдущая страница</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+Alt+Left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Bookmarks</source>
+ <translation>&amp;Закладки</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Bookmark...</source>
+ <translation>Добавить закладку...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CTRL+D</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Справка</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>About...</source>
+ <translation>О программе...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Navigation Toolbar</source>
+ <translation>Панель навигации</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>&amp;Window</source>
+ <translation>&amp;Окно</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Zoom</source>
+ <translation>Масштаб</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Minimize</source>
+ <translation>Свернуть</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+M</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>Toolbars</source>
+ <translation>Панели инструментов</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Filter Toolbar</source>
+ <translation>Панель фильтров</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Filtered by:</source>
+ <translation>Отфильтровано по:</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Address Toolbar</source>
+ <translation>Панель адреса</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Address:</source>
+ <translation>Адрес:</translation>
+ </message>
+ <message>
+ <location line="+114"/>
+ <source>Could not find the associated content item.</source>
+ <translation type="unfinished">Не удалось найти элемент, связанный с содержанием.</translation>
+ </message>
+ <message>
+ <location line="+81"/>
+ <source>About %1</source>
+ <translation type="unfinished">О %1</translation>
+ </message>
+ <message>
+ <location line="+114"/>
+ <source>Updating search index</source>
+ <translation>Обновление поискового индекса</translation>
+ </message>
+</context>
+<context>
+ <name>PreferencesDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+256"/>
+ <location line="+43"/>
+ <source>Add Documentation</source>
+ <translation>Добавить документацию</translation>
+ </message>
+ <message>
+ <location line="-43"/>
+ <source>Qt Compressed Help Files (*.qch)</source>
+ <translation>Сжатые файлы справки Qt (*.qch)</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>The namespace %1 is already registered!</source>
+ <translation>Пространство имён %1 уже зарегистрировано!</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>The specified file is not a valid Qt Help File!</source>
+ <translation>Указанный файл не является корректным файлом справки Qt!</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Remove Documentation</source>
+ <translation>Удалить документацию</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source>
+ <translation>Некоторые открытые в Qt Assistant документы ссылаются на документацию, которую вы пытаетесь удалить. Удаление данной документации приведёт к закрытию таких документов.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Cancel</source>
+ <translation>Отмена</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>OK</source>
+ <translation>Удалить</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <source>Use custom settings</source>
+ <translation>Использовать индивидуальные настройки</translation>
+ </message>
+</context>
+<context>
+ <name>PreferencesDialogClass</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.ui" line="+14"/>
+ <source>Preferences</source>
+ <translation>Настройки</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Fonts</source>
+ <translation>Шрифты</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Font settings:</source>
+ <translation>Настройки шрифта:</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Browser</source>
+ <translation>Обозреватель</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Application</source>
+ <translation>Приложение</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Filters</source>
+ <translation>Фильтры</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Filter:</source>
+ <translation>Фильтр:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Attributes:</source>
+ <translation>Атрибуты:</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Add</source>
+ <translation>Добавить</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+51"/>
+ <source>Remove</source>
+ <translation>Удалить</translation>
+ </message>
+ <message>
+ <location line="-43"/>
+ <source>Documentation</source>
+ <translation>Документация</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Registered Documentation:</source>
+ <translation>Зарегистрированная документация:</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Add...</source>
+ <translation>Добавить...</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Options</source>
+ <translation>Параметры</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Homepage</source>
+ <translation>Домашная страница</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Current Page</source>
+ <translation>Текущая страница</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Restore to default</source>
+ <translation type="unfinished">Восстановить по умолчанию</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+157"/>
+ <location line="+1"/>
+ <source>Bookmark</source>
+ <translation>Закладка</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/>
+ <source>The specified collection file does not exist!</source>
+ <translation type="unfinished">Указанный файл набора отсутствует!</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Missing collection file!</source>
+ <translation type="unfinished">Отсутствует файл набора!</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Invalid URL!</source>
+ <translation>Некорректный URL!</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Missing URL!</source>
+ <translation>Отсутствует URL!</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location line="+19"/>
+ <location line="+19"/>
+ <source>Unknown widget: %1</source>
+ <translation>Неизвестный виджет: %1</translation>
+ </message>
+ <message>
+ <location line="-34"/>
+ <location line="+19"/>
+ <location line="+19"/>
+ <source>Missing widget!</source>
+ <translation>Отсутствует виджет!</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+12"/>
+ <source>The specified Qt help file does not exist!</source>
+ <translation>Указанный файл справки Qt отсутствует!</translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <location line="+12"/>
+ <source>Missing help file!</source>
+ <translation>Отсутствует файл справки!</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Missing filter argument!</source>
+ <translation>Отсутствует параметр фильтра!</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Unknown option: %1</source>
+ <translation>Неизвестный параметр: %1</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <location line="+2"/>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/main.cpp" line="+203"/>
+ <source>Could not register documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Не удалось зарегистрировать файл документации
+%1
+
+Причина:
+%2</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Documentation successfully registered.</source>
+ <translation>Документация успешно зарегистрирована.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Documentation successfully unregistered.</source>
+ <translation>Документация успешно дерегистрирована.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Could not unregister documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Не удалось дерегистрировать файл документации
+%1
+
+Причина:
+%2</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Не удалось загрузить драйвер базы данных sqlite!</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The specified collection file could not be read!</source>
+ <translation type="unfinished">Не удалось прочитать указанный файл набора!</translation>
+ </message>
+</context>
+<context>
+ <name>RemoteControl</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+157"/>
+ <source>Debugging Remote Control</source>
+ <translation>Отладочное удалённое управление</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Received Command: %1 %2</source>
+ <translation>Получена команда: %1 %2</translation>
+ </message>
+</context>
+<context>
+ <name>SearchWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+195"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Копировать</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>Копировать &amp;адрес ссылки</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Open Link in New Tab</source>
+ <translation>Открыть ссылку в новой вкладке</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Select All</source>
+ <translation>Выделить всё</translation>
+ </message>
+</context>
+<context>
+ <name>TopicChooser</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/>
+ <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;:</source>
+ <translation>Выберите статью для &lt;b&gt;%1&lt;/b&gt;:</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/topicchooser.ui" line="+16"/>
+ <source>Choose Topic</source>
+ <translation>Выбор статьи</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>&amp;Topics</source>
+ <translation>&amp;Статьи</translation>
+ </message>
+ <message>
+ <location line="+51"/>
+ <source>&amp;Display</source>
+ <translation>&amp;Показать</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Закрыть</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/linguist_ru.ts b/translations/linguist_ru.ts
new file mode 100644
index 0000000..058d86a
--- /dev/null
+++ b/translations/linguist_ru.ts
@@ -0,0 +1,2002 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name></name>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+59"/>
+ <source>(New Entry)</source>
+ <translation>(Новая запись)</translation>
+ </message>
+</context>
+<context>
+ <name>AboutDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1357"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+</context>
+<context>
+ <name>BatchTranslationDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/batchtranslation.ui" line="+54"/>
+ <source>Qt Linguist - Batch Translation</source>
+ <translation>Qt Linguist - Пакетный перевод</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Options</source>
+ <translation>Параметры</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Set translated entries to finished</source>
+ <translation>Помечать переведенные записи как завершённые</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Retranslate entries with existing translation</source>
+ <translation>Переводить записи, уже имеющие перевод</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Note that the modified entries will be reset to unfinished if &apos;Set translated entries to finished&apos; above is unchecked.</source>
+ <translation>Имейте в виду, что изменённые записи будут отмечены как незавершённые, если не включен параметр &quot;Помечать переведенные записи как завершённые&quot;.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translate also finished entries</source>
+ <translation>Также переводить записи с завершёнными переводами</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Phrase book preference</source>
+ <translation>Предпочитаемые разговорники</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Move up</source>
+ <translation>Поднять</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move down</source>
+ <translation>Опустить</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>The batch translator will search through the selected phrase books in the order given above.</source>
+ <translation>Пакетный переводчик будет искать в выбранных разговорниках в указанном выше порядке.</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>&amp;Run</source>
+ <translation>&amp;Выполнить</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Cancel</source>
+ <translation>Отмена</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/batchtranslationdialog.cpp" line="+79"/>
+ <source>Batch Translation of &apos;%1&apos; - Qt Linguist</source>
+ <translation>Пакетный перевод &apos;%1&apos; - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Searching, please wait...</source>
+ <translation>Идёт поиск, ждите...</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Отмена</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Linguist batch translator</source>
+ <translation>Пакетный переводчик Qt Linguist</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+1"/>
+ <source>Batch translated %n entries</source>
+ <translation>
+ <numerusform>Автоматически переведена %n запись</numerusform>
+ <numerusform>Автоматически переведены %n записи</numerusform>
+ <numerusform>Автоматически переведено %n записей</numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>DataModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+214"/>
+ <source>&lt;qt&gt;Duplicate messages found in &apos;%1&apos;:</source>
+ <translation>&lt;qt&gt;В &apos;%1&apos; обнаружены повторяющиеся сообщения:</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&lt;p&gt;[more duplicates omitted]</source>
+ <translation>&lt;p&gt;[остальные повторы не указаны]</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;p&gt;* Context: %1&lt;br&gt;* Source: %2</source>
+ <translation>&lt;p&gt;* Контекст: %1&lt;br&gt;* Источник: %2</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;br&gt;* Comment: %3</source>
+ <translation>&lt;br&gt;* Комментарий: %3</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>Linguist does not know the plural rules for &apos;%1&apos;.
+Will assume a single universal form.</source>
+ <translation>Qt Linguist не знает правила множественных форм для &apos;%1&apos;.
+Будет использована универсальная единичная форма.</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>Cannot create &apos;%2&apos;: %1</source>
+ <translation>Не удалось создать &apos;%2&apos;: %1</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>Universal Form</source>
+ <translation>Универсальная форма</translation>
+ </message>
+</context>
+<context>
+ <name>ErrorsView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/errorsview.cpp" line="+76"/>
+ <source>Accelerator possibly superfluous in translation.</source>
+ <translation>Возможно, лишний акселератор в переводе.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Accelerator possibly missing in translation.</source>
+ <translation>Возможно, пропущен акселератор в переводе.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not end with the same punctuation as the source text.</source>
+ <translation>Перевод не заканчивается тем же знаком препинания, что и исходный текст.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>A phrase book suggestion for &apos;%1&apos; was ignored.</source>
+ <translation>Предложение разговорника для &apos;%1&apos; пропущено.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not refer to the same place markers as in the source text.</source>
+ <translation>Перевод не содержит тех же маркеров форматирования, что и исходный текст.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not contain the necessary %n place marker.</source>
+ <translation>Перевод не содержит необходимого маркера форматирования %n.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unknown error</source>
+ <translation>Неизвестная ошибка</translation>
+ </message>
+</context>
+<context>
+ <name>FindDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/finddialog.cpp" line="+42"/>
+ <source></source>
+ <comment>Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog</comment>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/finddialog.ui" line="+60"/>
+ <source>Find</source>
+ <translation>Поиск</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This window allows you to search for some text in the translation source file.</source>
+ <translation>Данное окно позволяет искать текст в файле перевода.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>&amp;Find what:</source>
+ <translation>&amp;Искать:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Type in the text to search for.</source>
+ <translation>Введите искомый текст.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Options</source>
+ <translation>Параметры</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Source texts are searched when checked.</source>
+ <translation>Если отмечено, поиск будет вестись в исходных текстах.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Source texts</source>
+ <translation>&amp;Исходные тексты</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Translations are searched when checked.</source>
+ <translation>Если отмечено, поиск будет вестись в переведённых текстах.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Translations</source>
+ <translation>&amp;Переводы</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
+ <translation>Если отмечено, строки &quot;ПрИмЕр&quot; и &quot;пример&quot; будет считаться разными.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Match case</source>
+ <translation>С учётом &amp;регистра</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Comments and contexts are searched when checked.</source>
+ <translation>Если отмечено, поиск будет вестись по контекстам и комментариям.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Comments</source>
+ <translation>&amp;Комментарии</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Ignore &amp;accelerators</source>
+ <translation>Пропускать &amp;акселераторы</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Click here to find the next occurrence of the text you typed in.</source>
+ <translation>Найти следующее совпадение для введённого текста.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Find Next</source>
+ <translation>Найти далее</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Click here to close this window.</source>
+ <translation>Закрыть окно.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cancel</source>
+ <translation>Отмена</translation>
+ </message>
+</context>
+<context>
+ <name>LRelease</name>
+ <message numerus="yes">
+ <location filename="../tools/linguist/shared/qm.cpp" line="+715"/>
+ <source> Generated %n translation(s) (%1 finished and %2 unfinished)
+</source>
+ <translation>
+ <numerusform> Создан %n перевод (%1 завершённых и %2 незавершённых)
+</numerusform>
+ <numerusform> Создано %n перевода (%1 завершённых и %2 незавершённых)
+</numerusform>
+ <numerusform> Создано %n переводов (%1 завершённых и %2 незавершённых)
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source> Ignored %n untranslated source text(s)
+</source>
+ <translation>
+ <numerusform> Пропущен %n непереведённый исходный текст
+</numerusform>
+ <numerusform> Пропущено %n непереведённых исходных текста
+</numerusform>
+ <numerusform> Пропущено %n непереведённых исходных текстов
+</numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1315"/>
+ <source></source>
+ <comment>This is the application&apos;s main window.</comment>
+ <translatorcomment>Основное окно программы.</translatorcomment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+165"/>
+ <source>Source text</source>
+ <translation>Исходный текст</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+25"/>
+ <source>Index</source>
+ <translation>Индекс</translation>
+ </message>
+ <message>
+ <location line="-2"/>
+ <location line="+61"/>
+ <source>Context</source>
+ <translation>Контекст</translation>
+ </message>
+ <message>
+ <location line="-60"/>
+ <source>Items</source>
+ <translation>Записи</translation>
+ </message>
+ <message>
+ <location line="+77"/>
+ <source>This panel lists the source contexts.</source>
+ <translation>В данной панели перечислены исходные контексты.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Strings</source>
+ <translation>Строки</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Phrases and guesses</source>
+ <translation>Фразы и похожие переводы</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Sources and Forms</source>
+ <translation>Исходники и формы</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Warnings</source>
+ <translation>Предупреждения</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source> MOD </source>
+ <comment>status bar: file(s) modified</comment>
+ <translation> ИЗМ </translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <source>Loading...</source>
+ <translation>Загрузка...</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <location line="+22"/>
+ <source>Loading File - Qt Linguist</source>
+ <translation>Загрузка файла - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="-21"/>
+ <source>The file &apos;%1&apos; does not seem to be related to the currently open file(s) &apos;%2&apos;.
+
+Close the open file(s) first?</source>
+ <translation>Файл &apos;%1&apos;, похоже, не связан с открытым файлом(ами) &apos;%2&apos;.
+
+Закрыть открытые файлы?</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>The file &apos;%1&apos; does not seem to be related to the file &apos;%2&apos; which is being loaded as well.
+
+Skip loading the first named file?</source>
+ <translation>Файл &apos;%1&apos;, похоже, не связан с загруженным файлом &apos;%2&apos;.
+
+Пропустить загрузку файла?</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+61"/>
+ <source>%n translation unit(s) loaded.</source>
+ <translation>
+ <numerusform>Загружена %n запись.</numerusform>
+ <numerusform>Загружено %n записи.</numerusform>
+ <numerusform>Загружено %n записей.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+93"/>
+ <source>Related files (%1);;</source>
+ <translation>Связанные файлы (%1);;</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Open Translation Files</source>
+ <translation>Открыть файлы перевода</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+31"/>
+ <source>File saved.</source>
+ <translation>Файл сохранён.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <location line="+1164"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+246"/>
+ <source>Release</source>
+ <translation>Компиляция</translation>
+ </message>
+ <message>
+ <location line="-1163"/>
+ <source>Qt message files for released applications (*.qm)
+All files (*)</source>
+ <translation>Скомпилированные файлы перевода для приложений Qt (*.qm)
+Все файлы (*)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+12"/>
+ <source>File created.</source>
+ <translation>Файл создан.</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <location line="+355"/>
+ <source>Printing...</source>
+ <translation>Печать...</translation>
+ </message>
+ <message>
+ <location line="-347"/>
+ <source>Context: %1</source>
+ <translation>Контекст: %1</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>finished</source>
+ <translation>завершён</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>unresolved</source>
+ <translation>неразрешённый</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>obsolete</source>
+ <translation>устаревший</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <location line="+307"/>
+ <source>Printing... (page %1)</source>
+ <translation>Печать... (страница %1)</translation>
+ </message>
+ <message>
+ <location line="-300"/>
+ <location line="+307"/>
+ <source>Printing completed</source>
+ <translation>Печать завершена</translation>
+ </message>
+ <message>
+ <location line="-305"/>
+ <location line="+307"/>
+ <source>Printing aborted</source>
+ <translation>Печать прервана</translation>
+ </message>
+ <message>
+ <location line="-232"/>
+ <source>Search wrapped.</source>
+ <translation>Поиск с начала.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location line="+278"/>
+ <location line="+40"/>
+ <location line="+24"/>
+ <location line="+22"/>
+ <location line="+516"/>
+ <location line="+1"/>
+ <location line="+274"/>
+ <location line="+40"/>
+ <location line="+10"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="-1204"/>
+ <location line="+102"/>
+ <source>Cannot find the string &apos;%1&apos;.</source>
+ <translation>Не удалось найти строку &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location line="-82"/>
+ <source>Search And Translate in &apos;%1&apos; - Qt Linguist</source>
+ <translation>Поиск и перевод &apos;%1&apos; - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <location line="+23"/>
+ <location line="+24"/>
+ <source>Translate - Qt Linguist</source>
+ <translation>Перевод - Qt Linguist</translation>
+ </message>
+ <message numerus="yes">
+ <location line="-46"/>
+ <source>Translated %n entry(s)</source>
+ <translation>
+ <numerusform>Переведена %n запись</numerusform>
+ <numerusform>Переведено %n записи</numerusform>
+ <numerusform>Переведено %n записей</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>No more occurrences of &apos;%1&apos;. Start over?</source>
+ <translation>Нет больше совпадений с &apos;%1&apos;. Начать заново?</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Create New Phrase Book</source>
+ <translation>Создать разговорник</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Qt phrase books (*.qph)
+All files (*)</source>
+ <translation>Разговорники Qt (*.qph)
+Все файлы (*)</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Phrase book created.</source>
+ <translation>Разговорник создан.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Open Phrase Book</source>
+ <translation>Открыть разговорник</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Qt phrase books (*.qph);;All files (*)</source>
+ <translation>Разговорники Qt (*.qph);;Все файлы (*)</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+7"/>
+ <source>%n phrase(s) loaded.</source>
+ <translation>
+ <numerusform>Загружена %n фраза.</numerusform>
+ <numerusform>Загружено %n фразы.</numerusform>
+ <numerusform>Загружено %n фраз.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+93"/>
+ <location line="+3"/>
+ <location line="+7"/>
+ <source>Add to phrase book</source>
+ <translation>Добавить в разговорник</translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <source>No appropriate phrasebook found.</source>
+ <translation>Подходящий разговорник не найден.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Adding entry to phrasebook %1</source>
+ <translation>Добавление записи в разговорник %1</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Select phrase book to add to</source>
+ <translation>Выберите разговорник, в который желаете добавить фразу</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Unable to launch Qt Assistant (%1)</source>
+ <translation>Не удалось запустить Qt Assistant (%1)</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Version %1</source>
+ <translation>Версия %1</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist is a tool for adding translations to Qt applications.&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;</source>
+ <translation type="unfinished">&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist - инструмент для добавления переводов в приложения на основе Qt.&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Корпорация Nokia и/или её дочерние подразделения.&lt;/p&gt;&lt;p&gt;Программа предоставляется &quot;как есть&quot; без гарантий любого рода, включая гарантии дизайна, коммерческой ценности и пригодности для определённой цели.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Do you want to save the modified files?</source>
+ <translation>Желаете сохранить изменённые файлы?</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Do you want to save &apos;%1&apos;?</source>
+ <translation>Желаете сохранить &apos;%1&apos;?</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Qt Linguist[*]</source>
+ <translation>Qt Linguist[*]</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1[*] - Qt Linguist</source>
+ <translation>%1[*] - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+267"/>
+ <location line="+12"/>
+ <source>No untranslated translation units left.</source>
+ <translation>Непереведённых записей не осталось.</translation>
+ </message>
+ <message>
+ <location line="+176"/>
+ <source>&amp;Window</source>
+ <translation>&amp;Окно</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Minimize</source>
+ <translation>Свернуть</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+M</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Display the manual for %1.</source>
+ <translation>Показать руководство для %1.</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Display information about %1.</source>
+ <translation>Показать информацию о %1.</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>&amp;Save &apos;%1&apos;</source>
+ <translation>&amp;Сохранить&apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save &apos;%1&apos; &amp;As...</source>
+ <translation>Сохранить&apos;%1&apos; &amp;как...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Release &apos;%1&apos;</source>
+ <translation>Скомпилировать &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Release &apos;%1&apos; As...</source>
+ <translation>Скомпилировать &apos;%1&apos; как...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Close &apos;%1&apos;</source>
+ <translation>&amp;Закрыть &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+15"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Сохранить</translation>
+ </message>
+ <message>
+ <location line="-14"/>
+ <location line="+11"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="-11"/>
+ <source>Save &amp;As...</source>
+ <translation>Сохранить &amp;как...</translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <location line="+10"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+508"/>
+ <location line="+3"/>
+ <source>Release As...</source>
+ <translation>Скомпилировать как...</translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <location line="+13"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Закрыть</translation>
+ </message>
+ <message>
+ <location line="-10"/>
+ <source>Save All</source>
+ <translation>Сохранить все</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+118"/>
+ <source>&amp;Release All</source>
+ <translation>С&amp;компилировать все</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Close All</source>
+ <translation>Закрыть все</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>&amp;Release</source>
+ <translation>С&amp;компилировать</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Translation File &amp;Settings for &apos;%1&apos;...</source>
+ <translation>&amp;Параметры файла перевода для &apos;%1&apos;...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Batch Translation of &apos;%1&apos;...</source>
+ <translation>Пак&amp;етный перевод &apos;%1&apos;...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Search And &amp;Translate in &apos;%1&apos;...</source>
+ <translation>&amp;Найти и перевести в &apos;%1&apos;...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="-32"/>
+ <source>Translation File &amp;Settings...</source>
+ <translation>&amp;Параметры файла перевода...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="-100"/>
+ <source>&amp;Batch Translation...</source>
+ <translation>Пак&amp;етный перевод...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Search And &amp;Translate...</source>
+ <translation>&amp;Найти и перевести...</translation>
+ </message>
+ <message>
+ <location line="+51"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+28"/>
+ <source>File</source>
+ <translation>Файл</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+11"/>
+ <source>Edit</source>
+ <translation>Правка</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+11"/>
+ <source>Translation</source>
+ <translation>Перевод</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+11"/>
+ <source>Validation</source>
+ <translation>Проверка</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="+11"/>
+ <source>Help</source>
+ <translation>Справка</translation>
+ </message>
+ <message>
+ <location line="+84"/>
+ <source>Cannot read from phrase book &apos;%1&apos;.</source>
+ <translation>Не удалось прочитать из разговорника &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Close this phrase book.</source>
+ <translation>Закрыть разговорник.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Enables you to add, modify, or delete entries in this phrase book.</source>
+ <translation>Позволяет добавлять, изменять и удалять записи в разговорнике.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Print the entries in this phrase book.</source>
+ <translation>Печать записей фраз разговорника.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Cannot create phrase book &apos;%1&apos;.</source>
+ <translation>Не удалось создать разговорник &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Do you want to save phrase book &apos;%1&apos;?</source>
+ <translation>Желаете сохранить разговорник &apos;%1&apos;?</translation>
+ </message>
+ <message>
+ <location line="+314"/>
+ <source>All</source>
+ <translation>Все</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui" line="-750"/>
+ <source>MainWindow</source>
+ <translation>Главное окно</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Phrases</source>
+ <translation>Фра&amp;зы</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Close Phrase Book</source>
+ <translation>&amp;Закрыть разговорник</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Edit Phrase Book</source>
+ <translation>&amp;Редактироваь разговорник</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Print Phrase Book</source>
+ <translation>&amp;Печатать разговорник</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>V&amp;alidation</source>
+ <translation>П&amp;роверка</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>&amp;View</source>
+ <translation>&amp;Вид</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Vie&amp;ws</source>
+ <translation>Вид&amp;ы</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Toolbars</source>
+ <translation>Пан&amp;ели инструментов</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Справка</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>&amp;Translation</source>
+ <translation>П&amp;еревод</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;File</source>
+ <translation>&amp;Файл</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Recently Opened &amp;Files</source>
+ <translation>Недавно открытые &amp;файлы</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>&amp;Edit</source>
+ <translation>&amp;Правка</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>&amp;Open...</source>
+ <translation>&amp;Открыть...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open a Qt translation source file (TS file) for editing</source>
+ <translation>Открыть исходный файл переводов Qt (файл TS) для изменения</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+O</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>E&amp;xit</source>
+ <translation>В&amp;ыход</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Close this window and exit.</source>
+ <translation>Закрыть окно и выйти.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+Q</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Save</source>
+ <translation>Сохранить</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Save changes made to this Qt translation source file</source>
+ <translation>Сохранить изменения в данном исходном файле перевода Qt</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Save As...</source>
+ <translation>Сохранить как...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Save changes made to this Qt translation source file into a new file.</source>
+ <translation>Сохранить изменения в данном исходном файле перевода Qt в новый файл.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Create a Qt message file suitable for released applications from the current message file.</source>
+ <translation>Скомпилировать файл перевода Qt из текущего файла.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Print...</source>
+ <translation>&amp;Печать...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Print a list of all the translation units in the current translation source file.</source>
+ <translation>Печать списка всех записей перевода из текущего файла.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+P</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Undo</source>
+ <translation>&amp;Отменить</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Undo the last editing operation performed on the current translation.</source>
+ <translation>Отменить последнее изменение текущего перевода.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+Z</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Redo</source>
+ <translation>&amp;Повторить</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Redo an undone editing operation performed on the translation.</source>
+ <translation>Повторить отменённую правку перевода.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+Y</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Cu&amp;t</source>
+ <translation>Выр&amp;езать</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Copy the selected translation text to the clipboard and deletes it.</source>
+ <translation>Скопировать отмеченный текст в буфер обмена и удалить его из оригинала.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+X</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Копировать</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Copy the selected translation text to the clipboard.</source>
+ <translation>Скопировать отмеченный текст в буфер обмена.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+C</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Вставить</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Paste the clipboard text into the translation.</source>
+ <translation>Вставить текст из буфера обмена в перевод.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+V</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Select &amp;All</source>
+ <translation>В&amp;ыделить всё</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select the whole translation text.</source>
+ <translation>Выделить весь текст перевода.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+A</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Find...</source>
+ <translation>&amp;Найти...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Search for some text in the translation source file.</source>
+ <translation>Найти текст в исходном файле перевода.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+F</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Find &amp;Next</source>
+ <translation>Найти д&amp;алее</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Continue the search where it was left.</source>
+ <translation>Продолжить поиск с места, где он был остановлен.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>F3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Prev Unfinished</source>
+ <translation>&amp;Пред. незавершённый</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Previous unfinished item.</source>
+ <translation>Предыдущий незавершённый перевод.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move to the previous unfinished item.</source>
+ <translation>Перейти к предыдущему незавершённому переводу.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+K</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Next Unfinished</source>
+ <translation>&amp;След. незавершённый</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Next unfinished item.</source>
+ <translation>Следующий незавершённый перевод.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move to the next unfinished item.</source>
+ <translation>Перейти к следующему незавершённому переводу.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+J</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>P&amp;rev</source>
+ <translation>Пр&amp;едыдущий</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move to previous item.</source>
+ <translation>Предыдущий перевод.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move to the previous item.</source>
+ <translation>Перейти к предыдущему переводу.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+Shift+K</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Ne&amp;xt</source>
+ <translation>С&amp;ледующий</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Next item.</source>
+ <translation>Следующий перевод.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move to the next item.</source>
+ <translation>Перейти к следующему переводу.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+Shift+J</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Done and Next</source>
+ <translation>&amp;Готово и далее</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Mark item as done and move to the next unfinished item.</source>
+ <translation>Пометить перевод как завершённый и перейти к следующему незавершённому.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Mark this item as done and move to the next unfinished item.</source>
+ <translation>Пометить перевод как завершённый и перейти к следующему незавершённому.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <location line="+3"/>
+ <source>Copy from source text</source>
+ <translation>Скопировать из исходного текста</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+3"/>
+ <source>Copies the source text into the translation field.</source>
+ <translation>Скопировать исходный текст в поле перевода.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+B</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Accelerators</source>
+ <translation>&amp;Акселераторы</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of accelerators.</source>
+ <translation>Переключение проверки акселераторов.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Переключение проверки акселераторов, т.е. совпадает ли количество амперсандов в исходном и переведённом текстах. Если выявлено несовпадение, будет показано сообщение в окне предупреждений.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Ending Punctuation</source>
+ <translation>&amp;Знаки препинания</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of ending punctuation.</source>
+ <translation>Переключение проверки знаков препинания в конце текста.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Переключение проверки знаков препинания в конце текста. Если выявлено несовпадение, будет показано сообщение в окне предупреждений.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Phrase matches</source>
+ <translation>Совпадение &amp;фраз</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle checking that phrase suggestions are used.</source>
+ <translation>Переключение проверки использования предложений для фраз. Если выявлено несовпадение, будет показано сообщение в окне предупреждений.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Переключение проверки использования предложений для фраз. Если выявлено несовпадение, будет показано сообщение в окне предупреждений.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Place &amp;Marker Matches</source>
+ <translation>Совпадение &amp;маркеров</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of place markers.</source>
+ <translation>Переключение проверки маркеров форматирования.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Переключение проверки маркеров форматирования, т.е. все ли маркеры (%1, %2, ...) исходного текста присутствуют в переведённом. Если выявлено несовпадение, будет показано сообщение в окне предупреждений.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;New Phrase Book...</source>
+ <translation>&amp;Новый разговорник...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Create a new phrase book.</source>
+ <translation>Создать разговорник.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+N</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Open Phrase Book...</source>
+ <translation>&amp;Открыть разговорник...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open a phrase book to assist translation.</source>
+ <translation>Открыть разговорник для помощи в переводе.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+H</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Reset Sorting</source>
+ <translation>&amp;Сброс сортировки</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Sort the items back in the same order as in the message file.</source>
+ <translation>Упорядочить элементы в той последовательности, в которой они находятся в файле.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Display guesses</source>
+ <translation>&amp;Предлагать похожие</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Set whether or not to display translation guesses.</source>
+ <translation>Определяет необходимо или нет отображать похожие переводы.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Statistics</source>
+ <translation>&amp;Статистика</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Display translation statistics.</source>
+ <translation>Показать статистику перевода.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Manual</source>
+ <translation>&amp;Руководство</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>F1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>About Qt Linguist</source>
+ <translation>О Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>About Qt</source>
+ <translation>О Qt</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Display information about the Qt toolkit by Trolltech.</source>
+ <translation>Показать информацию об инструментарии Qt от Nokia.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;What&apos;s This?</source>
+ <translation>&amp;Что это?</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+3"/>
+ <source>What&apos;s This?</source>
+ <translation>Что это?</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Enter What&apos;s This? mode.</source>
+ <translation>Переход в режим &quot;Что это?&quot;.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Shift+F1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Search And Translate...</source>
+ <translation>&amp;Найти и перевести...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Replace the translation on all entries that matches the search source text.</source>
+ <translation>Заменить перевод всех записей, которые совпадают с искомым исходным текстом.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Batch translate all entries using the information in the phrase books.</source>
+ <translation>Перевести все записи в пакетном режиме, используя информацию из разговорника.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the .ts file.</source>
+ <translation>Создание готового файла перевода Qt из текущего файла. Имя файла будет автоматически определено из имени .ts файла.</translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>Open/Refresh Form &amp;Preview</source>
+ <translation>Открыть/обновить предпрос&amp;мотр формы</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+3"/>
+ <source>Form Preview Tool</source>
+ <translation>Инструмент предпросмотра форм</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>F5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>&amp;Add to Phrase Book</source>
+ <translation>&amp;Добавить в разговорник</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+T</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Open Read-O&amp;nly...</source>
+ <translation>Открыть только для &amp;чтения...</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Save All</source>
+ <translation>&amp;Сохранить все</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+S</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Close</source>
+ <translation>Закрыть</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Close All</source>
+ <translation>&amp;Закрыть все</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+W</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>MessageEditor</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="+42"/>
+ <source></source>
+ <comment>This is the right panel of the main window.</comment>
+ <translatorcomment>Правая панель основного окна</translatorcomment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>German</source>
+ <translation>Немецкий</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Japanese</source>
+ <translation>Японский</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>French</source>
+ <translation>Французский</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Polish</source>
+ <translation>Польский</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Chinese</source>
+ <translation>Китайский</translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>This whole panel allows you to view and edit the translation of some source text.</source>
+ <translation>Данная панель позволяет просматривать и редактировать перевод исходного текста.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Source text</source>
+ <translation>Исходный текст</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This area shows the source text.</source>
+ <translation>В данной области отображается исходный текст.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Source text (Plural)</source>
+ <translation>Исходный текст (множественная форма)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This area shows the plural form of the source text.</source>
+ <translation>В данной области отображается исходный текст во множественной форме.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Developer comments</source>
+ <translation>Комментарии разработчика</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This area shows a comment that may guide you, and the context in which the text occurs.</source>
+ <translation>В данной области отображается комментарий, который поможет определить в каком контексте встречается переводимый текст.</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Here you can enter comments for your own use. They have no effect on the translated applications.</source>
+ <translation>Здесь вы можете оставить комментарий для собственного использования. Комментарии не влияют на перевод приложений.</translation>
+ </message>
+ <message>
+ <location line="+205"/>
+ <source>%1 translation (%2)</source>
+ <translation>%1 перевод (%2)</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>This is where you can enter or modify the translation of the above source text.</source>
+ <translation>Здесь вы можете ввести или изменить перевод текста, представленного выше.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1 translation</source>
+ <translation>%1 перевод</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>%1 translator comments</source>
+ <translation>Комментарий переводчика на %1</translation>
+ </message>
+ <message>
+ <location line="+140"/>
+ <source>&apos;%1&apos;
+Line: %2</source>
+ <translation>&apos;%1&apos;
+Строка: %2</translation>
+ </message>
+</context>
+<context>
+ <name>MessageModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/>
+ <source>Completion status for %1</source>
+ <translation>Состояние завершённости для %1</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>&lt;file header&gt;</source>
+ <translation>&lt;заголовок файла&gt;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&lt;context comment&gt;</source>
+ <translation>&lt;контекстный комментарий&gt;</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>&lt;unnamed context&gt;</source>
+ <translation>&lt;безымянный контекст&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>MsgEdit</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-544"/>
+ <source></source>
+ <comment>This is the right panel of the main window.</comment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PhraseBookBox</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="-17"/>
+ <source></source>
+ <comment>Go to Phrase &gt; Edit Phrase Book... The dialog that pops up is a PhraseBookBox.</comment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>%1[*] - Qt Linguist</source>
+ <translation>%1[*] - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+90"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cannot save phrase book &apos;%1&apos;.</source>
+ <translation>Не удалось сохранить разговорник &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasebookbox.ui" line="+54"/>
+ <source>Edit Phrase Book</source>
+ <translation>Правка разговорника</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This window allows you to add, modify, or delete entries in a phrase book.</source>
+ <translation>Данное окно позволяет добавлять, изменять и удалять записи в разговорнике.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Translation:</source>
+ <translation>&amp;Перевод:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>This is the phrase in the target language corresponding to the source phrase.</source>
+ <translation>Перевод, соответствующий исходной фразе.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>S&amp;ource phrase:</source>
+ <translation>&amp;Исходная фраза:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>This is a definition for the source phrase.</source>
+ <translation>Определение исходной фразы.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>This is the phrase in the source language.</source>
+ <translation>Фраза на исходном языке.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>&amp;Definition:</source>
+ <translation>&amp;Определение:</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Click here to add the phrase to the phrase book.</source>
+ <translation>Добавить фразу в разговорник.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;New Entry</source>
+ <translation>Новая &amp;запись</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Click here to remove the entry from the phrase book.</source>
+ <translation>Удалить фразу из разговорника.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Remove Entry</source>
+ <translation>&amp;Удалить</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Settin&amp;gs...</source>
+ <translation>&amp;Настройки...</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Click here to save the changes made.</source>
+ <translation>Сохранить изменения.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Сохранить</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Click here to close this window.</source>
+ <translation>Закрыть окно.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close</source>
+ <translation>Закрыть</translation>
+ </message>
+</context>
+<context>
+ <name>PhraseModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasemodel.cpp" line="+117"/>
+ <source>Source phrase</source>
+ <translation>Исходная фраза</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Translation</source>
+ <translation>Перевод</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Definition</source>
+ <translation>Определение</translation>
+ </message>
+</context>
+<context>
+ <name>PhraseView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phraseview.cpp" line="+121"/>
+ <source>Insert</source>
+ <translation>Вставить</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Edit</source>
+ <translation>Правка</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>Guess (%1)</source>
+ <translation>Похожая (%1)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Guess</source>
+ <translation>Похожая</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1806"/>
+ <source>Translation files (%1);;</source>
+ <translation>Файлы перевода (%1);;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>All files (*)</source>
+ <translation>Все файлы (*)</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1118"/>
+ <location line="+18"/>
+ <location line="+67"/>
+ <location line="+39"/>
+ <location line="+17"/>
+ <location line="+15"/>
+ <location filename="../tools/linguist/linguist/phrase.cpp" line="+196"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/po.cpp" line="+651"/>
+ <source>GNU Gettext localization files</source>
+ <translation>Файлы локализации GNU Gettext</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/qm.cpp" line="+12"/>
+ <source>Compiled Qt translations</source>
+ <translation>Скомпилированные переводы Qt</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/qph.cpp" line="+192"/>
+ <source>Qt Linguist &apos;Phrase Book&apos;</source>
+ <translation>&apos;Разговорник&apos; Qt Linguist</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/ts.cpp" line="+752"/>
+ <source>Qt translation sources (format 1.1)</source>
+ <translation>Исходные файлы перевода Qt (формат 1.1)</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Qt translation sources (format 2.0)</source>
+ <translation>Исходные файлы перевода Qt (формат 2.0)</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Qt translation sources (latest format)</source>
+ <translation>Исходные файлы перевода Qt (последний формат)</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/xliff.cpp" line="+817"/>
+ <source>XLIFF localization files</source>
+ <translation>Файлы локализации XLIFF</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/cpp.cpp" line="+1089"/>
+ <source>C++ source files</source>
+ <translation>Исходные коды C++</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/java.cpp" line="+652"/>
+ <source>Java source files</source>
+ <translation>Исходные коды Java</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/qscript.cpp" line="+2399"/>
+ <source>Qt Script source files</source>
+ <translation>Исходные коды Qt Script</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/ui.cpp" line="+213"/>
+ <source>Qt Designer form files</source>
+ <translation>Формы Qt Designer</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Qt Jambi form files</source>
+ <translation>Формы Qt Jambi</translation>
+ </message>
+</context>
+<context>
+ <name>SourceCodeView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/sourcecodeview.cpp" line="+70"/>
+ <source>&lt;i&gt;Source code not available&lt;/i&gt;</source>
+ <translation>&lt;i&gt;Исходный код недоступен&lt;/i&gt;</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>&lt;i&gt;File %1 not available&lt;/i&gt;</source>
+ <translation>&lt;i&gt;Файл %1 недоступен&lt;/i&gt;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&lt;i&gt;File %1 not readable&lt;/i&gt;</source>
+ <translation>&lt;i&gt;Невозможно прочитать файл %1&lt;/i&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>Statistics</name>
+ <message>
+ <location filename="../tools/linguist/linguist/statistics.ui" line="+54"/>
+ <source>Statistics</source>
+ <translation>Статистика</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Close</source>
+ <translation>Закрыть</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>Translation</source>
+ <translation>Перевод</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Source</source>
+ <translation>Источник</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+7"/>
+ <location line="+14"/>
+ <location line="+7"/>
+ <location line="+21"/>
+ <location line="+7"/>
+ <source>0</source>
+ <translation>0</translation>
+ </message>
+ <message>
+ <location line="-42"/>
+ <source>Words:</source>
+ <translation>Слов:</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Characters:</source>
+ <translation>Символов:</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Characters (with spaces):</source>
+ <translation>Символов (с пробелами):</translation>
+ </message>
+</context>
+<context>
+ <name>TranslateDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/translatedialog.ui" line="+60"/>
+ <source>This window allows you to search for some text in the translation source file.</source>
+ <translation>Данное окно позволяет искать текст в файле перевода.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <location line="+27"/>
+ <source>Type in the text to search for.</source>
+ <translation>Введите искомый текст.</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Find &amp;source text:</source>
+ <translation>&amp;Найти текст:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Translate to:</source>
+ <translation>&amp;Перевести как:</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Search options</source>
+ <translation>Параметры поиска</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
+ <translation>Если отмечено, строки &quot;ПрИмЕр&quot; и &quot;пример&quot; будет считаться разными.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Match &amp;case</source>
+ <translation>С учётом &amp;регистра</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Mark new translation as &amp;finished</source>
+ <translation>Помечать перевод как завер&amp;шённый</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Click here to find the next occurrence of the text you typed in.</source>
+ <translation>Найти следующее совпадение для введённого текста.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Find Next</source>
+ <translation>Найти далее</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Translate</source>
+ <translation>Перевести</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Translate All</source>
+ <translation>Перевести все</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Click here to close this window.</source>
+ <translation>Закрыть окно.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cancel</source>
+ <translation>Отмена</translation>
+ </message>
+</context>
+<context>
+ <name>TranslationSettingsDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/translationsettings.ui" line="+20"/>
+ <source>Source language</source>
+ <translation>Исходный язык</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <location line="+38"/>
+ <source>Language</source>
+ <translation>Язык</translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <location line="+38"/>
+ <source>Country/Region</source>
+ <translation>Страна/Регион</translation>
+ </message>
+ <message>
+ <location line="-28"/>
+ <source>Target language</source>
+ <translation>Язык перевода</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+68"/>
+ <source>Any Country</source>
+ <translation>Любая страна</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <location line="+8"/>
+ <source>Settings for &apos;%1&apos; - Qt Linguist</source>
+ <translation>Настройки для &apos;%1&apos; - Qt Linguist</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/qt_help_ru.ts b/translations/qt_help_ru.ts
new file mode 100644
index 0000000..16748fb
--- /dev/null
+++ b/translations/qt_help_ru.ts
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name>QCLuceneResultWidget</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+110"/>
+ <source>Search Results</source>
+ <translation>Результаты поиска</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Note:</source>
+ <translation>Замечание:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The search results may not be complete since the documentation is still being indexed!</source>
+ <translation>Могли быть показаны не все результаты, так как документация ещё индексируется!</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Your search did not match any documents.</source>
+ <translation>По вашему запросу не найдено ни одного документа.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>(The reason for this might be that the documentation is still being indexed.)</source>
+ <translation>(Причиной этого может быть то, что документация ещё индексируется.)</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpCollectionHandler</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpcollectionhandler.cpp" line="+79"/>
+ <source>The collection file is not set up yet!</source>
+ <translation type="unfinished">Файл набора ещё не установлен!</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Не удалось загрузить драйвер базы данных sqlite!</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <location line="+48"/>
+ <source>Cannot open collection file: %1</source>
+ <translation>Не удалось открыть файл набора: %1</translation>
+ </message>
+ <message>
+ <location line="-39"/>
+ <source>Cannot create tables in file %1!</source>
+ <translation>Не удалось создать таблицы в файле %1!</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>The specified collection file already exists!</source>
+ <translation type="unfinished">Указанный файла набора уже существует!</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Cannot create directory: %1</source>
+ <translation>Не удалось создать каталог: %1</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Cannot copy collection file: %1</source>
+ <translation type="unfinished">Не удалось скопировать файл набора: %1</translation>
+ </message>
+ <message>
+ <location line="+119"/>
+ <source>Unknown filter!</source>
+ <translation>Неизвестный фильтр!</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>Cannot register filter %1!</source>
+ <translation>Не удалось зарегистрировать фильтр %1!</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Cannot open documentation file %1!</source>
+ <translation>Не удалось открыть файл документации %1!</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Invalid documentation file!</source>
+ <translation>Некорректный файл документации!</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>The namespace %1 was not registered!</source>
+ <translation>Пространство имён %1 не зарегистрировано!</translation>
+ </message>
+ <message>
+ <location line="+120"/>
+ <source>Namespace %1 already exists!</source>
+ <translation>Пространство имён %1 уже существует!</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Cannot register namespace!</source>
+ <translation>Не удалось зарегистрировать пространство имён!</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Cannot open database to optimize!</source>
+ <translation>Не удалось открыть базу данных для оптимизации!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpDBReader</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpdbreader.cpp" line="+98"/>
+ <source>Cannot open database &apos;%1&apos; &apos;%2&apos;: %3</source>
+ <extracomment>The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string</extracomment>
+ <translation>Не удалось открыть базу данных &apos;%1&apos; &apos;%2&apos;: %3</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpEngineCore</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+516"/>
+ <source>The specified namespace does not exist!</source>
+ <translation>Указанное пространство имён не существует!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpEngineCorePrivate</name>
+ <message>
+ <location line="-394"/>
+ <source>Cannot open documentation file %1: %2!</source>
+ <translation>Не удалось открыть файл документации %1: %2!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpGenerator</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+157"/>
+ <source>Invalid help data!</source>
+ <translation>Некорректные данные справки!</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>No output file name specified!</source>
+ <translation>Не указано имя результирующего файла!</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Building up file structure...</source>
+ <translation>Создание структуры файла...</translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <source>The file %1 cannot be overwritten!</source>
+ <translation>Невозможно перезаписать файл %1!</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Cannot open data base file %1!</source>
+ <translation>Не удалось открыть файл базы данных %1!</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Cannot register namespace %1!</source>
+ <translation>Не удалось зарегистрировать пространство имён %1!</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Insert custom filters...</source>
+ <translation>Вставка индивидуальных фильтров...</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Insert help data for filter section (%1 of %2)...</source>
+ <translation>Вставка данных справки для секции фильтра (%1 из %2)...</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Documentation successfully generated.</source>
+ <translation>Документация успешно создана.</translation>
+ </message>
+ <message>
+ <location line="+76"/>
+ <source>Some tables already exist!</source>
+ <translation>Некоторые таблицы уже существуют!</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>Cannot create tables!</source>
+ <translation>Не удалось создать таблицы!</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <source>Cannot register virtual folder!</source>
+ <translation>Не удалось зарегистрировать виртуальный каталог!</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Insert files...</source>
+ <translation>Вставка файлов...</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it.</source>
+ <translation>Файл %1 должен быть в каталоге &apos;%2&apos; или в его подкаталоге. Пропускаем.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>The file %1 does not exist! Skipping it.</source>
+ <translation>Файл %1 не существует! Пропускаем.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Cannot open file %1! Skipping it.</source>
+ <translation>Не удалось открыть файл %1! Пропускаем.</translation>
+ </message>
+ <message>
+ <location line="+131"/>
+ <source>The filter %1 is already registered!</source>
+ <translation>Фильтр %1 уже зарегистрирован!</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Cannot register filter %1!</source>
+ <translation>Не удалось зарегистрировать фильтр %1!</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Insert indices...</source>
+ <translation>Вставка указателей...</translation>
+ </message>
+ <message>
+ <location line="+80"/>
+ <source>Insert contents...</source>
+ <translation>Вставка оглавления...</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Cannot insert contents!</source>
+ <translation>Не удаётся вставить оглавление!</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Cannot register contents!</source>
+ <translation>Не удаётся зарегистрировать оглавление!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchQueryWidget</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+200"/>
+ <source>Search for:</source>
+ <translation>Искать:</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Search</source>
+ <translation>Поиск</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Advanced search</source>
+ <translation>Расширенный поиск</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>words &lt;B&gt;similar&lt;/B&gt; to:</source>
+ <translation>&lt;B&gt;похожие&lt;/B&gt; слова:</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&lt;B&gt;without&lt;/B&gt; the words:</source>
+ <translation>&lt;B&gt;не содержит&lt;/B&gt; слова:</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>with &lt;B&gt;exact phrase&lt;/B&gt;:</source>
+ <translation>содержит &lt;B&gt;фразу полностью&lt;/B&gt;:</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>with &lt;B&gt;all&lt;/B&gt; of the words:</source>
+ <translation>содержит &lt;B&gt;все&lt;/B&gt; слова:</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>with &lt;B&gt;at least one&lt;/B&gt; of the words:</source>
+ <translation>содержит &lt;B&gt; минимум одно&lt;/B&gt; из слов:</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchResultWidget</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+235"/>
+ <source>0 - 0 of 0 Hits</source>
+ <translation>0 - 0 из 0 соответствий</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchResultWidgetPrivate</name>
+ <message>
+ <location line="-61"/>
+ <source>%1 - %2 of %3 Hits</source>
+ <translation>%1 - %2 из %3 соответствий</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelp_global.h" line="+83"/>
+ <source>Untitled</source>
+ <translation>Безымянный</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+80"/>
+ <source>Unknown token.</source>
+ <translation type="unfinished">Неизвестный токен.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
+ <translation type="unfinished">Неизвестный токен. Ожидается &quot;QtHelpProject&quot;!</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Error in line %1: %2</source>
+ <translation>Ошибка в строке %1: %2</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>A virtual folder must not contain a &apos;/&apos; character!</source>
+ <translation>Виртуальный каталог не должен содержать символ &apos;/&apos;!</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>A namespace must not contain a &apos;/&apos; character!</source>
+ <translation>Пространство имён не должно содержать символ &apos;/&apos;!</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Missing namespace in QtHelpProject.</source>
+ <translation>Отсутствует пространство имён в QtHelpProject.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Missing virtual folder in QtHelpProject</source>
+ <translation>Отсутствует виртуальный каталог в QtHelpProject</translation>
+ </message>
+ <message>
+ <location line="+88"/>
+ <source>Missing attribute in keyword at line %1.</source>
+ <translation>Отсутствует атрибут у ключевого слова в строке %1.</translation>
+ </message>
+ <message>
+ <location line="+83"/>
+ <source>The input file %1 could not be opened!</source>
+ <translation>Невозможно открыть исходный файл %1!</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/translations.pri b/translations/translations.pri
index cdb157e..480849f 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -8,8 +8,16 @@ defineReplace(prependAll) {
return ($$result)
}
-LUPDATE = $$QT_BUILD_TREE/bin/lupdate -locations relative -no-ui-lines
-win32:LUPDATE ~= s|/|\|g
+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)
###### Qt Libraries
@@ -34,18 +42,27 @@ 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 \
@@ -56,21 +73,36 @@ 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 \
- ts
+ qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb \
+ ts qm
diff --git a/translations/translations.pro b/translations/translations.pro
deleted file mode 100644
index 6f14108..0000000
--- a/translations/translations.pro
+++ /dev/null
@@ -1,50 +0,0 @@
-TRANSLATIONS = $$files(*.ts)
-
-LRELEASE = $$QT_BUILD_TREE/bin/lrelease
-win32 {
- LRELEASE ~= s|/|\|g
-} else:!static {
- path = $$QT_BUILD_TREE/lib
- !macx:var = LD_LIBRARY_PATH
- else:qt_no_framework:var = DYLD_LIBRARY_PATH
- else:var = DYLD_FRAMEWORK_PATH
-
- LRELEASE = test -z \"\$\$$$var\" && $$var=$$path || $$var=$$path:\$\$$$var; export $$var; $$LRELEASE
-}
-
-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 = @echo lrelease ${QMAKE_FILE_IN}; $$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