From 16488d6e1073ce311c173d78c16be8da1f57f94e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 30 Mar 2009 16:44:55 +0200 Subject: Doc: Synchronized the QTransform constructor arguments with the class documentation and updated a diagram. Task-number: 228201 Reviewed-by: TrustMe --- doc/src/diagrams/qtransform-representation.sk | 103 ++++++++++++++++++++++++++ src/gui/painting/qtransform.cpp | 19 +++-- 2 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 doc/src/diagrams/qtransform-representation.sk diff --git a/doc/src/diagrams/qtransform-representation.sk b/doc/src/diagrams/qtransform-representation.sk new file mode 100644 index 0000000..17dcbfe --- /dev/null +++ b/doc/src/diagrams/qtransform-representation.sk @@ -0,0 +1,103 @@ +##Sketch 1 2 +document() +layout('A4',0) +layer('Layer 1',1,1,0,0,(0,0,0)) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,190,760) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,190,695) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,190,630) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,320,760) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,320,695) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,320,630) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,255,760) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,255,695) +lp((0,0,1)) +lw(2) +r(65,0,0,-65,255,630) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m33',(329.16,589.968)) +G() +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('dy',(274.828,577.768)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m32',(264.16,602.768)) +G_() +G() +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m31',(199.16,602.768)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('dx',(209.828,577.8)) +G_() +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m11',(199.16,719.968)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m12',(264.16,719.968)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m13',(329.16,719.968)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m21',(199.16,654.968)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m22',(264.16,654.968)) +fp((0,0,0)) +le() +lw(1) +Fn('Helvetica') +Fs(24) +txt('m23',(329.16,654.968)) +guidelayer('Guide Lines',1,0,0,1,(0,0,1)) +grid((0,0,5,5),1,(0,0,1),'Grid') diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index da8c428..c70208c 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -168,10 +168,10 @@ QT_BEGIN_NAMESPACE \image qtransform-representation.png - A QTransform object contains a 3 x 3 matrix. The \c dx and \c dy - elements specify horizontal and vertical translation. The \c m11 - and \c m22 elements specify horizontal and vertical scaling. The - \c m21 and \c m12 elements specify horizontal and vertical \e shearing. + A QTransform object contains a 3 x 3 matrix. The \c m31 (\c dx) and + \c m32 (\c dy) elements specify horizontal and vertical translation. + The \c m11 and \c m22 elements specify horizontal and vertical scaling. + The \c m21 and \c m12 elements specify horizontal and vertical \e shearing. And finally, the \c m13 and \c m23 elements specify horizontal and vertical projection, with \c m33 as an additional projection factor. @@ -246,8 +246,10 @@ QTransform::QTransform() } /*! - Constructs a matrix with the elements, \a h11, \a h12, \a h13, - \a h21, \a h22, \a h23, \a h31, \a h32, \a h33. + \fn QTransform::QTransform(qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33) + + Constructs a matrix with the elements, \a m11, \a m12, \a m13, + \a m21, \a m22, \a m23, \a m31, \a m32, \a m33. \sa setMatrix() */ @@ -263,8 +265,9 @@ QTransform::QTransform(qreal h11, qreal h12, qreal h13, } /*! - Constructs a matrix with the elements, \a h11, \a h12, \a h21, \a - h22, \a dx and \a dy. + \fn QTransform::QTransform(qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy) + + Constructs a matrix with the elements, \a m11, \a m12, \a m21, \a m22, \a dx and \a dy. \sa setMatrix() */ -- cgit v0.12 From 1e2fdb56ce6025b34b88b1da1386f8c79464b412 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 30 Mar 2009 16:48:26 +0200 Subject: Doc: Synchronized the QTransform constructor arguments with the class documentation and updated a diagram. Task-number: 228201 Reviewed-by: TrustMe --- doc/src/images/qtransform-representation.png | Bin 17892 -> 17385 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/src/images/qtransform-representation.png b/doc/src/images/qtransform-representation.png index 2608872..883d5dc 100644 Binary files a/doc/src/images/qtransform-representation.png and b/doc/src/images/qtransform-representation.png differ -- cgit v0.12 From 87f1ea14ae7e245dd7589b1d992f67b0058ae1b5 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 30 Mar 2009 17:03:01 +0200 Subject: Doc: Fixed typo. Reviewed-by: TrustMe --- src/corelib/kernel/qmetatype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 4d7d309..ce10bae 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -1255,7 +1255,7 @@ void QMetaType::destroy(int type, void *data) \relates QMetaType \threadsafe - Registers the type name \a typeName to the type \c{T}. Returns + Registers the type name \a typeName for the type \c{T}. Returns the internal ID used by QMetaType. Any class or struct that has a public default constructor, a public copy constructor and a public destructor can be registered. -- cgit v0.12 From 577853b93dd4cf848abbd95abfed7e5a9d48688b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 30 Mar 2009 18:11:04 +0200 Subject: Doc: Added a code snippet to illustrate the opening of local files. Task-number: 223087 Reviewed-by: TrustMe --- doc/src/snippets/code/src_gui_util_qdesktopservices.cpp | 5 ++++- src/gui/util/qdesktopservices.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp index a9c630b..5001984 100644 --- a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp +++ b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp @@ -11,7 +11,10 @@ public slots: QDesktopServices::setUrlHandler("help", helpInstance, "showHelp"); //! [0] - //! [1] mailto:user@foo.com?subject=Test&body=Just a test //! [1] + +//! [2] +QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode)); +//! [2] diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 0fe1d69..84aa16e 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -157,6 +157,11 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser. + The following example opens a file on the Windows file system residing on a path + that contains spaces: + + \snippet doc/src/snippets/code/src_gui_util_qdesktopservices.cpp 2 + If a \c mailto URL is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL, similar to the way \c mailto links are handled by a Web browser. -- cgit v0.12 From 22ee1110301b228bbcbe9d39a9bcebe9ab4cdad0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 31 Mar 2009 14:55:33 +0200 Subject: Doc: Removed a reference to a deprecated function. Reported by a former Doc Manager. Reviewed-by: TrustMe --- src/gui/dialogs/qcolordialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index b744dca..3aa04f6 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -1523,10 +1523,10 @@ static const Qt::WindowFlags DefaultWindowFlags = If you require a modeless dialog, use the QColorDialog constructor. \endomit - The static getColor() function shows the dialog, and allows the - user to specify a color. The getRgba() function does the same, but - also allows the user to specify a color with an alpha channel - (transparency) value. + The static getColor() function shows the dialog, and allows the user to + specify a color. This function can also be used to let users choose a + color with a level of transparency: pass the ShowAlphaChannel option as + an additional argument. The user can store customCount() different custom colors. The custom colors are shared by all color dialogs, and remembered -- cgit v0.12 From 94c3e15e0fd04a178c319c2bc151b492a46380ee Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 31 Mar 2009 16:53:36 +0200 Subject: Doc: Clarified that the main use case for QRegion is as a clipping primitive not as a rendering primitive. Task-number: 183493 Reviewed-by: TrustMe --- src/gui/painting/qregion.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 8169ef8..c88af7c 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -65,9 +65,17 @@ QT_BEGIN_NAMESPACE \ingroup shared QRegion is used with QPainter::setClipRegion() to limit the paint - area to what needs to be painted. There is also a - QWidget::repaint() function that takes a QRegion parameter. - QRegion is the best tool for reducing flicker. + area to what needs to be painted. There is also a QWidget::repaint() + function that takes a QRegion parameter. QRegion is the best tool for + minimizing the amount of screen area to be updated by a repaint. + + This class is not suitable for constructing shapes for rendering, especially + as outlines. Use QPainterPath to create paths and shapes for use with + QPainter. + + QRegion is an \l{implicitly shared} class. + + \section1 Creating and Using Regions A region can be created from a rectangle, an ellipse, a polygon or a bitmap. Complex regions may be created by combining simple @@ -84,8 +92,6 @@ QT_BEGIN_NAMESPACE Example of using complex regions: \snippet doc/src/snippets/code/src_gui_painting_qregion.cpp 0 - QRegion is an \l{implicitly shared} class. - \warning Due to window system limitations, the whole coordinate space for a region is limited to the points between -32767 and 32767 on Windows 95/98/ME. You can circumvent this limitation by using a QPainterPath. @@ -93,7 +99,7 @@ QT_BEGIN_NAMESPACE \section1 Additional License Information On Embedded Linux, Windows CE and X11 platforms, parts of this class rely on - code obtained under the following license: + code obtained under the following licenses: \legalese Copyright (c) 1987 X Consortium @@ -120,9 +126,7 @@ QT_BEGIN_NAMESPACE in this Software without prior written authorization from the X Consortium. \endlegalese - \raw HTML -
- \endraw + \br \legalese Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. -- cgit v0.12 From cf4d9e09afc72dfb474b497a95c872965335e341 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 31 Mar 2009 17:35:33 +0200 Subject: Doc: Noted the difference between the qLowerBound() functions. Task-number: 160621 Reviewed-by: TrustMe --- doc/src/qalgorithms.qdoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/qalgorithms.qdoc b/doc/src/qalgorithms.qdoc index 459fb81..b33c250 100644 --- a/doc/src/qalgorithms.qdoc +++ b/doc/src/qalgorithms.qdoc @@ -490,7 +490,10 @@ of \a value in the variable passed as a reference in argument \a n. \overload - This is the same as qLowerBound(\a{container}.begin(), \a{container}.end(), value); + For read-only iteration over containers, this function is broadly equivalent to + qLowerBound(\a{container}.begin(), \a{container}.end(), value). However, since it + returns a const iterator, you cannot use it to modify the container; for example, + to insert items. */ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) -- cgit v0.12 From 93ca19a8ff7570606b4c01cfb9953921f897aa6e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 31 Mar 2009 17:38:40 +0200 Subject: Doc: Made it clearer that QProcess::start() only starts a new process if one is not already running. Task-number: 231513 Reviewed-by: TrustMe --- src/corelib/io/qprocess.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index a9d8ee2..18618fc 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1476,11 +1476,15 @@ QByteArray QProcess::readAllStandardError() } /*! - Starts the program \a program in a new process, passing the - command line arguments in \a arguments. The OpenMode is set to \a - mode. QProcess will immediately enter the Starting state. If the - process starts successfully, QProcess will emit started(); - otherwise, error() will be emitted. + Starts the program \a program in a new process, if one is not already + running, passing the command line arguments in \a arguments. The OpenMode + is set to \a mode. + + The QProcess object will immediately enter the Starting state. If the + process starts successfully, QProcess will emit started(); otherwise, + error() will be emitted. If the QProcess object is already running a + process, a warning may be printed at the console, and the existing + process will continue running. Note that arguments that contain spaces are not passed to the process as separate arguments. @@ -1577,10 +1581,10 @@ static QStringList parseCombinedArgString(const QString &program) /*! \overload - Starts the program \a program in a new process. \a program is a - single string of text containing both the program name and its - arguments. The arguments are separated by one or more - spaces. For example: + Starts the program \a program in a new process, if one is not already + running. \a program is a single string of text containing both the + program name and its arguments. The arguments are separated by one or + more spaces. For example: \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 5 @@ -1589,6 +1593,9 @@ static QStringList parseCombinedArgString(const QString &program) \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 6 + If the QProcess object is already running a process, a warning may be + printed at the console, and the existing process will continue running. + Note that, on Windows, quotes need to be both escaped and quoted. For example, the above code would be specified in the following way to ensure that \c{"My Documents"} is used as the argument to -- cgit v0.12 From 65c16391fff38e28e4a9db215758b1df6c868a32 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 31 Mar 2009 19:53:21 +0200 Subject: Doc: Fixed the screenshots and example description to match the code. Task-number: 242369 Reviewed-by: TrustMe --- doc/src/examples/extension.qdoc | 11 +++++------ doc/src/images/extension-example.png | Bin 7676 -> 9929 bytes doc/src/images/extension_more.png | Bin 9309 -> 13523 bytes 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc index 8a0ca3a..02e0698 100644 --- a/doc/src/examples/extension.qdoc +++ b/doc/src/examples/extension.qdoc @@ -80,9 +80,9 @@ user type a word to search for, we need several \l {QCheckBox}{QCheckBox}es to facilitate the search options, and we need three \l {QPushButton}{QPushButton}s: the \gui Find button to - start a search, the \gui More button to enable an advanced search, - and the \gui Close button to exit the application. Finally, we - need a QWidget representing the application's extension part. + start a search and the \gui More button to enable an advanced search. + Finally, we need a QWidget representing the application's extension + part. \section1 FindDialog Class Implementation @@ -128,8 +128,7 @@ the connection makes sure that the extension widget is shown depending on the state of \gui More button. - We also connect the \gui Close button to the QWidget::close() - slot, and we put the checkboxes associated with the advanced + We also put the check boxes associated with the advanced search options into a layout we install on the extension widget. \snippet examples/dialogs/extension/finddialog.cpp 4 @@ -137,7 +136,7 @@ Before we create the main layout, we create several child layouts for the widgets: First we allign the QLabel ans its buddy, the QLineEdit, using a QHBoxLayout. Then we vertically allign the - QLabel and QLineEdit with the checkboxes associated with the + QLabel and QLineEdit with the check boxes associated with the simple search, using a QVBoxLayout. We also create a QVBoxLayout for the buttons. In the end we lay out the two latter layouts and the extension widget using a QGridLayout. diff --git a/doc/src/images/extension-example.png b/doc/src/images/extension-example.png index dfaacc0..18fab52 100644 Binary files a/doc/src/images/extension-example.png and b/doc/src/images/extension-example.png differ diff --git a/doc/src/images/extension_more.png b/doc/src/images/extension_more.png index 2b06809..407af27 100644 Binary files a/doc/src/images/extension_more.png and b/doc/src/images/extension_more.png differ -- cgit v0.12 From 23174985c19c61fbce412965ecc1ba49c1cb5582 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Apr 2009 16:36:19 +0200 Subject: Doc: Minor language fixes and tidying. Reviewed-by: TrustMe --- doc/src/phonon-api.qdoc | 2 +- doc/src/phonon.qdoc | 2 +- doc/src/qnamespace.qdoc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc index 147ded3..3d04c68 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/phonon-api.qdoc @@ -2568,7 +2568,7 @@ details. Phonon also provides EffectWidget, which lets the user modify the - parameters of an effect an the fly, e.g., with comboboxes. + parameters of an effect an the fly; e.g., with combo boxes. \sa {Phonon Module}, EffectWidget */ diff --git a/doc/src/phonon.qdoc b/doc/src/phonon.qdoc index fa84b96..9470e61 100644 --- a/doc/src/phonon.qdoc +++ b/doc/src/phonon.qdoc @@ -49,7 +49,7 @@ \section1 Introduction Qt uses the Phonon multimedia framework to provide functionality - for playback of the most common multimedia formats.The media can + for playback of the most common multimedia formats. The media can be read from files or streamed over a network, using a QURL to a file. diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc index 6220795..e6a1a36 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/qnamespace.qdoc @@ -508,11 +508,11 @@ \value DirectConnection When emitted, the signal is immediately delivered to the slot. \value QueuedConnection When emitted, the signal is queued until the event loop is able to deliver it to the slot. - \value - BlockingQueuedConnection Same as QueuedConnection, except that the current thread blocks + \value BlockingQueuedConnection + Same as QueuedConnection, except that the current thread blocks until the slot has been delivered. This connection type should only be used for receivers in a different thread. Note that misuse - of this type can lead to dead locks in your application. + of this type can lead to deadlocks in your application. \value AutoConnection If the signal is emitted from the thread in which the receiving object lives, the slot is invoked directly, as with -- cgit v0.12 From 80293b874047c028e47d91d33c2afe157d9e6785 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Apr 2009 16:37:14 +0200 Subject: Doc: Trivial fixes. Reviewed-by: TrustMe --- src/corelib/global/qglobal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 1645279..8324d05 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2944,12 +2944,12 @@ bool QInternal::callFunction(InternalFunction func, void **args) Compares the floating point value \a p1 and \a p2 and returns \c true if they are considered equal, otherwise \c false. - + Note that comparing values where either \a p1 or \a p2 is 0.0 will not work. - The solution to this is to compare against values greater than or equal to 1.0 - + The solution to this is to compare against values greater than or equal to 1.0. + \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 46 - + The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are. */ -- cgit v0.12 From 244daeabfb55160387985d0ff3f057aa03d4d2da Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Apr 2009 16:38:15 +0200 Subject: Doc: Updated the deployment documentation with the QtScriptTools module and references to Phonon documentation. Task-number: 212939 Reviewed-by: TrustMe --- doc/src/deployment.qdoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc index 7e02f1a..d9f7c1a 100644 --- a/doc/src/deployment.qdoc +++ b/doc/src/deployment.qdoc @@ -91,7 +91,7 @@ The disadvantage with the shared library approach is that you will get more files to deploy. For more information, see \l{sharedlibrary.html}{Creating Shared Libraries}. - + \section1 Deploying Qt's Libraries \table @@ -111,13 +111,14 @@ \o \l {QtNetwork} \o \l {QtOpenGL} \o \l {QtScript} - \o \l {QtSql} + \o \l {QtScriptTools} \row + \o \l {QtSql} \o \l {QtSvg} \o \l {QtWebKit} \o \l {QtXml} - \o \l {QtXmlPatterns} \row + \o \l {QtXmlPatterns} \o \l {Phonon Module}{Phonon} \o \l {Qt3Support} \endtable @@ -178,11 +179,13 @@ Please see \l{QtWebKit Module#License Information}{the QtWebKit module documentation} for more information. - \row \o Phonon \o Phonon + \row \o \l{Phonon Module}{Phonon} \o Phonon \o Phonon relies on the native multimedia engines on different platforms. Phonon itself is licensed under the GNU LGPL version 2. Please see \l{Phonon Module#License Information}{the Phonon module documentation} - for more information. + for more information on licensing and the + \l{Phonon Overview#Backends}{Phonon Overview} for details of the backends + in use on different platforms. \endtable \section1 Platform-Specific Notes -- cgit v0.12 From 10d0536fd3b08a394c41de349e67325183328ec6 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Apr 2009 16:59:51 +0200 Subject: Doc: Clarified the usage of QImage::dotsPerMeterX() and QImage::dotsPerMeterY(). Task-number: 240164 Reviewed-by: Jan Erik Hanssen --- src/gui/image/qimage.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 558d574..dc236e4 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4937,10 +4937,12 @@ int QImage::dotsPerMeterY() const meter, to \a x. Together with dotsPerMeterY(), this number defines the intended - scale and aspect ratio of the image. + scale and aspect ratio of the image, and determines the scale + at which QPainter will draw graphics on the image. It does not + change the scale or aspect ratio of the image when it is rendered + on other paint devices. - \sa dotsPerMeterX(), {QImage#Image Information}{Image - Information} + \sa dotsPerMeterX(), {QImage#Image Information}{Image Information} */ void QImage::setDotsPerMeterX(int x) { @@ -4957,10 +4959,12 @@ void QImage::setDotsPerMeterX(int x) to \a y. Together with dotsPerMeterX(), this number defines the intended - scale and aspect ratio of the image. + scale and aspect ratio of the image, and determines the scale + at which QPainter will draw graphics on the image. It does not + change the scale or aspect ratio of the image when it is rendered + on other paint devices. - \sa dotsPerMeterY(), {QImage#Image Information}{Image - Information} + \sa dotsPerMeterY(), {QImage#Image Information}{Image Information} */ void QImage::setDotsPerMeterY(int y) { -- cgit v0.12 From 594bc93fc36e2d0aada9c11a7957db7fd4b11c15 Mon Sep 17 00:00:00 2001 From: Andre Haupt Date: Thu, 14 May 2009 04:34:01 +0200 Subject: doc: fix two typos in tthe style sheet documentation Signed-off-by: Andre Haupt --- doc/src/stylesheet.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/stylesheet.qdoc b/doc/src/stylesheet.qdoc index c0d13da..0f99688 100644 --- a/doc/src/stylesheet.qdoc +++ b/doc/src/stylesheet.qdoc @@ -398,7 +398,7 @@ (usually) refers to a single object, not to all instances of a class. - Similarly, selectors with pseudo-states are more specific that + Similarly, selectors with pseudo-states are more specific than ones that do not specify pseudo-states. Thus, the following style sheet specifies that a \l{QPushButton} should have white text when the mouse is hovering over it, otherwise red text: @@ -653,7 +653,7 @@ \target sub controls \section1 Sub-controls - A widget is considered as a heirarchy (tree) of subcontrols drawn on top + A widget is considered as a hierarchy (tree) of subcontrols drawn on top of each other. For example, the QComboBox draws the drop-down sub-control followed by the down-arrow sub-control. A QComboBox is thus rendered as follows: -- cgit v0.12 From dd20c403fa6ec99cf4aec02655a16a97320734c3 Mon Sep 17 00:00:00 2001 From: Andre Haupt Date: Thu, 14 May 2009 04:44:19 +0200 Subject: replace all occurences of "heirarchy" with "hierarchy" Signed-off-by: Andre Haupt --- src/corelib/io/qresource.cpp | 2 +- src/gui/widgets/qmenu_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index 779a742..3b704f6 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -449,7 +449,7 @@ QString QResource::absoluteFilePath() const } /*! - Returns true if the resource really exists in the resource heirarchy, + Returns true if the resource really exists in the resource hierarchy, false otherwise. */ diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index dddd83e..edfeee7 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -208,7 +208,7 @@ public: QString searchBuffer; QBasicTimer searchBufferTimer; - //passing of mouse events up the parent heirarchy + //passing of mouse events up the parent hierarchy QPointer activeMenu; bool mouseEventTaken(QMouseEvent *); -- cgit v0.12 From ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 12 May 2009 14:18:58 +0200 Subject: Makes the layout of many of the areas be in aligned columns to immensely increase readability Unfortunately the patch causes quite some regressions and I think some refectoring of this class would be needed. I didn't do that since there is no API docs, the variable naming is not very clarifying and the code is hard to read due to it not using the coding style and mixing tabs as well as spaces. --- tools/qdoc3/htmlgenerator.cpp | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 13d52bf..7702628 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2079,17 +2079,7 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela CodeMarker *marker, CodeMarker::SynopsisStyle style) { if (!section.members.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - twoColumn = (section.members.count() >= 16); - } else if (section.members.first()->type() == Node::Property) { - twoColumn = (section.members.count() >= 5); - } - if (twoColumn) - out() << "

\n" - << "
"; - out() << "
    \n"; + out() << "\n"; int i = 0; NodeList::ConstIterator m = section.members.begin(); @@ -2099,22 +2089,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela continue; } - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "\n"; i++; ++m; } - out() << "\n"; - if (twoColumn) - out() << "\n
      \n"; - - out() << "
    • "; + out() << "
    "; if (style == CodeMarker::Accessors) out() << ""; generateSynopsis(*m, relative, marker, style); if (style == CodeMarker::Accessors) out() << ""; - out() << "\n"; + out() << "

    \n"; + out() << "
\n"; } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -2129,7 +2114,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N { QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "

  • "; + out() << "
  • "; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2425,7 +2410,9 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" static const QString linkTag("link"); for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { + if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { + if (i != 0) + html += " "; i += 2; if (parseArg(src, linkTag, &i, n, &arg, &par1)) { QString link = linkForNode( -- cgit v0.12 From ef310a8cf2067a2fe21d6812cf34fb8aaad74f48 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 18 May 2009 15:40:51 +0200 Subject: Prevent a crash with brushed metal windows and a qApp style sheet My great metal hack simply needs to hack more and not do the "extra" assign since I'm doing this through a back door in set attribute. We probably should have had the brushed metal go via an actual QStyle subclass instead of through the attribute. Task-number: 253448 Reviewed-by: ogoffart --- src/gui/kernel/qwidget.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index d911b48..4cb9380 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2343,13 +2343,26 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool ) { Q_Q(QWidget); - createExtra(); - QStyle *oldStyle = q->style(); #ifndef QT_NO_STYLE_STYLESHEET - QStyle *origStyle = extra->style; + QStyle *origStyle = 0; +#endif + +#ifdef Q_WS_MAC + // the metalhack boolean allows Qt/Mac to do a proper re-polish depending + // on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever + // set when changing that attribute and passes the widget's CURRENT style. + // therefore no need to do a reassignment. + if (!metalHack) #endif - extra->style = newStyle; + { + createExtra(); + +#ifndef QT_NO_STYLE_STYLESHEET + origStyle = extra->style; +#endif + extra->style = newStyle; + } // repolish if (q->windowType() != Qt::Desktop) { -- cgit v0.12 From e5755e131952ab5c3c8dd0fd6a88dbaa7148898a Mon Sep 17 00:00:00 2001 From: Benjamin C Meyer Date: Wed, 29 Apr 2009 11:15:25 -0400 Subject: Fix QNetworkDiskCache to expire the oldest files first. When expiring cache files use a QMultiMap, when using a QMap not all files are put into the map because often many files (downloaded or updated at the same time) will have the same creation QDateTime and so only one will go into the QMap who's key is QDateTime. Reviewed-By: Thiago Macieira Reviewed-By: Peter Hartmann --- src/network/access/qnetworkdiskcache.cpp | 6 +++--- tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index 892929e..44a8298 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -494,21 +494,21 @@ qint64 QNetworkDiskCache::expire() QDir::Filters filters = QDir::AllDirs | QDir:: Files | QDir::NoDotAndDotDot; QDirIterator it(cacheDirectory(), filters, QDirIterator::Subdirectories); - QMap cacheItems; + QMultiMap cacheItems; qint64 totalSize = 0; while (it.hasNext()) { QString path = it.next(); QFileInfo info = it.fileInfo(); QString fileName = info.fileName(); if (fileName.endsWith(CACHE_POSTFIX) && fileName.startsWith(CACHE_PREFIX)) { - cacheItems[info.created()] = path; + cacheItems.insert(info.created(), path); totalSize += info.size(); } } int removedFiles = 0; qint64 goal = (maximumCacheSize() * 9) / 10; - QMap::const_iterator i = cacheItems.constBegin(); + QMultiMap::const_iterator i = cacheItems.constBegin(); while (i != cacheItems.constEnd()) { if (totalSize < goal) break; diff --git a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index fc15437..2383767 100644 --- a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -389,7 +389,8 @@ void tst_QNetworkDiskCache::expire() qint64 max = cache.maximumCacheSize(); QCOMPARE(max, limit); for (int i = 0; i < 10; ++i) { - QTest::qWait(2000); + if (i % 3 == 0) + QTest::qWait(2000); QNetworkCacheMetaData m; m.setUrl(QUrl("http://www.foo.com/" + QString::number(i))); QIODevice *d = cache.prepare(m); -- cgit v0.12 From d13162dd4695274dc4bdb286ce85bf198391d94b Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Mon, 11 May 2009 15:55:59 +0200 Subject: Fix some typos in the documentation. Usually, "the the" is not proper English Reviewed-By: Thiago Macieira --- doc/src/accessible.qdoc | 2 +- doc/src/deployment.qdoc | 2 +- doc/src/examples/codeeditor.qdoc | 2 +- doc/src/examples/containerextension.qdoc | 2 +- doc/src/examples/fortuneserver.qdoc | 2 +- doc/src/examples/ftp.qdoc | 4 ++-- doc/src/examples/icons.qdoc | 2 +- doc/src/examples/musicplayerexample.qdoc | 2 +- doc/src/examples/qobjectxmlmodel.qdoc | 2 +- doc/src/examples/tabdialog.qdoc | 2 +- doc/src/examples/tooltips.qdoc | 2 +- doc/src/examples/transformations.qdoc | 2 +- doc/src/examples/trollprint.qdoc | 2 +- doc/src/licenses.qdoc | 2 +- doc/src/mac-differences.qdoc | 2 +- doc/src/phonon-api.qdoc | 2 +- doc/src/q3valuelist.qdoc | 2 +- doc/src/qalgorithms.qdoc | 2 +- doc/src/qtdesigner.qdoc | 2 +- doc/src/qtscriptdebugger-manual.qdoc | 2 +- doc/src/stylesheet.qdoc | 8 ++++---- doc/src/tech-preview/known-issues.html | 2 +- doc/src/timers.qdoc | 4 ++-- doc/src/xquery-introduction.qdoc | 2 +- src/corelib/io/qsettings.cpp | 2 +- src/corelib/kernel/qtimer.cpp | 2 +- src/corelib/tools/qrect.cpp | 2 +- src/corelib/tools/qsize.cpp | 2 +- src/corelib/tools/qstringlist.cpp | 2 +- src/gui/embedded/qscreen_qws.cpp | 2 +- src/gui/graphicsview/qgraphicslayoutitem.cpp | 2 +- src/gui/graphicsview/qgraphicssceneevent.cpp | 14 +++++++------- src/gui/image/qicon.cpp | 2 +- src/gui/image/qimage.cpp | 2 +- src/gui/image/qpixmap.cpp | 2 +- src/gui/itemviews/qabstractitemview.cpp | 2 +- src/gui/itemviews/qlistwidget.cpp | 2 +- src/gui/kernel/qclipboard.cpp | 2 +- src/gui/kernel/qwidget.cpp | 2 +- src/gui/painting/qpainterpath.cpp | 2 +- src/gui/text/qfontdatabase_x11.cpp | 2 +- src/gui/text/qtextformat.cpp | 2 +- src/gui/util/qundostack.cpp | 2 +- src/gui/widgets/qlcdnumber.cpp | 2 +- src/gui/widgets/qlineedit.cpp | 2 +- src/gui/widgets/qmdiarea.cpp | 2 +- src/gui/widgets/qmenubar.cpp | 2 +- src/gui/widgets/qscrollarea.cpp | 2 +- src/gui/widgets/qsplitter.cpp | 2 +- src/gui/widgets/qtabwidget.cpp | 2 +- src/gui/widgets/qtoolbox.cpp | 2 +- src/network/access/qhttp.cpp | 2 +- src/network/kernel/qnetworkinterface.cpp | 2 +- src/network/socket/qabstractsocket.cpp | 2 +- src/opengl/qgl.cpp | 2 +- src/qt3support/network/q3http.cpp | 2 +- src/qt3support/network/q3urloperator.cpp | 2 +- src/qt3support/widgets/q3action.cpp | 2 +- src/qt3support/widgets/q3groupbox.cpp | 4 ++-- src/qt3support/widgets/q3popupmenu.cpp | 2 +- src/qt3support/widgets/q3progressbar.cpp | 2 +- src/qt3support/widgets/q3scrollview.cpp | 2 +- src/sql/kernel/qsqlquery.cpp | 2 +- src/xml/sax/qxml.cpp | 2 +- 64 files changed, 76 insertions(+), 76 deletions(-) diff --git a/doc/src/accessible.qdoc b/doc/src/accessible.qdoc index 090da86..ad9f4f1 100644 --- a/doc/src/accessible.qdoc +++ b/doc/src/accessible.qdoc @@ -527,7 +527,7 @@ on plugins, consult the plugins \l{How to Create Qt Plugins}{overview document}. - You can omit the the first macro unless you want the plugin + You can omit the first macro unless you want the plugin to be statically linked with the application. \section2 Implementing Interface Factories diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc index bcfa93d..446c91b 100644 --- a/doc/src/deployment.qdoc +++ b/doc/src/deployment.qdoc @@ -1247,7 +1247,7 @@ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 48 Then we update the source code in \c tools/plugandpaint/main.cpp - to look for the the new plugins. After constructing the + to look for the new plugins. After constructing the QApplication, we add the following code: \snippet doc/src/snippets/code/doc_src_deployment.qdoc 49 diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc index 669ab45..d218d0d 100644 --- a/doc/src/examples/codeeditor.qdoc +++ b/doc/src/examples/codeeditor.qdoc @@ -67,7 +67,7 @@ QTextEdit because it is optimized for handling plain text. See the QPlainTextEdit class description for details. - QPlainTextEdit lets us add selections in addition to the the + QPlainTextEdit lets us add selections in addition to the selection the user can make with the mouse or keyboard. We use this functionality to highlight the current line. More on this later. diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc index a4fbcea..6d29cf6 100644 --- a/doc/src/examples/containerextension.qdoc +++ b/doc/src/examples/containerextension.qdoc @@ -305,7 +305,7 @@ MultiPageWidget class \l {designer/containerextension/multipagewidget.cpp}{implementation}). Finally, we implicitly force an update of the page's property - sheet by calling the the + sheet by calling the QDesignerPropertySheetExtension::setChanged() function. \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 4 diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc index e6a7f85..848a3a3 100644 --- a/doc/src/examples/fortuneserver.qdoc +++ b/doc/src/examples/fortuneserver.qdoc @@ -45,7 +45,7 @@ The Fortune Server example shows how to create a server for a simple network service. It is intended to be run alongside the - \l{network/fortuneclient}{Fortune Client} example or the the + \l{network/fortuneclient}{Fortune Client} example or the \l{network/blockingfortuneclient}{Blocking Fortune Client} example. \image fortuneserver-example.png Screenshot of the Fortune Server example diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc index 9cc9cd1..7a74a37 100644 --- a/doc/src/examples/ftp.qdoc +++ b/doc/src/examples/ftp.qdoc @@ -172,7 +172,7 @@ no entries were found (in which case our \c addToList() function would not have been called). - Let's continue with the the \c addToList() slot: + Let's continue with the \c addToList() slot: \snippet examples/network/ftp/ftpwindow.cpp 10 @@ -190,7 +190,7 @@ \snippet examples/network/ftp/ftpwindow.cpp 12 - \c cdToParent() is invoked when the the user requests to go to the + \c cdToParent() is invoked when the user requests to go to the parent directory of the one displayed in the file list. After changing the directory, we QFtp::List its contents. diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc index 750ef2e..a81ddb9 100644 --- a/doc/src/examples/icons.qdoc +++ b/doc/src/examples/icons.qdoc @@ -479,7 +479,7 @@ QTableWidget::openPersistentEditor() function to create comboboxes for the mode and state columns of the items. - Due to the the connection between the table widget's \l + Due to the connection between the table widget's \l {QTableWidget::itemChanged()}{itemChanged()} signal and the \c changeIcon() slot, the new image is automatically converted into a pixmap and made part of the set of pixmaps available to the icon diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc index d23c1f1..9f04bf6 100644 --- a/doc/src/examples/musicplayerexample.qdoc +++ b/doc/src/examples/musicplayerexample.qdoc @@ -154,7 +154,7 @@ \snippet examples/phonon/musicplayer/mainwindow.cpp 5 - We move on to the the slots of \c MainWindow, starting with \c + We move on to the slots of \c MainWindow, starting with \c addFiles(): \snippet examples/phonon/musicplayer/mainwindow.cpp 6 diff --git a/doc/src/examples/qobjectxmlmodel.qdoc b/doc/src/examples/qobjectxmlmodel.qdoc index ce1dab6..37c66bc 100644 --- a/doc/src/examples/qobjectxmlmodel.qdoc +++ b/doc/src/examples/qobjectxmlmodel.qdoc @@ -71,7 +71,7 @@ The query engine can only traverse two dimensional trees, because an XML document is always a two dimensional tree. If we want to add the QMetaObject tree to the node model, we have to somehow flatten it - into the the same plane as the QObject tree. This requires that the + into the same plane as the QObject tree. This requires that the node model class must build an auxiliary data structure and make it part of the two dimensional QObject node model. How to do this is explained in \l{Including The QMetaObject Tree}. diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc index c9500af..5394b82 100644 --- a/doc/src/examples/tabdialog.qdoc +++ b/doc/src/examples/tabdialog.qdoc @@ -91,7 +91,7 @@ \snippet examples/dialogs/tabdialog/tabdialog.cpp 1 \snippet examples/dialogs/tabdialog/tabdialog.cpp 3 - We arrange the the tab widget above the buttons in the dialog: + We arrange the tab widget above the buttons in the dialog: \snippet examples/dialogs/tabdialog/tabdialog.cpp 4 diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc index 5daa2b2..78b350b 100644 --- a/doc/src/examples/tooltips.qdoc +++ b/doc/src/examples/tooltips.qdoc @@ -353,7 +353,7 @@ Whenever the user creates a new shape item, we want the new item to appear at a random position, and we use the \c randomItemPosition() function to calculate such a position. We - make sure that the item appears within the the visible area of the + make sure that the item appears within the visible area of the \c SortingBox widget, using the widget's current width and heigth when calculating the random coordinates. diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index eabb803..58c8b80 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -208,7 +208,7 @@ After transforming the coordinate system, we draw the \c RenderArea's shape, and then we restore the painter state using - the the QPainter::restore() function (i.e. popping the saved state off + the QPainter::restore() function (i.e. popping the saved state off the stack). \snippet examples/painting/transformations/renderarea.cpp 7 diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc index 38251ee..489012e 100644 --- a/doc/src/examples/trollprint.qdoc +++ b/doc/src/examples/trollprint.qdoc @@ -142,7 +142,7 @@ We can easily determine which file must be changed because the translator's "context" is in fact the class name for the class where the texts that must be changed appears. In this case the file is \c - printpanel.cpp, where the there are four lines to change. Add the + printpanel.cpp, where there are four lines to change. Add the second argument "two-sided" in the appropriate \c tr() calls to the first pair of radio buttons: diff --git a/doc/src/licenses.qdoc b/doc/src/licenses.qdoc index 1c3f6d2..a11c071 100644 --- a/doc/src/licenses.qdoc +++ b/doc/src/licenses.qdoc @@ -45,7 +45,7 @@ \ingroup licensing \brief Information about other licenses used for Qt components and third-party code. - Qt contains some code that is not provided under the the + Qt contains some code that is not provided under the \l{GNU General Public License (GPL)}, \l{GNU Lesser General Public License (LGPL)} or the \l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under diff --git a/doc/src/mac-differences.qdoc b/doc/src/mac-differences.qdoc index 573e62d..5849850 100644 --- a/doc/src/mac-differences.qdoc +++ b/doc/src/mac-differences.qdoc @@ -128,7 +128,7 @@ If you want to build a new dynamic library combining the Qt 4 dynamic libraries, you need to introduce the \c{ld -r} flag. Then - relocation information is stored in the the output file, so that + relocation information is stored in the output file, so that this file could be the subject of another \c ld run. This is done by setting the \c -r flag in the \c .pro file, and the \c LFLAGS settings. diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc index 501b5a5..dd37fe2 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/phonon-api.qdoc @@ -2973,7 +2973,7 @@ \value ToggledHint If this hint is set it means that - the the control has only two states: zero and non-zero + the control has only two states: zero and non-zero (see isToggleControl()). \value LogarithmicHint diff --git a/doc/src/q3valuelist.qdoc b/doc/src/q3valuelist.qdoc index be315c2..e3681af 100644 --- a/doc/src/q3valuelist.qdoc +++ b/doc/src/q3valuelist.qdoc @@ -108,7 +108,7 @@ pointing to the removed member become invalid. Inserting into the list does not invalidate any iterator. For convenience, the function last() returns a reference to the last item in the list, - and first() returns a reference to the the first item. If the + and first() returns a reference to the first item. If the list is empty(), both last() and first() have undefined behavior (your application will crash or do unpredictable things). Use last() and first() with caution, for example: diff --git a/doc/src/qalgorithms.qdoc b/doc/src/qalgorithms.qdoc index b33c250..90289f9 100644 --- a/doc/src/qalgorithms.qdoc +++ b/doc/src/qalgorithms.qdoc @@ -59,7 +59,7 @@ If STL is available on all your target platforms, you can use the STL algorithms instead of their Qt counterparts. One reason why - you might want to use the the STL algorithms is that STL provides + you might want to use the STL algorithms is that STL provides dozens and dozens of algorithms, whereas Qt only provides the most important ones, making no attempt to duplicate functionality that is already provided by the C++ standard. diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc index 7e3b619..9699c5b 100644 --- a/doc/src/qtdesigner.qdoc +++ b/doc/src/qtdesigner.qdoc @@ -632,7 +632,7 @@ /*! \fn void QDesignerContainerExtension::setCurrentIndex(int index) - Sets the the currently selected page in the container to be the + Sets the currently selected page in the container to be the page at the given \a index in the extension's list of pages. \sa currentIndex() diff --git a/doc/src/qtscriptdebugger-manual.qdoc b/doc/src/qtscriptdebugger-manual.qdoc index 3dfe879..75d87f8 100644 --- a/doc/src/qtscriptdebugger-manual.qdoc +++ b/doc/src/qtscriptdebugger-manual.qdoc @@ -367,7 +367,7 @@ \section3 continue Continues execution normally, i.e, gives the execution control over - the script back the the QScriptEngine. + the script back to the QScriptEngine. \section3 eval diff --git a/doc/src/stylesheet.qdoc b/doc/src/stylesheet.qdoc index f895918..46ec041 100644 --- a/doc/src/stylesheet.qdoc +++ b/doc/src/stylesheet.qdoc @@ -332,7 +332,7 @@ respect to the reference element. Once positioned, they are treated the same as widgets and can be styled - using the the \l{box model}. + using the \l{box model}. See the \l{List of Sub-Controls} below for a list of supported sub-controls, and \l{Customizing the QPushButton's Menu Indicator @@ -671,7 +671,7 @@ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin} properties. - Once positioned, sub-controls can be styled using the the \l{box model}. + Once positioned, sub-controls can be styled using the \l{box model}. \note With complex widgets such as QComboBox and QScrollBar, if one property or sub-control is customized, \bold{all} the other properties or @@ -1154,7 +1154,7 @@ \l{#pane-sub}{::pane} subcontrol. The left and right corners are styled using the \l{#left-corner-sub}{::left-corner} and \l{#right-corner-sub}{::right-corner} respectively. - The position of the the tab bar is controlled using the + The position of the tab bar is controlled using the \l{#tab-bar-sub}{::tab-bar} subcontrol. By default, the subcontrols have positions of a QTabWidget in @@ -1254,7 +1254,7 @@ the \l{#menu-button-sub}{::menu-button} subcontrol is used to draw the menu button. \l{#menu-arrow-sub}{::menu-arrow} subcontrol is used to draw the menu arrow inside the menu-button. By default, it is - positioned in the center of the Contents rectangle of the the + positioned in the center of the Contents rectangle of the menu-button subcontrol. When the QToolButton displays arrows, the \l{#up-arrow-sub}{::up-arrow}, diff --git a/doc/src/tech-preview/known-issues.html b/doc/src/tech-preview/known-issues.html index 05df69e..885104e 100644 --- a/doc/src/tech-preview/known-issues.html +++ b/doc/src/tech-preview/known-issues.html @@ -16,7 +16,7 @@

    Known Issues: Qt 4.0.0 Technology Preview 1

    - This is the list of known and reported issues for the the Qt 4.0.0 + This is the list of known and reported issues for the Qt 4.0.0 Technology Preview 1. This list is updated daily.



    diff --git a/doc/src/timers.qdoc b/doc/src/timers.qdoc index 4f54343..1b48d7d 100644 --- a/doc/src/timers.qdoc +++ b/doc/src/timers.qdoc @@ -62,7 +62,7 @@ In multithreaded applications, you can use the timer mechanism in any thread that has an event loop. To start an event loop from a - non-GUI thread, use QThread::exec(). Qt uses the the object's + non-GUI thread, use QThread::exec(). Qt uses the object's \l{QObject::thread()}{thread affinity} to determine which thread will deliver the QTimerEvent. Because of this, you must start and stop all timers in the object's thread; it is not possible to @@ -105,7 +105,7 @@ In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI - thread, use QThread::exec(). Qt uses the the timer's + thread, use QThread::exec(). Qt uses the timer's \l{QObject::thread()}{thread affinity} to determine which thread will emit the \l{QTimer::}{timeout()} signal. Because of this, you must start and stop the timer in its thread; it is not possible to diff --git a/doc/src/xquery-introduction.qdoc b/doc/src/xquery-introduction.qdoc index 37a45ac..fe541e2 100644 --- a/doc/src/xquery-introduction.qdoc +++ b/doc/src/xquery-introduction.qdoc @@ -347,7 +347,7 @@ has a more detailed section on the shorthand form, which it calls the \l{http://www.w3.org/TR/xquery/#abbrev} {abbreviated syntax}. More examples of path expressions written in the shorthand form are found there. There is also a section listing examples of path expressions -written in the the \l{http://www.w3.org/TR/xquery/#unabbrev} {longhand +written in the \l{http://www.w3.org/TR/xquery/#unabbrev} {longhand form}. \target Name Tests diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 484e79a..14fc2d4 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -2295,7 +2295,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, As mentioned in the \l{Fallback Mechanism} section, QSettings stores settings for an application in up to four locations, depending on whether the settings are user-specific or - system-wide and whether the the settings are application-specific + system-wide and whether the settings are application-specific or organization-wide. For simplicity, we're assuming the organization is called MySoft and the application is called Star Runner. diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 01e81ab..4b3feb0 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI - thread, use QThread::exec(). Qt uses the the timer's + thread, use QThread::exec(). Qt uses the timer's \l{QObject::thread()}{thread affinity} to determine which thread will emit the \l{QTimer::}{timeout()} signal. Because of this, you must start and stop the timer in its thread; it is not possible to diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index 3930a0d..5602170 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -901,7 +901,7 @@ void QRect::moveCenter(const QPoint &p) /*! \fn bool QRect::contains(const QPoint &point, bool proper) const - Returns true if the the given \a point is inside or on the edge of + Returns true if the given \a point is inside or on the edge of the rectangle, otherwise returns false. If \a proper is true, this function only returns true if the given \a point is \e inside the rectangle (i.e., not on the edge). diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp index 76a5484..bbf6c2a 100644 --- a/src/corelib/tools/qsize.cpp +++ b/src/corelib/tools/qsize.cpp @@ -781,7 +781,7 @@ void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) \fn QDataStream &operator<<(QDataStream &stream, const QSizeF &size) \relates QSizeF - Writes the the given \a size to the given \a stream and returns a + Writes the given \a size to the given \a stream and returns a reference to the stream. \sa {Format of the QDataStream Operators} diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index 386321f1..e22f122 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -397,7 +397,7 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r \fn QString QStringList::join(const QString &separator) const Joins all the string list's strings into a single string with each - element separated by the the given \a separator (which can be an + element separated by the given \a separator (which can be an empty string). \sa QString::split() diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp index 6741f2c..39a74d5 100644 --- a/src/gui/embedded/qscreen_qws.cpp +++ b/src/gui/embedded/qscreen_qws.cpp @@ -1394,7 +1394,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const altered. Note that the default implementations of these functions do nothing. - Reimplement the the mapFromDevice() and mapToDevice() functions to + Reimplement the mapFromDevice() and mapToDevice() functions to map objects from the framebuffer coordinate system to the coordinate space used by the application, and vice versa. Be aware that the default implementations simply return the given objects diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index eaa97ff..b46e05e 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -255,7 +255,7 @@ QGraphicsItem *QGraphicsLayoutItemPrivate::parentItem() const passing a QGraphicsLayoutItem pointer to QGraphicsLayoutItem's protected constructor, or by calling setParentLayoutItem(). The parentLayoutItem() function returns a pointer to the item's layoutItem - parent. If the item's parent is 0 or if the the parent does not inherit + parent. If the item's parent is 0 or if the parent does not inherit from QGraphicsItem, the parentLayoutItem() function then returns 0. isLayout() returns true if the QGraphicsLayoutItem subclass is itself a layout, or false otherwise. diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp index b819c2c..0ffd2b1 100644 --- a/src/gui/graphicsview/qgraphicssceneevent.cpp +++ b/src/gui/graphicsview/qgraphicssceneevent.cpp @@ -844,7 +844,7 @@ QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent() /*! Returns the position of the mouse cursor in item coordinates at the moment - the the context menu was requested. + the context menu was requested. \sa scenePos(), screenPos() */ @@ -992,7 +992,7 @@ QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent() /*! Returns the position of the mouse cursor in item coordinates at the moment - the the hover event was sent. + the hover event was sent. \sa scenePos(), screenPos() */ @@ -1017,7 +1017,7 @@ void QGraphicsSceneHoverEvent::setPos(const QPointF &pos) /*! Returns the position of the mouse cursor in scene coordinates at the - moment the the hover event was sent. + moment the hover event was sent. \sa pos(), screenPos() */ @@ -1042,7 +1042,7 @@ void QGraphicsSceneHoverEvent::setScenePos(const QPointF &pos) /*! Returns the position of the mouse cursor in screen coordinates at the - moment the the hover event was sent. + moment the hover event was sent. \sa pos(), scenePos() */ @@ -1138,7 +1138,7 @@ void QGraphicsSceneHoverEvent::setLastScreenPos(const QPoint &pos) /*! \since 4.4 - Returns the keyboard modifiers at the moment the the hover event was sent. + Returns the keyboard modifiers at the moment the hover event was sent. */ Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers() const { @@ -1184,7 +1184,7 @@ QGraphicsSceneHelpEvent::~QGraphicsSceneHelpEvent() /*! Returns the position of the mouse cursor in scene coordinates at the - moment the the help event was sent. + moment the help event was sent. \sa screenPos() */ @@ -1209,7 +1209,7 @@ void QGraphicsSceneHelpEvent::setScenePos(const QPointF &pos) /*! Returns the position of the mouse cursor in screen coordinates at the - moment the the help event was sent. + moment the help event was sent. \sa scenePos() */ diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 53430ab..a880a13 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -922,7 +922,7 @@ QList QIcon::availableSizes(Mode mode, State state) const \relates QIcon \since 4.2 - Writes the given \a icon to the the given \a stream as a PNG + Writes the given \a icon to the given \a stream as a PNG image. If the icon contains more than one image, all images will be written to the stream. Note that writing the stream to a file will not produce a valid image file. diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index c7a20db..70d4e2c 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4996,7 +4996,7 @@ QPoint QImage::offset() const /*! \fn void QImage::setOffset(const QPoint& offset) - Sets the the number of pixels by which the image is intended to be + Sets the number of pixels by which the image is intended to be offset by when positioning relative to other images, to \a offset. \sa offset(), {QImage#Image Information}{Image Information} diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index efb8260..0f6b649 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1232,7 +1232,7 @@ bool QPixmap::convertFromImage(const QImage &image, ColorMode mode) /*! \relates QPixmap - Writes the given \a pixmap to the the given \a stream as a PNG + Writes the given \a pixmap to the given \a stream as a PNG image. Note that writing the stream to a file will not produce a valid image file. diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 83e05b4..7a3d674 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1338,7 +1338,7 @@ QSize QAbstractItemView::iconSize() const /*! \property QAbstractItemView::textElideMode - \brief the the position of the "..." in elided text. + \brief the position of the "..." in elided text. The default value for all item views is Qt::ElideRight. */ diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp index 7a366d1..bf3b43c 100644 --- a/src/gui/itemviews/qlistwidget.cpp +++ b/src/gui/itemviews/qlistwidget.cpp @@ -1158,7 +1158,7 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft, /*! \fn void QListWidget::addItem(QListWidgetItem *item) - Inserts the \a item at the the end of the list widget. + Inserts the \a item at the end of the list widget. \warning A QListWidgetItem can only be added to a QListWidget once. Adding the same QListWidgetItem multiple diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp index 917b5d5..bab3449 100644 --- a/src/gui/kernel/qclipboard.cpp +++ b/src/gui/kernel/qclipboard.cpp @@ -466,7 +466,7 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode) The \a mode argument is used to control which part of the system clipboard is used. If \a mode is QClipboard::Clipboard, this - function clears the the global clipboard contents. If \a mode is + function clears the global clipboard contents. If \a mode is QClipboard::Selection, this function clears the global mouse selection contents. If \a mode is QClipboard::FindBuffer, this function clears the search string buffer. diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 4cb9380..bbf6758 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6282,7 +6282,7 @@ QByteArray QWidget::saveGeometry() const returns false. If the restored geometry is off-screen, it will be modified to be - inside the the available screen geometry. + inside the available screen geometry. To restore geometry saved using QSettings, you can use code like this: diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index e1f5eea..9ce16d3 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1006,7 +1006,7 @@ void QPainterPath::addPolygon(const QPolygonF &polygon) /*! \fn void QPainterPath::addEllipse(const QRectF &boundingRectangle) - Creates an ellipse within the the specified \a boundingRectangle + Creates an ellipse within the specified \a boundingRectangle and adds it to the painter path as a closed subpath. The ellipse is composed of a clockwise curve, starting and diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index 15e626e..70e1599 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -494,7 +494,7 @@ static inline bool isFixedPitch(char **tokens) Fills in a font definition (QFontDef) from an XLFD (X Logical Font Description). - Returns true if the the given xlfd is valid. + Returns true if the given xlfd is valid. */ bool qt_fillFontDef(const QByteArray &xlfd, QFontDef *fd, int dpi, QtFontDesc *desc) { diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 21bfc4d..38ac4ca 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -1449,7 +1449,7 @@ void QTextCharFormat::setUnderlineStyle(UnderlineStyle style) /*! \since 4.5 \fn bool QTextCharFormat::fontKerning() const - Returns true if the the font kerning is enabled. + Returns true if the font kerning is enabled. \sa setFontKerning() \sa font() diff --git a/src/gui/util/qundostack.cpp b/src/gui/util/qundostack.cpp index 11f65e3..a6b9c23 100644 --- a/src/gui/util/qundostack.cpp +++ b/src/gui/util/qundostack.cpp @@ -715,7 +715,7 @@ int QUndoStack::index() const } /*! - Repeatedly calls undo() or redo() until the the current command index reaches + Repeatedly calls undo() or redo() until the current command index reaches \a idx. This function can be used to roll the state of the document forwards of backwards. indexChanged() is emitted only once. diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp index 0136f1a..af80963 100644 --- a/src/gui/widgets/qlcdnumber.cpp +++ b/src/gui/widgets/qlcdnumber.cpp @@ -1271,7 +1271,7 @@ bool QLCDNumber::event(QEvent *e) /*! \fn int QLCDNumber::margin() const - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. Use QWidget::getContentsMargins() instead. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index b03df9e..b76d019 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -3673,7 +3673,7 @@ void QLineEditPrivate::redo() { /*! \fn int QLineEdit::margin() const - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. Use QWidget::getContentsMargins() instead. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp index 598d3b5..6acd977 100644 --- a/src/gui/widgets/qmdiarea.cpp +++ b/src/gui/widgets/qmdiarea.cpp @@ -81,7 +81,7 @@ subwindows. This information could be used in a popup menu containing a list of windows, for example. - The subwindows are sorted by the the current + The subwindows are sorted by the current \l{QMdiArea::}{WindowOrder}. This is used for the subWindowList() and for activateNextSubWindow() and acivatePreviousSubWindow(). Also, it is used when cascading or tiling the windows with diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index ccf37db..c63da64 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -2379,7 +2379,7 @@ int QMenuBar::findIdForAction(QAction *act) const /*! \fn int QMenuBar::margin() const - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. Use QWidget::getContentsMargins() instead. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/gui/widgets/qscrollarea.cpp b/src/gui/widgets/qscrollarea.cpp index 6aca7d3..8b01453 100644 --- a/src/gui/widgets/qscrollarea.cpp +++ b/src/gui/widgets/qscrollarea.cpp @@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE setting the layout's \l{QLayout::sizeConstraint}{size constraint} property to one which provides constraints on the minimum and/or maximum size of the layout (e.g., QLayout::SetMinAndMaxSize) will - cause the size of the the scroll area to be updated whenever the + cause the size of the scroll area to be updated whenever the contents of the layout changes. For a complete example using the QScrollArea class, see the \l diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp index bf8af35..45e838f 100644 --- a/src/gui/widgets/qsplitter.cpp +++ b/src/gui/widgets/qsplitter.cpp @@ -1517,7 +1517,7 @@ void QSplitter::setOpaqueResize(bool on) /*! \fn int QSplitter::margin() const - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. Use QWidget::getContentsMargins() instead. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp index c16e000..43b2f54 100644 --- a/src/gui/widgets/qtabwidget.cpp +++ b/src/gui/widgets/qtabwidget.cpp @@ -504,7 +504,7 @@ QIcon QTabWidget::tabIcon(int index) const } /*! - Returns true if the the page at position \a index is enabled; otherwise returns false. + Returns true if the page at position \a index is enabled; otherwise returns false. \sa setTabEnabled(), QWidget::isEnabled() */ diff --git a/src/gui/widgets/qtoolbox.cpp b/src/gui/widgets/qtoolbox.cpp index 81935a5..271130a 100644 --- a/src/gui/widgets/qtoolbox.cpp +++ b/src/gui/widgets/qtoolbox.cpp @@ -802,7 +802,7 @@ void QToolBox::itemRemoved(int index) /*! \fn int QToolBox::margin() const - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. Use QWidget::getContentsMargins() instead. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp index 96ccc91..7d14ab6 100644 --- a/src/network/access/qhttp.cpp +++ b/src/network/access/qhttp.cpp @@ -950,7 +950,7 @@ void QHttpHeader::setContentLength(int len) } /*! - Returns true if the header has an entry for the the special HTTP + Returns true if the header has an entry for the special HTTP header field \c content-type; otherwise returns false. \sa contentType() setContentType() diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 670745b..960999e 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -397,7 +397,7 @@ QNetworkInterface::~QNetworkInterface() } /*! - Creates a copy of the the QNetworkInterface object contained in \a + Creates a copy of the QNetworkInterface object contained in \a other. */ QNetworkInterface::QNetworkInterface(const QNetworkInterface &other) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index f9750f2..336a7e7 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -1127,7 +1127,7 @@ bool QAbstractSocketPrivate::readFromSocket() /*! \internal - Sets up the the internal state after the connection has succeeded. + Sets up the internal state after the connection has succeeded. */ void QAbstractSocketPrivate::fetchConnectionParameters() { diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 04bc611..8f963f8 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2588,7 +2588,7 @@ const QGLContext* QGLContext::currentContext() \i paintGL() - Renders the OpenGL scene. Gets called whenever the widget needs to be updated. \i resizeGL() - Sets up the OpenGL viewport, projection, etc. Gets - called whenever the the widget has been resized (and also when it + called whenever the widget has been resized (and also when it is shown for the first time because all newly created widgets get a resize event automatically). \i initializeGL() - Sets up the OpenGL rendering context, defines display diff --git a/src/qt3support/network/q3http.cpp b/src/qt3support/network/q3http.cpp index f1590a6..591b381 100644 --- a/src/qt3support/network/q3http.cpp +++ b/src/qt3support/network/q3http.cpp @@ -626,7 +626,7 @@ void Q3HttpHeader::setContentLength( int len ) } /*! - Returns true if the header has an entry for the the special HTTP + Returns true if the header has an entry for the special HTTP header field \c content-type; otherwise returns false. \sa contentType() setContentType() diff --git a/src/qt3support/network/q3urloperator.cpp b/src/qt3support/network/q3urloperator.cpp index 3f334a8..b415e12 100644 --- a/src/qt3support/network/q3urloperator.cpp +++ b/src/qt3support/network/q3urloperator.cpp @@ -543,7 +543,7 @@ const Q3NetworkOperation *Q3UrlOperator::rename( const QString &oldname, const Q in mind that the get() and put() operations emit this signal through the Q3UrlOperator. The number of transferred bytes and the total bytes that you receive as arguments in this signal do not - relate to the the whole copy operation; they relate first to the + relate to the whole copy operation; they relate first to the get() and then to the put() operation. Always check what type of operation the signal comes from; this is given in the signal's last argument. diff --git a/src/qt3support/widgets/q3action.cpp b/src/qt3support/widgets/q3action.cpp index 4e1a1bf..311212a 100644 --- a/src/qt3support/widgets/q3action.cpp +++ b/src/qt3support/widgets/q3action.cpp @@ -497,7 +497,7 @@ Q3Action::Q3Action(const QIcon& icon, const QString& menuText, QKeySequence acce } /*! - This constructor results in an icon-less action with the the menu + This constructor results in an icon-less action with the menu text \a menuText and keyboard accelerator \a accel. It is a child of \a parent and called \a name. diff --git a/src/qt3support/widgets/q3groupbox.cpp b/src/qt3support/widgets/q3groupbox.cpp index 1fa7e7c..e0b609a 100644 --- a/src/qt3support/widgets/q3groupbox.cpp +++ b/src/qt3support/widgets/q3groupbox.cpp @@ -382,7 +382,7 @@ int Q3GroupBox::insideSpacing() const } /*! - Sets the the width of the inside margin to \a m pixels. + Sets the width of the inside margin to \a m pixels. \sa insideMargin() */ @@ -954,7 +954,7 @@ int Q3GroupBox::frameWidth() const \fn int Q3GroupBox::margin() const \since 4.2 - Returns the width of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. This function uses QWidget::getContentsMargins() to get the margin. diff --git a/src/qt3support/widgets/q3popupmenu.cpp b/src/qt3support/widgets/q3popupmenu.cpp index 7f890b5..0b3a524 100644 --- a/src/qt3support/widgets/q3popupmenu.cpp +++ b/src/qt3support/widgets/q3popupmenu.cpp @@ -134,7 +134,7 @@ QT_BEGIN_NAMESPACE \fn int Q3PopupMenu::margin() const \since 4.2 - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. This function uses QWidget::getContentsMargins() to get the margin. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/qt3support/widgets/q3progressbar.cpp b/src/qt3support/widgets/q3progressbar.cpp index caae460..81f0dbf 100644 --- a/src/qt3support/widgets/q3progressbar.cpp +++ b/src/qt3support/widgets/q3progressbar.cpp @@ -455,7 +455,7 @@ void Q3ProgressBar::paintEvent(QPaintEvent *) \fn int Q3ProgressBar::margin() const \since 4.2 - Returns the with of the the margin around the contents of the widget. + Returns the width of the margin around the contents of the widget. This function uses QWidget::getContentsMargins() to get the margin. \sa setMargin(), QWidget::getContentsMargins() diff --git a/src/qt3support/widgets/q3scrollview.cpp b/src/qt3support/widgets/q3scrollview.cpp index 91a9203..5a91027 100644 --- a/src/qt3support/widgets/q3scrollview.cpp +++ b/src/qt3support/widgets/q3scrollview.cpp @@ -2038,7 +2038,7 @@ void Q3ScrollView::center(int x, int y) \list \i Margin 0.0 allows (x, y) to be on the edge of the visible area. \i Margin 0.5 ensures that (x, y) is in middle 50% of the visible area. - \i Margin 1.0 ensures that (x, y) is in the center of the the visible area. + \i Margin 1.0 ensures that (x, y) is in the center of the visible area. \endlist */ void Q3ScrollView::center(int x, int y, float xmargin, float ymargin) diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index e6729a5..2a07e28 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -1195,7 +1195,7 @@ void QSqlQuery::finish() The query will be repositioned on an \e invalid record in the new result set and must be navigated to a valid record before data values can be retrieved. If a new result set isn't available the - function returns false and the the query is set to inactive. In any + function returns false and the query is set to inactive. In any case the old result set will be discarded. When one of the statements is a non-select statement a count of diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index c78d4ba..ade0339 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -2107,7 +2107,7 @@ events are reported. You can set the lexical handler with QXmlReader::setLexicalHandler(). - This interface's design is based on the the SAX2 extension + This interface's design is based on the SAX2 extension LexicalHandler. The interface provides the startDTD(), endDTD(), startEntity(), -- cgit v0.12 From d76c5fb7feda66621b435263353f49e9b4b34308 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 14 May 2009 18:30:57 +0200 Subject: Fix handling of dynamic casts in QSharedPointer. It's wrong to assume that static_cast<> is allowed everywhere where dynamic_cast<> is allowed. For example, if class C derives from both A and B, then you can dynamic_cast(ptr_to_A), but you can't static_cast. So introduce a helper for dynamic casts that doesn't do static_cast. Reviewed-by: Olivier Goffart --- src/corelib/tools/qsharedpointer_impl.h | 21 ++-- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 137 +++++++++++++++++++++-- 2 files changed, 140 insertions(+), 18 deletions(-) diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index f1b35ee..ad2d9f2 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -238,6 +238,7 @@ namespace QtSharedPointer { template friend class ExternalRefCount; template friend class QWeakPointer; template friend QSharedPointer qSharedPointerCastHelper(const QSharedPointer &src, X *); + template friend QSharedPointer qSharedPointerDynamicCastHelper(const QSharedPointer &src, X *); template friend QSharedPointer qSharedPointerConstCastHelper(const QSharedPointer &src, X *); template friend QSharedPointer QtSharedPointer::qStrongRefFromWeakHelper(const QWeakPointer &src, X *); #endif @@ -509,6 +510,14 @@ namespace QtSharedPointer { return result; } template + Q_INLINE_TEMPLATE QSharedPointer qSharedPointerDynamicCastHelper(const QSharedPointer &src, X *) + { + QSharedPointer result; + register T *ptr = src.data(); + result.internalSet(src.d, dynamic_cast(ptr)); + return result; + } + template Q_INLINE_TEMPLATE QSharedPointer qSharedPointerConstCastHelper(const QSharedPointer &src, X *) { QSharedPointer result; @@ -544,9 +553,7 @@ template Q_INLINE_TEMPLATE QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &src) { X *x = 0; - if (QtSharedPointer::qVerifyDynamicCast(src.data(), x)) - return QtSharedPointer::qSharedPointerCastHelper(src, x); - return QSharedPointer(); + return QtSharedPointer::qSharedPointerDynamicCastHelper(src, x); } template Q_INLINE_TEMPLATE QSharedPointer qSharedPointerDynamicCast(const QWeakPointer &src) @@ -558,17 +565,13 @@ template Q_INLINE_TEMPLATE QSharedPointer qSharedPointerConstCast(const QSharedPointer &src) { X *x = 0; - if (QtSharedPointer::qVerifyConstCast(src.data(), x)) - return QtSharedPointer::qSharedPointerConstCastHelper(src, x); - return QSharedPointer(); + return QtSharedPointer::qSharedPointerConstCastHelper(src, x); } template Q_INLINE_TEMPLATE QSharedPointer qSharedPointerConstCast(const QWeakPointer &src) { X *x = 0; - if (QtSharedPointer::qVerifyConstCast(src.data(), x)) - return QtSharedPointer::qSharedPointerCastHelper(src, x); - return QSharedPointer(); + return QtSharedPointer::qSharedPointerConstCastHelper(src, x); } template diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 64439fb..a52bb3e 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -57,8 +57,11 @@ private slots: void downCast(); void upCast(); void differentPointers(); + void virtualBaseDifferentPointers(); #ifndef QTEST_NO_RTTI void dynamicCast(); + void dynamicCastDifferentPointers(); + void dynamicCastVirtualBase(); void dynamicCastFailure(); #endif void customDeleter(); @@ -321,6 +324,10 @@ class DiffPtrDerivedData: public Stuffing, public Data { }; +class VirtualDerived: virtual public Data +{ +}; + void tst_QSharedPointer::downCast() { { @@ -439,7 +446,7 @@ void tst_QSharedPointer::differentPointers() DiffPtrDerivedData *aData = new DiffPtrDerivedData; Data *aBase = aData; Q_ASSERT(aData == aBase); - Q_ASSERT(quintptr(&aData) != quintptr(&aBase)); + Q_ASSERT(*reinterpret_cast(&aData) != *reinterpret_cast(&aBase)); QSharedPointer baseptr = QSharedPointer(aData); QSharedPointer ptr = qSharedPointerCast(baseptr); @@ -453,7 +460,7 @@ void tst_QSharedPointer::differentPointers() DiffPtrDerivedData *aData = new DiffPtrDerivedData; Data *aBase = aData; Q_ASSERT(aData == aBase); - Q_ASSERT(quintptr(&aData) != quintptr(&aBase)); + Q_ASSERT(*reinterpret_cast(&aData) != *reinterpret_cast(&aBase)); QSharedPointer ptr = QSharedPointer(aData); QSharedPointer baseptr = ptr; @@ -464,23 +471,53 @@ void tst_QSharedPointer::differentPointers() QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } +} + +void tst_QSharedPointer::virtualBaseDifferentPointers() +{ + { + VirtualDerived *aData = new VirtualDerived; + Data *aBase = aData; + Q_ASSERT(aData == aBase); + Q_ASSERT(*reinterpret_cast(&aData) != *reinterpret_cast(&aBase)); + + QSharedPointer ptr = QSharedPointer(aData); + QSharedPointer baseptr = qSharedPointerCast(ptr); + QVERIFY(ptr == baseptr); + QVERIFY(ptr.data() == baseptr.data()); + QVERIFY(ptr == aBase); + QVERIFY(ptr == aData); + QVERIFY(baseptr == aData); + QVERIFY(baseptr == aBase); + } + + { + VirtualDerived *aData = new VirtualDerived; + Data *aBase = aData; + Q_ASSERT(aData == aBase); + Q_ASSERT(*reinterpret_cast(&aData) != *reinterpret_cast(&aBase)); - // there is no possibility for different pointers in - // internal reference counting right now - // - // to do that, it's necessary to first implement the ability to - // call (virtual) functions, so that the two differing bases have - // the same reference counter + QSharedPointer ptr = QSharedPointer(aData); + QSharedPointer baseptr = ptr; + QVERIFY(ptr == baseptr); + QVERIFY(ptr.data() == baseptr.data()); + QVERIFY(ptr == aBase); + QVERIFY(ptr == aData); + QVERIFY(baseptr == aData); + QVERIFY(baseptr == aBase); + } } #ifndef QTEST_NO_RTTI void tst_QSharedPointer::dynamicCast() { - QSharedPointer baseptr = QSharedPointer(new DerivedData); + DerivedData *aData = new DerivedData; + QSharedPointer baseptr = QSharedPointer(aData); { QSharedPointer derivedptr = qSharedPointerDynamicCast(baseptr); QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); } QCOMPARE(int(baseptr.d->weakref), 1); @@ -490,6 +527,7 @@ void tst_QSharedPointer::dynamicCast() QWeakPointer weakptr = baseptr; QSharedPointer derivedptr = qSharedPointerDynamicCast(weakptr); QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); } QCOMPARE(int(baseptr.d->weakref), 1); @@ -498,6 +536,87 @@ void tst_QSharedPointer::dynamicCast() { QSharedPointer derivedptr = baseptr.dynamicCast(); QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); +} + +void tst_QSharedPointer::dynamicCastDifferentPointers() +{ + // DiffPtrDerivedData derives from both Data and Stuffing + DiffPtrDerivedData *aData = new DiffPtrDerivedData; + QSharedPointer baseptr = QSharedPointer(aData); + + { + QSharedPointer derivedptr = qSharedPointerDynamicCast(baseptr); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); + + { + QWeakPointer weakptr = baseptr; + QSharedPointer derivedptr = qSharedPointerDynamicCast(weakptr); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); + + { + QSharedPointer derivedptr = baseptr.dynamicCast(); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); + + { + Stuffing *nakedptr = dynamic_cast(baseptr.data()); + QVERIFY(nakedptr); + + QSharedPointer otherbaseptr = qSharedPointerDynamicCast(baseptr); + QVERIFY(!otherbaseptr.isNull()); + QVERIFY(otherbaseptr == nakedptr); + QCOMPARE(otherbaseptr.data(), nakedptr); + QCOMPARE(static_cast(otherbaseptr.data()), aData); + } +} + +void tst_QSharedPointer::dynamicCastVirtualBase() +{ + VirtualDerived *aData = new VirtualDerived; + QSharedPointer baseptr = QSharedPointer(aData); + + { + QSharedPointer derivedptr = qSharedPointerDynamicCast(baseptr); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); + + { + QWeakPointer weakptr = baseptr; + QSharedPointer derivedptr = qSharedPointerDynamicCast(weakptr); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); + QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); + } + QCOMPARE(int(baseptr.d->weakref), 1); + QCOMPARE(int(baseptr.d->strongref), 1); + + { + QSharedPointer derivedptr = baseptr.dynamicCast(); + QVERIFY(baseptr == derivedptr); + QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast(derivedptr.data()), baseptr.data()); } QCOMPARE(int(baseptr.d->weakref), 1); -- cgit v0.12 From 03069de9c398fe7a787388e61badb09ae1b1e6b7 Mon Sep 17 00:00:00 2001 From: Andre Haupt Date: Thu, 14 May 2009 04:44:19 +0200 Subject: Replace all occurences of "heirarchy" with "hierarchy" Signed-off-by: Andre Haupt Reviewed-By: Thiago Macieira --- doc/src/stylesheet.qdoc | 4 ++-- src/corelib/io/qresource.cpp | 2 +- src/gui/widgets/qmenu_p.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/stylesheet.qdoc b/doc/src/stylesheet.qdoc index 46ec041..4060f33 100644 --- a/doc/src/stylesheet.qdoc +++ b/doc/src/stylesheet.qdoc @@ -398,7 +398,7 @@ (usually) refers to a single object, not to all instances of a class. - Similarly, selectors with pseudo-states are more specific that + Similarly, selectors with pseudo-states are more specific than ones that do not specify pseudo-states. Thus, the following style sheet specifies that a \l{QPushButton} should have white text when the mouse is hovering over it, otherwise red text: @@ -653,7 +653,7 @@ \target sub controls \section1 Sub-controls - A widget is considered as a heirarchy (tree) of subcontrols drawn on top + A widget is considered as a hierarchy (tree) of subcontrols drawn on top of each other. For example, the QComboBox draws the drop-down sub-control followed by the down-arrow sub-control. A QComboBox is thus rendered as follows: diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index a1f921e..1f77caa 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -406,7 +406,7 @@ QString QResource::absoluteFilePath() const } /*! - Returns true if the resource really exists in the resource heirarchy, + Returns true if the resource really exists in the resource hierarchy, false otherwise. */ diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index e3c4890..74367c4 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -208,7 +208,7 @@ public: QString searchBuffer; QBasicTimer searchBufferTimer; - //passing of mouse events up the parent heirarchy + //passing of mouse events up the parent hierarchy QPointer activeMenu; bool mouseEventTaken(QMouseEvent *); -- cgit v0.12 From 0266129d26695987e93c3c3f856e8353a5d7cd89 Mon Sep 17 00:00:00 2001 From: kh Date: Mon, 18 May 2009 17:23:34 +0200 Subject: Make sure we add the progress bar only once. --- tools/assistant/tools/assistant/mainwindow.cpp | 30 ++++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index b0c2c6b..582eef3 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -926,25 +926,27 @@ void MainWindow::expandTOC(int depth) void MainWindow::indexingStarted() { - m_progressWidget = new QWidget(); - QLayout* hlayout = new QHBoxLayout(m_progressWidget); + if (!m_progressWidget) { + m_progressWidget = new QWidget(); + QLayout* hlayout = new QHBoxLayout(m_progressWidget); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); - QLabel *label = new QLabel(tr("Updating search index")); - label->setSizePolicy(sizePolicy); - hlayout->addWidget(label); + QLabel *label = new QLabel(tr("Updating search index")); + label->setSizePolicy(sizePolicy); + hlayout->addWidget(label); - QProgressBar *progressBar = new QProgressBar(); - progressBar->setRange(0, 0); - progressBar->setTextVisible(false); - progressBar->setSizePolicy(sizePolicy); + QProgressBar *progressBar = new QProgressBar(); + progressBar->setRange(0, 0); + progressBar->setTextVisible(false); + progressBar->setSizePolicy(sizePolicy); - hlayout->setSpacing(6); - hlayout->setMargin(0); - hlayout->addWidget(progressBar); + hlayout->setSpacing(6); + hlayout->setMargin(0); + hlayout->addWidget(progressBar); - statusBar()->addPermanentWidget(m_progressWidget); + statusBar()->addPermanentWidget(m_progressWidget); + } } void MainWindow::indexingFinished() -- cgit v0.12 From a13ef81dbd66472e7fb0c18ea528502295aa24ab Mon Sep 17 00:00:00 2001 From: kh Date: Mon, 18 May 2009 17:26:34 +0200 Subject: Make ctrl+lmb and mmb work in a same way everywhere (like in browsers). --- .../assistant/tools/assistant/bookmarkmanager.cpp | 77 +++++++++++----------- tools/assistant/tools/assistant/contentwindow.cpp | 9 ++- tools/assistant/tools/assistant/indexwindow.cpp | 9 ++- 3 files changed, 51 insertions(+), 44 deletions(-) diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp index 6f5732f..66475a4 100644 --- a/tools/assistant/tools/assistant/bookmarkmanager.cpp +++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp @@ -536,58 +536,57 @@ void BookmarkWidget::focusInEvent(QFocusEvent *e) bool BookmarkWidget::eventFilter(QObject *object, QEvent *e) { - if (object == this && e->type() == QEvent::KeyPress) { - QKeyEvent *ke = static_cast(e); + if ((object == this) || (object == treeView->viewport())) { QModelIndex index = treeView->currentIndex(); - switch (ke->key()) { + if (e->type() == QEvent::KeyPress) { + QKeyEvent *ke = static_cast(e); if (index.isValid() && searchField->text().isEmpty()) { - case Qt::Key_F2: { - const QModelIndex& source = filterBookmarkModel->mapToSource(index); - QStandardItem *item = - bookmarkManager->treeBookmarkModel()->itemFromIndex(source); + if (ke->key() == Qt::Key_F2) { + QStandardItem *item = bookmarkManager->treeBookmarkModel() + ->itemFromIndex(filterBookmarkModel->mapToSource(index)); if (item) { item->setEditable(true); treeView->edit(index); item->setEditable(false); } - } break; - - case Qt::Key_Delete: { + } else if (ke->key() == Qt::Key_Delete) { bookmarkManager->removeBookmarkItem(treeView, filterBookmarkModel->mapToSource(index)); - } break; + } } - case Qt::Key_Up: - case Qt::Key_Down: - treeView->subclassKeyPressEvent(ke); - break; - - case Qt::Key_Enter: { - case Qt::Key_Return: - index = treeView->selectionModel()->currentIndex(); - if (index.isValid()) { - QString data = index.data(Qt::UserRole + 10).toString(); - if (!data.isEmpty() && data != QLatin1String("Folder")) - emit requestShowLink(data); - } - } break; + switch (ke->key()) { + default: break; + case Qt::Key_Up: { + case Qt::Key_Down: + treeView->subclassKeyPressEvent(ke); + } break; - case Qt::Key_Escape: - emit escapePressed(); - break; + case Qt::Key_Enter: { + case Qt::Key_Return: + index = treeView->selectionModel()->currentIndex(); + if (index.isValid()) { + QString data = index.data(Qt::UserRole + 10).toString(); + if (!data.isEmpty() && data != QLatin1String("Folder")) + emit requestShowLink(data); + } + } break; - default: - break; - } - } - else if (object == treeView->viewport() && e->type() == QEvent::MouseButtonRelease) { - const QModelIndex& index = treeView->currentIndex(); - QMouseEvent *me = static_cast(e); - if (index.isValid() && (me->button() == Qt::MidButton)) { - QString data = index.data(Qt::UserRole + 10).toString(); - if (!data.isEmpty() && data != QLatin1String("Folder")) - CentralWidget::instance()->setSourceInNewTab(data); + case Qt::Key_Escape: { + emit escapePressed(); + } break; + } + } else if (e->type() == QEvent::MouseButtonRelease) { + if (index.isValid()) { + QMouseEvent *me = static_cast(e); + bool controlPressed = me->modifiers() & Qt::ControlModifier; + if(((me->button() == Qt::LeftButton) && controlPressed) + || (me->button() == Qt::MidButton)) { + QString data = index.data(Qt::UserRole + 10).toString(); + if (!data.isEmpty() && data != QLatin1String("Folder")) + CentralWidget::instance()->setSourceInNewTab(data); + } + } } } return QWidget::eventFilter(object, e); diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp index 89060bd..9f39de5 100644 --- a/tools/assistant/tools/assistant/contentwindow.cpp +++ b/tools/assistant/tools/assistant/contentwindow.cpp @@ -124,10 +124,10 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e) QModelIndex index = m_contentWidget->indexAt(me->pos()); QItemSelectionModel *sm = m_contentWidget->selectionModel(); + Qt::MouseButtons button = me->button(); if (index.isValid() && (sm && sm->isSelected(index))) { - if (me->button() == Qt::LeftButton) { - itemClicked(index); - } else if (me->button() == Qt::MidButton) { + if ((button == Qt::LeftButton && (me->modifiers() & Qt::ControlModifier)) + || (button == Qt::MidButton)) { QHelpContentModel *contentModel = qobject_cast(m_contentWidget->model()); if (contentModel) { @@ -135,12 +135,15 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e) if (itm && !isPdfFile(itm)) CentralWidget::instance()->setSourceInNewTab(itm->url()); } + } else if (button == Qt::LeftButton) { + itemClicked(index); } } } return QWidget::eventFilter(o, e); } + void ContentWindow::showContextMenu(const QPoint &pos) { if (!m_contentWidget->indexAt(pos).isValid()) diff --git a/tools/assistant/tools/assistant/indexwindow.cpp b/tools/assistant/tools/assistant/indexwindow.cpp index a2c0950..1117ae0 100644 --- a/tools/assistant/tools/assistant/indexwindow.cpp +++ b/tools/assistant/tools/assistant/indexwindow.cpp @@ -146,8 +146,13 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e) && e->type() == QEvent::MouseButtonRelease) { QMouseEvent *mouseEvent = static_cast(e); QModelIndex idx = m_indexWidget->indexAt(mouseEvent->pos()); - if (idx.isValid() && mouseEvent->button()==Qt::MidButton) - open(m_indexWidget, idx); + if (idx.isValid()) { + Qt::MouseButtons button = mouseEvent->button(); + if (((button == Qt::LeftButton) && (mouseEvent->modifiers() & Qt::ControlModifier)) + || (button == Qt::MidButton)) { + open(m_indexWidget, idx); + } + } } #ifdef Q_OS_MAC else if (obj == m_indexWidget && e->type() == QEvent::KeyPress) { -- cgit v0.12 From 9824e4a9afed9591175b07d22cd130c64b5457cf Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 18 May 2009 17:50:17 +0200 Subject: Added doc about QSharedMemory and other applications Task-number: 253835 Reviewed-by: David Boddie --- src/corelib/kernel/qsharedmemory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp index 9853079..87e154f 100644 --- a/src/corelib/kernel/qsharedmemory.cpp +++ b/src/corelib/kernel/qsharedmemory.cpp @@ -129,6 +129,10 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key, detached from the segment, and no references to the segment remain. Do not mix using QtSharedMemory and QSharedMemory. Port everything to QSharedMemory. + + \warning QSharedMemory changes the key in a Qt-specific way. + It is therefore currently not possible to use the shared memory of + non-Qt applications with QSharedMemory. */ /*! -- cgit v0.12 From 64e46dd18c2dcfe26107a41ee1cc48ed2f9c6f97 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Mon, 18 May 2009 20:22:12 +0200 Subject: Updated WebKit from /home/ariya/dev/webkit/qtwebkit-4.5 to origin/qtwebkit-4.5 ( 1f83e4058bffd5a3fe7e44cf45add01953a772d4 ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit since the last update: ++ b/LayoutTests/ChangeLog 2009-05-12 Ariya Hidayat Reviewed by Dimitri Glazkov. Added Qt-specific expected result for toDataURL test, since Qt does not support saving pixmaps to GIF. * platform/qt/fast/canvas/toDataURL-supportedTypes-expected.txt: Added. 2009-05-12 Ariya Hidayat Rubber-stamped by Simon Hausmann. Added Qt-specific expected result for Canvas getImageData's test. https://bugs.webkit.org/show_bug.cgi?id=22150 Since Qt is internally using premultiplied ARGB32 for doing alpha-blending painting, reading the color back will not necessarily give the same exact color. * platform/qt/Skipped: Excluded canvas-getImageData. * platform/qt/fast/canvas/canvas-getImageData-expected.txt: Added. 2009-04-29 Ariya Hidayat Reviewed by Simon Fraser. Updated expected results after Qt's GraphicsContext fixes. * platform/qt/fast/canvas/set-colors-expected.txt: 2009-04-24 Ariya Hidayat Reviewed by Simon Hausmann. Added Qt-specific expected result for color conversion. This is to compensate the lack of color profile in Qt to do color conversion, hence CMYK 0,0,0,1 always give pure black (#000) instead of very dark black. * platform/qt/fast/canvas/set-colors-expected.txt: Added. ++ b/WebCore/ChangeLog 2009-05-18 Ariya Hidayat Reviewed by Simon Hausmann. Done together with Balazs Kelemen . https://bugs.webkit.org/show_bug.cgi?id=24551 [Qt] Reuse FontPlatformData for the same FontDescription. This effectively prevents growing heap usage for loading every web page. * platform/graphics/qt/FontCacheQt.cpp: (WebCore::qHash): Necessary for FontPlatformDataCache. (WebCore::FontCache::getCachedFontPlatformData): Reuse the instance if it exists, otherwise create a new one and insert it in the cache. 2009-05-18 Balazs Kelemen Reviewed by Ariya Hidayat. https://bugs.webkit.org/show_bug.cgi?id=24551 [Qt] Fix the leak in FontFallbackList::fontDataAt() function. When creating a new instance of SimpleFontData, put it in the font list so that it can deleted later on. * platform/graphics/qt/FontFallbackListQt.cpp: (WebCore::FontFallbackList::invalidate): (WebCore::FontFallbackList::releaseFontData): (WebCore::FontFallbackList::fontDataAt): 2009-05-15 Ariya Hidayat Reviewed by Holger Freyther. [Qt] In the image decoder, remove the raw image data represented as QImage once the image is converted to QPixmap and inserted in the pixmap cache. This effectively reduces the heap usage when running on graphics system other than raster (i.e the case where QImage != QPixmap). * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::imageAtIndex): Nullified the image on purpose. * platform/graphics/qt/ImageDecoderQt.h: Made m_imageList mutable. 2009-05-15 Ariya Hidayat Reviewed by Holger Freyther. [Qt] Refactor alpha channel detection the image decoder. Sets the boolean flag as soon as the image is being read. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ImageDecoderQt): Initialized m_hasAlphaChannel. (WebCore::ImageDecoderQt::setData): Set the flag when appropriate. (WebCore::ImageDecoderQt::supportsAlpha): Simplified. (WebCore::ImageDecoderQt::reset): Resetted the flag. * platform/graphics/qt/ImageDecoderQt.h: Added m_hasAlphaChannel. 2009-05-13 Ariya Hidayat Reviewed by Sam Weinig. [Qt] Fix "lighther" composition mode. QPainter::CompositionMode_Plus is the right match. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtCompositionMode): 2009-04-29 Ariya Hidayat Reviewed by Simon Fraser. [Qt] Initialize GraphicsContext's and ImageBuffer's QPainter to match the default values of canvas attributes. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): 2009-04-27 Ariya Hidayat Reviewed by Tor Arne Vestbø. https://bugs.webkit.org/show_bug.cgi?id=18475 [Qt] Widget painting should follow the layout direction (LTR, RTL) of the element style, not the application layout direction. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::applyTheme): --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 90 ++++++++++++++++++++++ .../WebCore/platform/graphics/qt/FontCacheQt.cpp | 27 ++++++- .../platform/graphics/qt/FontFallbackListQt.cpp | 12 ++- .../platform/graphics/qt/GraphicsContextQt.cpp | 2 +- .../WebCore/platform/graphics/qt/ImageBufferQt.cpp | 19 ++++- .../platform/graphics/qt/ImageDecoderQt.cpp | 13 +++- .../WebCore/platform/graphics/qt/ImageDecoderQt.h | 3 +- .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 4 + 9 files changed, 162 insertions(+), 10 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 26ce489..f5402ce 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - a6ebe3865025e2bb4d767a79435af4daf5a9b4db + 1f83e4058bffd5a3fe7e44cf45add01953a772d4 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 00bd427..23f3ca6 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,93 @@ +2009-05-18 Ariya Hidayat + + Reviewed by Simon Hausmann. + + Done together with Balazs Kelemen . + + https://bugs.webkit.org/show_bug.cgi?id=24551 + + [Qt] Reuse FontPlatformData for the same FontDescription. + This effectively prevents growing heap usage for loading every web page. + + * platform/graphics/qt/FontCacheQt.cpp: + (WebCore::qHash): Necessary for FontPlatformDataCache. + (WebCore::FontCache::getCachedFontPlatformData): Reuse the instance if + it exists, otherwise create a new one and insert it in the cache. + +2009-05-18 Balazs Kelemen + + Reviewed by Ariya Hidayat. + + https://bugs.webkit.org/show_bug.cgi?id=24551 + + [Qt] Fix the leak in FontFallbackList::fontDataAt() function. + When creating a new instance of SimpleFontData, put it in the font list + so that it can deleted later on. + + * platform/graphics/qt/FontFallbackListQt.cpp: + (WebCore::FontFallbackList::invalidate): + (WebCore::FontFallbackList::releaseFontData): + (WebCore::FontFallbackList::fontDataAt): + +2009-05-15 Ariya Hidayat + + Reviewed by Holger Freyther. + + [Qt] In the image decoder, remove the raw image data represented as QImage + once the image is converted to QPixmap and inserted in the pixmap cache. + This effectively reduces the heap usage when running on graphics system + other than raster (i.e the case where QImage != QPixmap). + + * platform/graphics/qt/ImageDecoderQt.cpp: + (WebCore::ImageDecoderQt::imageAtIndex): Nullified the image on purpose. + * platform/graphics/qt/ImageDecoderQt.h: Made m_imageList mutable. + +2009-05-15 Ariya Hidayat + + Reviewed by Holger Freyther. + + [Qt] Refactor alpha channel detection the image decoder. + Sets the boolean flag as soon as the image is being read. + + * platform/graphics/qt/ImageDecoderQt.cpp: + (WebCore::ImageDecoderQt::ImageDecoderQt): Initialized m_hasAlphaChannel. + (WebCore::ImageDecoderQt::setData): Set the flag when appropriate. + (WebCore::ImageDecoderQt::supportsAlpha): Simplified. + (WebCore::ImageDecoderQt::reset): Resetted the flag. + * platform/graphics/qt/ImageDecoderQt.h: Added m_hasAlphaChannel. + +2009-05-13 Ariya Hidayat + + Reviewed by Sam Weinig. + + [Qt] Fix "lighther" composition mode. + QPainter::CompositionMode_Plus is the right match. + + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::toQtCompositionMode): + +2009-04-29 Ariya Hidayat + + Reviewed by Simon Fraser. + + [Qt] Initialize GraphicsContext's and ImageBuffer's QPainter to match + the default values of canvas attributes. + + * platform/graphics/qt/ImageBufferQt.cpp: + (WebCore::ImageBufferData::ImageBufferData): + +2009-04-27 Ariya Hidayat + + Reviewed by Tor Arne Vestbø. + + https://bugs.webkit.org/show_bug.cgi?id=18475 + + [Qt] Widget painting should follow the layout direction (LTR, RTL) + of the element style, not the application layout direction. + + * platform/qt/RenderThemeQt.cpp: + (WebCore::RenderThemeQt::applyTheme): + 2009-03-13 Adam Bergkvist Reviewed by Alexey Proskuryakov. diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp index 8a31861..5d1f147 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp @@ -26,6 +26,9 @@ #include "FontDescription.h" #include "FontPlatformData.h" #include "Font.h" +#include "StringHash.h" + +#include namespace WebCore { @@ -33,9 +36,31 @@ void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector FontPlatformDataCache; + +// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this. +static FontPlatformDataCache* gFontPlatformDataCache; + +uint qHash(const FontDescription& key) +{ + uint value = CaseFoldingHash::hash(key.family().family()); + value ^= key.computedPixelSize(); + value ^= static_cast(key.weight()); + return value; +} + FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool checkingAlternateName) { - return new FontPlatformData(description); + if (!gFontPlatformDataCache) + gFontPlatformDataCache = new FontPlatformDataCache; + + FontPlatformData* fontData = gFontPlatformDataCache->value(description, 0); + if (!fontData) { + fontData = new FontPlatformData(description); + gFontPlatformDataCache->insert(description, fontData); + } + + return fontData; } SimpleFontData* FontCache::getCachedFontData(const FontPlatformData*) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp index 22ae205..50627b7 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp @@ -42,8 +42,6 @@ FontFallbackList::FontFallbackList() void FontFallbackList::invalidate(WTF::PassRefPtr fontSelector) { - releaseFontData(); - m_fontList.clear(); m_familyIndex = 0; m_pitch = UnknownPitch; m_loadingCustomFonts = false; @@ -53,6 +51,9 @@ void FontFallbackList::invalidate(WTF::PassRefPtr fontSel void FontFallbackList::releaseFontData() { + if (m_fontList.size()) + delete m_fontList[0].first; + m_fontList.clear(); } void FontFallbackList::determinePitch(const WebCore::Font* font) const @@ -90,7 +91,12 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne family = family->next(); } - return new SimpleFontData(FontPlatformData(description), _font->wordSpacing(), _font->letterSpacing()); + if (m_fontList.size()) + return m_fontList[0].first; + + const FontData* result = new SimpleFontData(FontPlatformData(description), _font->wordSpacing(), _font->letterSpacing()); + m_fontList.append(pair(result, result->isCustomFont())); + return result; } const FontData* FontFallbackList::fontDataForCharacters(const WebCore::Font* font, const UChar*, int) const diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 6c90ea3..490b54b 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -98,7 +98,7 @@ static inline QPainter::CompositionMode toQtCompositionMode(CompositeOperator op case CompositeHighlight: return QPainter::CompositionMode_SourceOver; case CompositePlusLighter: - return QPainter::CompositionMode_SourceOver; + return QPainter::CompositionMode_Plus; } return QPainter::CompositionMode_SourceOver; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp index 29a02d4..333269e 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp @@ -47,7 +47,24 @@ ImageBufferData::ImageBufferData(const IntSize& size) : m_pixmap(size) { m_pixmap.fill(QColor(Qt::transparent)); - m_painter.set(new QPainter(&m_pixmap)); + + QPainter* painter = new QPainter(&m_pixmap); + m_painter.set(painter); + + // Since ImageBuffer is used mainly for Canvas, explicitly initialize + // its painter's pen and brush with the corresponding canvas defaults + // NOTE: keep in sync with CanvasRenderingContext2D::State + QPen pen = painter->pen(); + pen.setColor(Qt::black); + pen.setWidth(1); + pen.setCapStyle(Qt::FlatCap); + pen.setJoinStyle(Qt::MiterJoin); + pen.setMiterLimit(10); + painter->setPen(pen); + QBrush brush = painter->brush(); + brush.setColor(Qt::black); + painter->setBrush(brush); + painter->setCompositionMode(QPainter::CompositionMode_SourceOver); } ImageBuffer::ImageBuffer(const IntSize& size, bool grayScale, bool& success) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 394c7a7..cd32428 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -197,7 +197,8 @@ ImageDecoderQt* ImageDecoderQt::create(const SharedBuffer& data) } ImageDecoderQt::ImageDecoderQt(const QString &imageFormat) - : m_imageFormat(imageFormat) + : m_hasAlphaChannel(false) + , m_imageFormat(imageFormat) { } @@ -212,6 +213,7 @@ bool ImageDecoderQt::hasFirstImageHeader() const void ImageDecoderQt::reset() { + m_hasAlphaChannel = false; m_failed = false; m_imageList.clear(); m_pixmapCache.clear(); @@ -230,6 +232,9 @@ void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived) const ReadContext::ReadResult readResult = readContext.read(allDataReceived); + if (hasFirstImageHeader()) + m_hasAlphaChannel = m_imageList[0].m_image.hasAlphaChannel(); + if (debugImageDecoderQt) qDebug() << " read returns " << readResult; @@ -280,7 +285,7 @@ int ImageDecoderQt::repetitionCount() const bool ImageDecoderQt::supportsAlpha() const { - return hasFirstImageHeader() && m_imageList[0].m_image.hasAlphaChannel(); + return m_hasAlphaChannel; } int ImageDecoderQt::duration(size_t index) const @@ -314,6 +319,10 @@ QPixmap* ImageDecoderQt::imageAtIndex(size_t index) const if (!m_pixmapCache.contains(index)) { m_pixmapCache.insert(index, QPixmap::fromImage(m_imageList[index].m_image)); + + // store null image since the converted pixmap is already in pixmap cache + Q_ASSERT(m_imageList[index].m_imageState == ImageComplete); + m_imageList[index].m_image = QImage(); } return &m_pixmapCache[index]; } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h index a2eb6aa..b8c3edd 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h @@ -81,8 +81,9 @@ private: int m_duration; }; + bool m_hasAlphaChannel; typedef QList ImageList; - ImageList m_imageList; + mutable ImageList m_imageList; mutable QHash m_pixmapCache; int m_loopCount; QString m_imageFormat; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index a9da76b..02d17ed 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -737,6 +737,10 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con if (isHovered(o)) option.state |= QStyle::State_MouseOver; + option.direction = Qt::LeftToRight; + if (o->style() && o->style()->direction() == WebCore::RTL) + option.direction = Qt::RightToLeft; + ControlPart result = o->style()->appearance(); switch (result) { -- cgit v0.12 From 56ffcd446d7b4a411fbada3a63d06c6a3e262a36 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Mon, 18 May 2009 20:43:28 +0200 Subject: Update QtWebKit changes for the next patch release. Reviewed-by: TrustMe --- dist/changes-4.5.2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index 3180b7c..a132028 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -33,6 +33,16 @@ Third party components * Library * **************************************************************************** +- QtWebKit + * Backported fixes for critical bugs, memory leaks, and crashes from + WebKit trunk (with revision numbers) related to: + Canvas (r40546, r41221 r41355, r42996, r43645) + Memory (r41527, r43764, r43828, r43830) + JavaScript (r39882, r40086, r40131, r40133) + Rendering (r41285, r41296, r41659, r42887) + Network (r41664, r42516) + Plugins (r41346) + Clipboard (r41360) **************************************************************************** * Database Drivers * -- cgit v0.12 From 6a94214e691966874faaab0bacd5d787850e0546 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Tomoyuki Date: Tue, 19 May 2009 16:48:10 +0900 Subject: Update japanese translation file "translations/qt_ja_JP.ts". QtXmlPatterns is not completed. --- translations/qt_ja_JP.ts | 5920 +++++++++++++++++++++++----------------------- 1 file changed, 2993 insertions(+), 2927 deletions(-) diff --git a/translations/qt_ja_JP.ts b/translations/qt_ja_JP.ts index 7c8b874..55b21d0 100644 --- a/translations/qt_ja_JP.ts +++ b/translations/qt_ja_JP.ts @@ -2,29 +2,12 @@ - AudioOutput - - - <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> - - - - - <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - - - - - Revert back to device '%1' - - - - CloseButton - + Close Tab - + ToolTip + タブを閉じる @@ -43,32 +26,50 @@ Notifications - + 通知 Music - + 音楽 Video - + 動画 Communication - + コミュニケーション Games - + ゲーム Accessibility - + アクセシビリティ + + + + Phonon::AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>オーディオ再生デバイス<b>%1</b>が動作しません。<br/><b>%2</b>を使用します。</html> + + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>より高いパフォーマンスを得られるオーディオデバイス <b>%1</b> が使用可能となったので、使用します。</html> + + + + Revert back to device '%1' + デバイス '%1' に戻す @@ -77,13 +78,13 @@ Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled. - + 警告: gstreamer0.10-plugins-good がインストールされていません。幾つかの動画機能は使用できません。 Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled - + 警告: GStreamer plugin がインストールされていません。すべての音声、動画機能は使用できません @@ -94,12 +95,14 @@ Check your Gstreamer installation and make sure you have libgstreamer-plugins-base installed. - + 再生できません。 + +Gstreamer と libgstreamer-plugins-base が正しくインストールされているか確認してください。 A required codec is missing. You need to install the following codec(s) to play this content: %0 - + 必要なコーデックがみつかりません。このコンテンツを再生するためには、以下のコーデックをインストールする必要があります: %0 @@ -111,27 +114,27 @@ have libgstreamer-plugins-base installed. Could not open media source. - + メディアソースを開くことができません。 Invalid source type. - + 無効なソースの形式です。 Could not locate media source. - + メディアソースがみつかりません。 Could not open audio device. The device is already in use. - + オーディオデバイスを開くことができません。デバイスは既に他のプロセスにより使用されています。 Could not decode media source. - + メディアソースを開くことができません。見つからないか、未知の形式です。 @@ -139,15 +142,22 @@ have libgstreamer-plugins-base installed. + + Volume: %1% - + 音量: %1% - + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - + スライダを用いて音量を指定してください。左端が0%、右端が%1%になります + + + + Muted + ミュート @@ -168,12 +178,12 @@ have libgstreamer-plugins-base installed. True - True + False - False + @@ -209,7 +219,7 @@ have libgstreamer-plugins-base installed. ディレクトリを選択 - + Copy or Move a File ファイルをコピーまたは移動 @@ -226,7 +236,7 @@ have libgstreamer-plugins-base installed. - + Cancel キャンセル @@ -344,17 +354,17 @@ have libgstreamer-plugins-base installed. Symlink to File - ファイルへのSymlink + ファイルへのシンボリックリンク Symlink to Directory - ディレクトリへのSymlink + ディレクトリへのシンボリックリンク Symlink to Special - スペシャルへのSymlink + スペシャルファイルへのシンボリックリンク @@ -455,7 +465,7 @@ have libgstreamer-plugins-base installed. the symlink - Symlink + シンボリックリンク @@ -465,7 +475,7 @@ have libgstreamer-plugins-base installed. <qt>Are you sure you wish to delete %1 "%2"?</qt> - <qt>%1「%2」を削除しますか?</qt> + <qt>%1 "%2" を削除しますか?</qt> @@ -556,8 +566,9 @@ to %2 名前を変更できませんでした %1 -へ -%2 +を +%2 +へ @@ -607,13 +618,13 @@ to Q3TabDialog - - + + OK OK - + Apply 適用 @@ -737,7 +748,7 @@ to Displays the name of the window and contains controls to manipulate it - ウィンドウの名前を表示し、ウィンドウを操作するコントロールを含みます + ウィンドウの名前と、ウィンドウを操作するコントロールを表示します @@ -755,43 +766,43 @@ to The protocol `%1' is not supported - プロトコル「%1」はサポートされていません + プロトコル '%1' はサポートされていません The protocol `%1' does not support listing directories - プロトコル「%1」ではディレクトリのリストをサポートしていません + プロトコル '%1' はディレクトリのリスティングをサポートしていません The protocol `%1' does not support creating new directories - プロトコル「%1」では新しいディレクトリの作成をサポートしていません + プロトコル '%1' は新しいディレクトリの作成をサポートしていません The protocol `%1' does not support removing files or directories - プロトコル「%1」ではファイルまたはディレクトリの削除をサポートしていません + プロトコル '%1' はファイルまたはディレクトリの削除をサポートしていません The protocol `%1' does not support renaming files or directories - プロトコル「%1」ではファイルまたはディレクトリの名前の変更をサポートしていません + プロトコル '%1' はファイルまたはディレクトリの名前の変更をサポートしていません The protocol `%1' does not support getting files - プロトコル「%1」ではファイルの取得をサポートしていません + プロトコル '%1' はファイルの取得をサポートしていません The protocol `%1' does not support putting files - プロトコル「%1」ではファイルの送信をサポートしていません + プロトコル '%1' はファイルの送信をサポートしていません The protocol `%1' does not support copying or moving files or directories - プロトコル「%1」ではファイルまたはディレクトリのコピーまたは移動をサポートしていません + プロトコル '%1' はファイルまたはディレクトリのコピーまたは移動をサポートしていません @@ -848,14 +859,15 @@ to Connection timed out - 接続がタイムアウトしました + 接続がタイムアウトしました Operation on socket is not supported - + 抽象ソケットクラスでのソケットのエラー + このソケットへのこの操作はサポートされていません @@ -870,13 +882,13 @@ to Network unreachable - ネットワークへ到達できません + ネットワークへ到達できません QAbstractSpinBox - + &Step up 上(&S) @@ -888,7 +900,7 @@ to &Select All - + すべてを選択(&S) @@ -914,7 +926,7 @@ to 互換性のないQtライブラリエラー - + QT_LAYOUT_DIRECTION Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. LTR @@ -940,7 +952,7 @@ to COM &Object: - COM オブジェクト(&O) + COM オブジェクト(&O): @@ -1001,7 +1013,7 @@ to Select Color - + @@ -1046,17 +1058,17 @@ to False - False + True - True + Close - 閉じる + 閉じる @@ -1065,19 +1077,19 @@ to %1: key is empty QSystemSemaphore - + %1: キーが空です %1: unable to make key QSystemSemaphore - + %1: キーを作成できません %1: ftok failed QSystemSemaphore - + %1: fork に失敗しました @@ -1165,17 +1177,17 @@ to QDial - + ダイヤル SpeedoMeter - + スピードメータ SliderHandle - + スライダハンドル @@ -1183,12 +1195,12 @@ to What's This? - ヒント + ヒント? Done - + 終了 @@ -1203,7 +1215,7 @@ to Cancel - キャンセル + キャンセル @@ -1233,12 +1245,12 @@ to Save - 保存 + 保存 &Save - 保存(&S) + 保存(&S) @@ -1248,17 +1260,17 @@ to &Cancel - キャンセル(&C) + キャンセル(&C) Close - 閉じる + 閉じる &Close - 閉じる(&C) + 閉じる(&C) @@ -1313,13 +1325,13 @@ to &OK - OK(&O) + OK(&O) QDirModel - + Name 名前 @@ -1351,17 +1363,17 @@ to Close - 閉じる + 閉じる Dock - + ドック Float - + フロート @@ -1369,12 +1381,12 @@ to More - 増やす + 増やす Less - 減らす + 減らす @@ -1392,7 +1404,7 @@ to Fatal Error: - 致命的エラー: + 致命的なエラー: @@ -1409,41 +1421,41 @@ to QFile - + Destination file exists - + 新しい名前のファイルは既に存在します Cannot remove source file - + 元のファイルを削除できません - + Cannot open %1 for input - + コピー元ファイル %1 を読めません Cannot open for output - + コピー先のファイルをオープンできません Failure to write block - + 書き込みに失敗しました Cannot create %1 for output - + コピー先として %1 を作成できません QFileDialog - - + + All Files (*) すべてのファイル(*) @@ -1453,33 +1465,33 @@ to ディレクトリ - - + + Directory: ディレクトリ: - - + + File &name: - ファイル名: + ファイル名(&N): - + &Open オープン(&O) - + &Save 保存(&S) - + Open オープン @@ -1499,7 +1511,7 @@ Please verify the correct file name was given %1 already exists. Do you want to replace it? - %1はすでに存在します。 + %1 はすでに存在します。 置き換えますか? @@ -1518,7 +1530,7 @@ Please verify the correct file name was given. - + %1 Directory not found. Please verify the correct directory name was given. @@ -1531,7 +1543,7 @@ Please verify the correct directory name was given. ソート - + &Rename 名前の変更(&R) @@ -1619,14 +1631,38 @@ Please verify the correct directory name was given. ファイル - + + File Folder + Match Windows Explorer + ファイルフォルダ + + + + Folder + All other platforms + フォルダ + + + + Alias + Mac OS X Finder + エイリアス + + + + Shortcut + All other platforms + ショートカット + + + Unknown 不明 All Files (*.*) - すべてのファイル(*.*) + すべてのファイル(*.*) @@ -1642,16 +1678,16 @@ Please verify the correct directory name was given. ディレクトリを選択 - + '%1' is write protected. Do you want to delete it anyway? '%1' は書き込みが禁止されています。 -本当に削除しますか? +本当に削除しますか? Are sure you want to delete '%1'? - '%1' を本当に削除しますか? + '%1' を本当に削除しますか? @@ -1659,46 +1695,46 @@ Do you want to delete it anyway? ディレクトリを削除できませんでした。 - + Find Directory - ディレクトリの検索 + ディレクトリの検索 Show - + 表示 &New Folder - + 新しいフォルダ(&N) - + &Choose - + 選択(&C) - + New Folder - 新しいフォルダ + 新しいフォルダ Recent Places - + 履歴 Forward - 進む + 進む - + Remove - + 削除 @@ -1732,48 +1768,53 @@ Do you want to delete it anyway? + %1 TB - + %1 TB + %1 GB - + %1 GB + %1 MB - + %1 MB + %1 KB - + %1 KB + %1 bytes - + %1 バイト Invalid filename - + 無効なファイル名 <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - + <b>ファイル名 "%1" は使用できません。</b><p>名前を短くしたり、アクセント記号などを削除して再度試してください。 - + My Computer - マイ コンピュータ + マイ コンピュータ Computer - + コンピュータ @@ -1782,215 +1823,216 @@ Do you want to delete it anyway? Normal - + ここはどう訳すべきか... + 明朝 Bold - + ゴシック Demi Bold - + Demi Bold Black - + 太字 Demi - + Demi Light - + 細字 Italic - + イタリック Oblique - + 斜体 Any - + すべて Latin - + ラテン Greek - + ギリシャ Cyrillic - + キリル Armenian - + アルメニア Hebrew - + ヘブライ Arabic - + アラビア Syriac - + シリア Thaana - + ターナ Devanagari - + デーヴァナーガリー Bengali - + ベンガル Gurmukhi - + グルムキー Gujarati - + グジャラート Oriya - + オリヤー Tamil - + タミル Telugu - + テルグ Kannada - + カンナダ Malayalam - + マラヤーラム Sinhala - + シンハラ Thai - + タイ Lao - + ラーオ Tibetan - + チベット Myanmar - + ビルマ Georgian - + グルジア Khmer - + クメール Simplified Chinese - + 簡体中国 Traditional Chinese - + 繁体中国 Japanese - + 日本 Korean - + ハングル Vietnamese - + ベトナム Symbol - + 記号 Ogham - + オガム Runic - + ルーン @@ -2065,7 +2107,7 @@ Do you want to delete it anyway? Connection timed out to host %1 - + ホスト %1 への接続がタイムアウトしました @@ -2231,7 +2273,7 @@ Do you want to delete it anyway? HTTPS connection requested but SSL support not compiled in - + HTTPSによる接続が要求されましたが、SSLのサポートがコンパイル時に組み込まれていないため、接続できません @@ -2268,15 +2310,15 @@ Do you want to delete it anyway? Unknown authentication method - + 非対応の認証方法が要求されました Error writing response to device - + デバイスへの書き込み時にエラーが発生しました - + Connection refused 接続が拒否されました @@ -2344,42 +2386,42 @@ Do you want to delete it anyway? Proxy authentication required - + プロキシーの認証が必要です Authentication required - + 認証が必要です Connection refused (or timed out) - + 接続が拒否されたか、タイムアウトしました Proxy requires authentication - + プロキシーの認証が必要です Host requires authentication - + ホストの認証が必要です Data corrupted - + データが破損しています Unknown protocol specified - + 未対応のプロトコルです SSL handshake failed - + SSLのハンドシェークに失敗しました @@ -2387,53 +2429,53 @@ Do you want to delete it anyway? Did not receive HTTP response from proxy - + プロキシーからHTTPレスポンスを受信できませんでした Error parsing authentication request from proxy - + プロキシーからの認証要求のパースに失敗しました Authentication required - + 認証が必要です Proxy denied connection - + プロキシーが接続を拒否しました Error communicating with HTTP proxy - + HTTP プロキシーとの通信にて、エラーが発生しました Proxy server not found - + プロキシーサーバが見つかりません Proxy connection refused - + プロキシーが接続を拒否しました Proxy server connection timed out - + プロキシーとの接続がタイムアウトしました Proxy connection closed prematurely - + プロキシーの接続が通信の終了前に切断されました QIBaseDriver - + Error opening database データベースのオープンでエラーが発生しました @@ -2566,7 +2608,7 @@ Do you want to delete it anyway? デバイスの残り容量がありません - + Unknown error 不明なエラー @@ -2599,7 +2641,7 @@ Do you want to delete it anyway? Enter a value: - + 数値を入力: @@ -2650,35 +2692,35 @@ Do you want to delete it anyway? The shared library was not found. - + 共有ライブラリがみつかりません。 The file '%1' is not a valid Qt plugin. - + ファイル '%1' は Qt プラグインではありません。 The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - + プラグイン '%1' はこの Qt と互換性のないライブラリを使用しています。 (デバック版とリリース版のライブラリを同時に使用することはできません) Cannot load library %1: %2 - + ライブラリ '%1' を読み込むことができません: %2 Cannot unload library %1: %2 - + ライブラリ %1 を解放することができません: %2 Cannot resolve symbol "%1" in %2: %3 - + '%2'に含まれる識別子 "%1" を解決できません: %3 @@ -2723,25 +2765,24 @@ Do you want to delete it anyway? QLocalServer - + %1: Name error - + %1: 名前の解決に失敗 %1: Permission denied - + %1: 許可されていません %1: Address in use - + %1: アドレスは既に使用されています - %1: Unknown error %2 - + %1: 未知のエラー %2 @@ -2750,13 +2791,13 @@ Do you want to delete it anyway? %1: Connection refused - + %1: 接続が拒否されました %1: Remote closed - + %1: リモートにより接続が閉じられました @@ -2764,61 +2805,61 @@ Do you want to delete it anyway? %1: Invalid name - + %1: 無効な名前です %1: Socket access error - + %1: ソケットアクセスのエラーです %1: Socket resource error - + %1: ソケットリソースのエラーです %1: Socket operation timed out - + %1: ソケット操作がタイムアウトしました %1: Datagram too large - + %1: データグラムが大きすぎます %1: Connection error - + %1: 接続のエラーが発生しました %1: The socket operation is not supported - + %1: そのソケット操作はサポートされていません %1: Unknown error - + %1: 未知のエラーです %1: Unknown error %2 - + %1: 未知のエラー %2 QMYSQLDriver - + Unable to open database ' データベースをオープンできません ' @@ -2846,12 +2887,12 @@ Do you want to delete it anyway? QMYSQLResult - + Unable to fetch data データをフェッチできません - + Unable to execute query クエリーを実行できません @@ -2861,13 +2902,13 @@ Do you want to delete it anyway? 実行結果を記録できません - + Unable to prepare statement プリペアステートメントを使えません - + Unable to reset statement ステートメントをリセットできません @@ -2893,14 +2934,14 @@ Do you want to delete it anyway? ステートメントの実行結果を記録できません - + Unable to execute next query - + 次のクエリーを実行できません Unable to store next result - + 次の結果を記録できません @@ -2908,7 +2949,7 @@ Do you want to delete it anyway? (Untitled) - + (タイトルなし) @@ -2916,92 +2957,93 @@ Do you want to delete it anyway? %1 - [%2] - %1 - [%2] + %1 - [%2] Close - 閉じる + 閉じる Minimize - 最小化 + 最小化 Restore Down - 元に戻す + 元に戻す &Restore - 元に戻す(&R) + 元に戻す(&R) &Move - 移動(&M) + 移動(&M) &Size - + サイズ(&S) Mi&nimize - 最小化(&N) + 最小化(&N) Ma&ximize - 最大化(&X) + 最大化(&X) Stay on &Top - 常に手前に表示(&T) + 常に手前に表示(&T) &Close - 閉じる(&C) + 閉じる(&C) - [%1] - + - [%1] Maximize - 最大化 + 最大化 Unshade - + たぶん選択・非選択状態のウィンドウのことだと思うけど。fvwmなどのx11で使われている用語 + 非選択 Shade - + 選択 Restore - + 元に戻す Help - ヘルプ + ヘルプ Menu - メニュー + メニュー @@ -3082,7 +3124,32 @@ Do you want to delete it anyway? <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> for more information.</p> - + <h3>Qtについて</h3> +<p>このプログラムは Qt バージョン %1 を使用しています。</p> +<p>Qt は、クロスプラットホームのアプリケーション開発に使用される C++ のツールキットです。</p> +<p>Qt は、 MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, そして多数の Unix 系OS環境に対して、単一のソースからバイナリを生成します。 +また、 Linux および Windows CE を元とした組み込み環境にも対応しています。</p> +<p>Qt は様々なユーザの要望に応じるために、3つの異なるライセンスで提供されています。</p> +<p> +Qt 商用ライセンスは、プロプライエタリまたは商用ソフトウェアに適用できます。 +この場合は、他者とのソースコードの共有を拒否し、 GNU LGP バージョン 2.1 または GNU GPL バージョン 3.0 を許容できないソフトウェアにおいて Qt を使用できます。 +</p> +<p> +Qt GNU LGPL バージョン 2.1 ライセンスは、プロプライエタリまたはオープンソースソフトウェアに適用できます。 +この場合は、 GNU LGPL バージョン 2.1 に従う必要があります。 +</p> +<p> +Qt GNU General Public License バージョン 3.0 ライセンスは、GNU GPL バージョン 3.0 または GPL 3.0 と互換性のあるライセンスを採用しているソフトウェアに適用されます。 +この場合は、GNU GPL バージョン 3.0 に従う必要があります。 +</p> +<p> +ライセンスの詳細については、<a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> +を参照してください。</p> +<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p> +<p>Qt は Nokia の製品です。詳細については<a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> を参照してください。</p> +<p> +訳注: ライセンスはここにある翻訳は参考のためのものであり、オリジナルの(英語の)ものが正式なものとなります。 +</p> @@ -3090,7 +3157,7 @@ Do you want to delete it anyway? Select IM - 入力メソッドを選択 + インプットメソッドを選択 @@ -3098,12 +3165,12 @@ Do you want to delete it anyway? Multiple input method switcher - 複数の入力メソッドを切り替え + 複数のインプットメソッドを切り替え Multiple input method switcher that uses the context menu of the text widgets - テキストウィジェットのコンテキストメニューを使った複数の入力メソッドの切り替えです + テキストウィジェットのコンテキストメニューを使った複数のインプットメソッドの切り替えです @@ -3111,7 +3178,7 @@ Do you want to delete it anyway? Unable to initialize non-blocking socket - ノンブロッキングソケットを初期化できません + 非ブロック型ソケットを初期化できません @@ -3236,7 +3303,7 @@ Do you want to delete it anyway? The proxy type is invalid for this operation - + このプロキシーは、この操作に対応していません @@ -3244,93 +3311,101 @@ Do you want to delete it anyway? Error opening %1 - + オープンのエラー %1 + + + + QNetworkAccessDebugPipeBackend + + + Write error writing to %1: %2 + %1 への書き込み時にエラーが発生しました: %2 QNetworkAccessFileBackend - + Request for opening non-local file %1 - + 非ローカルファイル %1 をオープンするよう要求されましたが、ローカルファイルのみオープンできます - + Error opening %1: %2 - + %1 をオープンする時にエラーが発生しました: %2 - + Write error writing to %1: %2 - + %1 への書き込み時にエラーが発生しました: %2 - + Cannot open %1: Path is a directory - + %1 をオープンできません。指定されたパスはディレクトリです Read error reading from %1: %2 - + %1 を読み込み時にエラーが発生しました: %2 QNetworkAccessFtpBackend - + No suitable proxy found - + 適切なプロキシーがみつかりません Cannot open %1: is a directory - + %1 をオープンできません。指定されたパスはディレクトリです - + Logging in to %1 failed: authentication required - + %1 へのログインに失敗しました。認証が必要です Error while downloading %1: %2 - + %1 をダウンロード中にエラーが発生しました: %2 Error while uploading %1: %2 - + %1 をアップロード中にエラーが発生しました: %2 QNetworkAccessHttpBackend - + No suitable proxy found - + 適切なプロキシーがみつかりません QNetworkReply - + Error downloading %1 - server replied: %2 - + %1 をダウンロード中にエラーが発生しました。サーバの返答: %2 - + Protocol "%1" is unknown - + プロトコル "%1" はサポートされていません QNetworkReplyImpl - + Operation canceled - + 操作はキャンセルされました @@ -3349,17 +3424,17 @@ Do you want to delete it anyway? Unable to begin transaction - トランザクションを開始できません + トランザクションを開始できません Unable to commit transaction - トランザクションをコミットできません + トランザクションをコミットできません Unable to rollback transaction - トランザクションをロールバックできません + トランザクションをロールバックできません @@ -3409,7 +3484,7 @@ Do you want to delete it anyway? QODBCDriver - + Unable to connect 接続できません @@ -3466,29 +3541,29 @@ Do you want to delete it anyway? QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - QODBCResult::reset: ステートメントの属性として 'SQL_CURSOR_STATUS' を設定できません。ODBC ドライバの構成をチェックしてください。 + QODBCResult::reset: ステートメントの属性として 'SQL_CURSOR_STATUS' を設定できません。ODBC ドライバの構成をチェックしてください Unable to fetch last - + リストを取得できません Unable to fetch - + フェッチできません Unable to fetch first - 最初のレコードをフェッチできません + 最初のレコードをフェッチできません Unable to fetch previous - + 前のレコードをフェッチできません @@ -3509,56 +3584,41 @@ Do you want to delete it anyway? Operation not supported on %1 - + %1 ではこの操作はサポートされていません Invalid URI: %1 - - - - - Write error writing to %1: %2 - - - - - Read error reading from %1: %2 - + 無効なURIです: %1 - + Socket error on %1: %2 - + %1 のソケットにおいてエラーが発生しました: %2 Remote host closed the connection prematurely on %1 - - - - - Protocol error: packet of size 0 received - + リモートホスト %1 との接続が通信の終了前に切断されました No host name given - + ホストネームが与えられていません QPPDOptionsModel - + Name - 名前 + 名前 Value - + @@ -3586,12 +3646,12 @@ Do you want to delete it anyway? Unable to subscribe - + subscribe できません Unable to unsubscribe - + unsubscribe できません @@ -3604,7 +3664,7 @@ Do you want to delete it anyway? Unable to prepare statement - プリペアステートメントを使えません + プリペアステートメントを使えません @@ -3612,4355 +3672,4361 @@ Do you want to delete it anyway? Centimeters (cm) - + センチメートル (cm) Millimeters (mm) - + ミリメートル (mm) Inches (in) - + インチ (in) Points (pt) - + ポイント (pt) Form - + 書式設定 Paper - + 用紙 Page size: - ページサイズ: + ページサイズ: Width: - + 幅: Height: - + 高さ: Paper source: - 給紙装置: + 給紙装置: Orientation - + 印刷方向 Portrait - + 縦 (ポートレート) Landscape - + 横 (ランドスケープ) Reverse landscape - + 横 反転 (リバースランドスケープ) Reverse portrait - + 縦 反転 (リバースポートレート) Margins - + 余白 top margin - + 上端余白 left margin - + 左端余白 right margin - + 右端余白 bottom margin - + 下端余白 - QPluginLoader + QPatternist::QtXmlPatterns - - Unknown error - 不明なエラー + + An %1-attribute with value %2 has already been declared. + 属性 %1 の値 %2 は既に宣言されています。 - - The plugin was not loaded. - + + An %1-attribute must have a valid %2 as value, which %3 isn't. + 属性 %1 の値は %2 の型でなければなりませんが、 %3 が指定されました。 - - - QPrintDialog - Page size: - ページサイズ: + + %1 is an unsupported encoding. + %1 はサポートされていないエンコーディングです。 - Orientation: - 方向: + + %1 contains octets which are disallowed in the requested encoding %2. + エンコーディング %2 では許可されていないオクテットが %1 に含まれています。 - Paper source: - 給紙装置: + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + %2 で使用されているエンコード %3 では、コードポイント %1 は有効な XML 表現ではありません。 - - OK - OK + + Network timeout. + ネットワーク接続がタイムアウトしました。 - Cancel - キャンセル + + Element %1 can't be serialized because it appears outside the document element. + エレメント %1 はシリアライズできません。このドキュメントの範囲を越えるエレメントを含んでいます。 - Portrait - + + Attribute %1 can't be serialized because it appears at the top level. + 属性 %1 はシリアライズできません。トップレベルに現れているためです。 - Landscape - + + Year %1 is invalid because it begins with %2. + %1 年はむこうです。%2 で始まっています。 - - locally connected - ローカルに接続しています + + Day %1 is outside the range %2..%3. + %1 日は、有効な範囲 %2..%3 を逸脱しています。 - - - Aliases: %1 - エイリアス: %1 + + Month %1 is outside the range %2..%3. + %1 月は、有効な範囲 %2..%3 を逸脱しています。 - - - unknown - 不明 + + Overflow: Can't represent date %1. + オーバーフロー: 日付 %1 を再現できません。 - Print in color if available - 可能であればカラーで印刷 + + Day %1 is invalid for month %2. + %2 月には、%1 日は存在しません。 - Print to file - ファイルに出力: + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + 24:%1:%2.%3 は無効です。24時0分0秒のみ使用できます - Browse - 参照... + + Time %1:%2:%3.%4 is invalid. + 時刻 %1時%2分%3.%4秒は無効です。 - - Print all - すべて印刷 + + Overflow: Date can't be represented. + オーバーフロー: 日付を再現できません。 - Selection - 選択した部分を印刷 + + + At least one component must be present. + 年、月、日のうちいずれかを指定しなければなりません。 - - Print range - 印刷範囲 + + At least one time component must appear after the %1-delimiter. + %1 の後には、時刻を指定しなければなりません。 - Pages from - 先頭のページ: + + No operand in an integer division, %1, can be %2. + ゼロ除算? NaN? + 整数の除算のためのオペランドが不足しています。%1 は %2 でなければなりません。 - to - 末尾のページ: + + The first operand in an integer division, %1, cannot be infinity (%2). + 整数の除算における最初のオペランド %1 を認識できません (%2)。 - Print last page first - 末尾のページから印刷 + + The second operand in a division, %1, cannot be zero (%2). + 整数の除算における二つ目のオペランド %1 はゼロであってはいけまん(%2)。 - Number of copies: - 部数: + + %1 is not a valid value of type %2. + %1 は、%2 の型に対して有効な値ではありません。 - Paper format - 用紙の形式 + + When casting to %1 from %2, the source value cannot be %3. + %2 から %1 への型変換に際しては、値 %3 は有効な値ではありません。 - - A0 (841 x 1189 mm) - A0 (841 x 1189mm) + + Integer division (%1) by zero (%2) is undefined. + 整数の除算において %1 をゼロ (%2) で割った結果は定義されていません。 - - A1 (594 x 841 mm) - A1 (594 x 841mm) + + Division (%1) by zero (%2) is undefined. + 除算において %1 をゼロ (%2) で割った結果は定義されていません。 - - A2 (420 x 594 mm) - A2 (420 x 594mm) + + Modulus division (%1) by zero (%2) is undefined. + 剰余を求めるに際し、%1 をゼロ (%2) で除した結果は定義されていません。 - - A3 (297 x 420 mm) - A3 (297 x 420mm) + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + 型 %1 を非数 %2 (NaN) で除すことはできません。 - - A4 (210 x 297 mm, 8.26 x 11.7 inches) - A4 (210 x 297mm、8.26 x 11.7インチ) + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + 型 %1 を%2 または %3 (正または負のゼロ) で除することはできません。 - - A5 (148 x 210 mm) - A5 (148 x 210mm) - - - - A6 (105 x 148 mm) - A6 (105 x 148mm) + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + 型 %1 を %2 または %3 (正または負のゼロ)で乗ずることはできません。 - - A7 (74 x 105 mm) - A7 (74 x 105mm) + + A value of type %1 cannot have an Effective Boolean Value. + 型 %1 は有効な論理型(bool)ではありません。 - - A8 (52 x 74 mm) - A8 (52 x 74mm) + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + ?? + 論理型は、論理型以外の複数の値からなる計算によって求めることはできません。 - - A9 (37 x 52 mm) - A9 (37 x 52mm) + + Value %1 of type %2 exceeds maximum (%3). + 型 %2 の値 %1 は、上限 (%3) を越えています。 - - B0 (1000 x 1414 mm) - B0 (1000 x 1414mm) + + Value %1 of type %2 is below minimum (%3). + 型 %2 の値 %1 は、下限 (%3) を越えています。 - - B1 (707 x 1000 mm) - B1 (707 x 1000mm) + + A value of type %1 must contain an even number of digits. The value %2 does not. + 型 %1 の値は偶数個の十進数文字を必要とします。しかし、%2 はそうではありません。 - - B2 (500 x 707 mm) - B2 (500 x 707mm) + + %1 is not valid as a value of type %2. + 型 %2 に対して、値 %1 は有効ではありません。 - - B3 (353 x 500 mm) - B3 (353 x 500mm) + + Ambiguous rule match. + 曖昧なルールにマッチしました。 - - B4 (250 x 353 mm) - B4 (250 x 353mm) + + Operator %1 cannot be used on type %2. + 型 %2 に対して、オペレータ %1 は使用できません。 - - B5 (176 x 250 mm, 6.93 x 9.84 inches) - B5 (176 x 250mm、6.93 x 9.84インチ) + + Operator %1 cannot be used on atomic values of type %2 and %3. + アトミックな型 %2 と %3 に対して、オペレータ %1 は使用できません。 - - B6 (125 x 176 mm) - B6 (125 x 176mm) + + The namespace URI in the name for a computed attribute cannot be %1. + computed attrib. ってなんてやくすのが適当かな。 + 結合された属性に対する名前空間のURIとして、%1 を使用することはできません。 - - B7 (88 x 125 mm) - B7 (88 x 125mm) + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + 結合された属性の名前空間URI %1 は、ローカルな名前である %2 と併用できません。 - - B8 (62 x 88 mm) - B8 (62 x 88mm) + + Type error in cast, expected %1, received %2. + 型変換時のエラーです。望んでいた %1 ではなく、%2 になりました。 - - B9 (44 x 62 mm) - B9 (44 x 62mm) + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + %1 またはそれを継承している型への型変換においては、元の値の型は同じ型か、リテラルな文字列である必要があります。型 %2 は許可されていません。 - - B10 (31 x 44 mm) - B10 (31 x 44mm) + + No casting is possible with %1 as the target type. + 目標とする型に %1 を型変換することはできません。 - - C5E (163 x 229 mm) - C5E (163 x 229mm) + + It is not possible to cast from %1 to %2. + 型 %1 を型 %2 に型変換することはできません。 - - DLE (110 x 220 mm) - DLE (110 x 220mm) + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + 型 %1 への型変換はできません。抽象型であり、インスタンス化することができないからです。 - - Executive (7.5 x 10 inches, 191 x 254 mm) - Executive (7.5 x 10インチ、191 x 254mm) + + It's not possible to cast the value %1 of type %2 to %3 + 型 %2 の値 %1 を、型 %3 に型変換することはできません - - Folio (210 x 330 mm) - Folio (210 x 330mm) + + Failure when casting from %1 to %2: %3 + %1 を %2 に型変換することができません: %3 - - Ledger (432 x 279 mm) - Ledger (432 x 279mm) + + A comment cannot contain %1 + コメントが %1 を含むことはできません - - Legal (8.5 x 14 inches, 216 x 356 mm) - Legal (8.5 x 14インチ、216 x 356mm) + + A comment cannot end with a %1. + コメントは %1 で終了することはできません。 - - Letter (8.5 x 11 inches, 216 x 279 mm) - Letter (8.5 x 11インチ、216 x 279mm) + + No comparisons can be done involving the type %1. + 型 %1 に対して比較を行うことはできません。 - - Tabloid (279 x 432 mm) - Tabloid (279 x 432mm) + + Operator %1 is not available between atomic values of type %2 and %3. + オペレータ %1 は、アトミックな型である %2 と %3 には適用できません。 - - US Common #10 Envelope (105 x 241 mm) - US Common #10 Envelope (105 x 241mm) + + In a namespace constructor, the value for a namespace cannot be an empty string. + 名前空間のスントラクトにおいて、空白の文字列を名前空間の値として使用することはできません。 - Print dialog - プリントダイアログ + + The prefix must be a valid %1, which %2 is not. + プレフィックスは %1 でなければなりません。%2 は無効です。 - Size: - サイズ: + + The prefix %1 cannot be bound. + プレフィックス %1 はバウンドできません。 - Printer - プリンタ + + Only the prefix %1 can be bound to %2 and vice versa. + プレフィックス %1 は、%2 にのみバウンドできます。逆も同じです。 - Properties - プロパティ + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + ドキュメントノードの子として属性ノードを指定することはできません。属性 %1 は誤った場所にあります。 - Printer info: - プリンタ情報: + + Circularity detected + 循環を検出しました - Copies - 印刷部数 + + A library module cannot be evaluated directly. It must be imported from a main module. + ライブラリモジュールを直接評価することはできません。メインモジュールからインポートする必要があります。 - Collate - 丁合い + + No template by name %1 exists. + テンプレート名 %1 は存在しません。 - Other - その他 + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + 型 %1 は述部として使用できません。数値型か、論理型である必要があります。 - Double side printing - 両面印刷 + + A positional predicate must evaluate to a single numeric value. + positional? + 述部は評価されたとき、単一の数値になるようにしなければなりません。 - - - - Print - 印刷 + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + ターゲットとしている名前は、%1 であってはなりません。%2 は無効です。 - File - ファイル + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + %1 はターゲットとして無効です。%2 である必要があります。例えば "%3" のようにです。 - - Print To File ... - ファイルへ出力... + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + バスの末端であるリーフは、単一のノードかアトミックな値である必要があります。複数の型の組み合わせであってはいけません。 - - File %1 is not writable. -Please choose a different file name. - ファイル %1 は書き込み可能ではありません。 -別のファイル名を選んでください。 + + The data of a processing instruction cannot contain the string %1 + 処理中のデータは、以下の文字列を含んでいてはなりません: %1 - - %1 already exists. -Do you want to overwrite it? - %1 はすでに存在します。 -上書きしますか? + + No namespace binding exists for the prefix %1 + プレフィックス %1 にバインドされたネームスペースがありません - - File exists - + + No namespace binding exists for the prefix %1 in %2 + %2 におけるプレフィックス %1 にバインディングされたネームスペースが存在しません - - <qt>Do you want to overwrite it?</qt> - + + + %1 is an invalid %2 + 型 %2 に対し、値 %1 は無効です - - Print selection - + + The parameter %1 is passed, but no corresponding %2 exists. + パラメータ %1 を処理しました。しかし、対応する %2 が存在しません。 - - %1 is a directory. -Please choose a different file name. - + + The parameter %1 is required, but no corresponding %2 is supplied. + パメータ %1 が必要です。しかし、対応する %2 がありません。 - - - A0 - + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + %1 は、最大で %n 個の引数をとることができます。%2 は無効です。 + - - - A1 - + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + %1 は、少くとも %n 個の引数を必要とします。%2 は無効です。 + - - A2 - + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + %1 への最初の引数は、型 %2 であってはなりません。数値型、xs:yerMonthDuration、xs:dayTimeDurationである必要があります。 - - A3 - + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + %1 への最初の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 - - A4 - + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + %1 への二つ目の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 - - A5 - + + %1 is not a valid XML 1.0 character. + %1 は XML 1.0 において有効な文字ではありません。 - - A6 - + + The first argument to %1 cannot be of type %2. + %1 への最初の引数は、型 %2 であってはなりません。 - - A7 - + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + %1 への二つ目の引数のルートノードは、ドキュメントノードでなければなりません。しかし、%2 はドキュメントノードではありません。 - - A8 - + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + ゾーンオフセットってなに? xmlにそんなのあったっけ? + もし二つの値がゾーンオフセットをもつ場合、両者は同じゾーンオフセットでなければなりません。%1 と %2 は同一ではありません。 - - A9 - + + %1 was called. + %1 が呼ばれました。 - - B0 - + + %1 must be followed by %2 or %3, not at the end of the replacement string. + %1 の後には、%2 か %3 が続かなければなりません。 - - B1 - + + In the replacement string, %1 must be followed by at least one digit when not escaped. + 置換操作において、%1 には少くとも一文字以上の数値が続く必要があります(エスケープされている場合を除く)。 - - B2 - + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + 置換操作において、%1 はそれ自身または %2 をエスケープする為にのみ使用できます。%3 に対しては使用できません - - B3 - + + %1 matches newline characters + %1 は改行文字(列)にマッチしました - - B4 - + + %1 and %2 match the start and end of a line. + %1 と %2 は、行の先頭と末尾にマッチしました。 - - B5 - + + Matches are case insensitive + マッチは大文字小文字を区別しません - - B6 - + + Whitespace characters are removed, except when they appear in character classes + CDATA? + 空白文字は削除されました。ただし、キャラクタークラスに属するものは除きます - - B7 - + + %1 is an invalid regular expression pattern: %2 + %1 は有効な正規表現ではありません。: %2 - - B8 - + + %1 is an invalid flag for regular expressions. Valid flags are: + %1 は正規表現において無効なフラグです。使用可能なフラグは次の通りです: - - B9 - + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + もし、最初の引数が空白からなる文字列か、長さが0 (名前空間をともなわない)である場合、プレフィックスを指定することはできません。しかし、プレフィックスとして %1 が指定されています。 - - B10 - + + It will not be possible to retrieve %1. + %1 を取得することはできないかもしれません。 - - C5E - + + The default collection is undefined + デフォルトのコレクションが定義されていません - - DLE - + + %1 cannot be retrieved + %1 を取得できません - - Executive - + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + つまり、空白の文字です、はどうでもいいよね。 + 正規化された表現 %1 はサポートされていません。サポートされている表現は、%2, %3, %4, %5 のみです。 - - Folio - + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + ゾーンオフセットは、%1 から %2 の範囲である必要があります(境界を含む)。%3 は範囲外です。 - - Ledger - + + %1 is not a whole number of minutes. + %1 は、分を現す値ではありません。 - - Legal - + + The URI cannot have a fragment + この URI はフラグメントをもつことはできません - - Letter - + + Required cardinality is %1; got cardinality %2. + カーディナリティ %1 が必要です。%2 ではありません。 - - Tabloid - + + The item %1 did not match the required type %2. + アイテム %1 は、要求された型 %2 にマッチしません。 - - US Common #10 Envelope - + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + エレメント %2 に属性 %1 を指定することはできません。標準の属性のみが許可されています。 - - Custom - + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + エレメント %2 に属性 %1 を指定することはできません。%3 と標準の属性のみが許可されています。 - - - &Options >> - + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + エレメント %2 に属性 %1 を指定することはできません。%3, %4 と標準の属性のみが許可されています。 - - &Print - + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + エレメント %2 に %1 は指定できません。%3 と標準の属性のみが指定できます。 - - &Options << - + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + XSLT エレメントに対するXSLT属性は、名前空間がnullでなければなりません。%1 は使用できません。 - - Print to File (PDF) - + + The attribute %1 must appear on element %2. + 属性 %1 は、エレメント %2 にのみ記述できます。 - - Print to File (Postscript) - + + The element with local name %1 does not exist in XSL-T. + ローカル名 %1 のエレメントは、XSLTに存在しません。 - - Local file - + + The variable %1 is unused + 値 %1 は使用されませんでした - - Write %1 file - + + A construct was encountered which only is allowed in XQuery. + XQuery でのみ許可されている construct に遭遇しました。 - - The 'From' value cannot be greater than the 'To' value. - + + + %1 is an unknown schema type. + %1 はサポートされていないスキーマのタイプです。 - - - QPrintPreviewDialog - - - Page Setup - + + A template by name %1 has already been declared. + テンプレート名 '%1' は、既に宣言されています。 - - %1% - + + %1 is not a valid numeric literal. + %1 は数値リテラルとして無効です。 - - Print Preview - + + Only one %1 declaration can occur in the query prolog. + クェリーのプロローグでは、%1 は一回のみ宣言できます。 - - Next page - + + The initialization of variable %1 depends on itself + 再帰? + 値 %1 の初期化は、それ自身に依存しています - - Previous page - + + No variable by name %1 exists + 変数 %1 は存在しません - - First page - + + Version %1 is not supported. The supported XQuery version is 1.0. + バージョン %1 はサポートされていません。XQuery バージョン 1.0 のみサポートされています。 - - Last page - + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + エンコーディング '%1' は無効です。ラテン文字 (空白を除く) からなるもので、正規表現 '%2' にマッチするもののみ使用できます。 - - Fit width - + + No function with signature %1 is available + シグネチャ %1 をもつ関数がみつかりません - - Fit page - + + + A default namespace declaration must occur before function, variable, and option declarations. + 標準の名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 + + + + Namespace declarations must occur before function, variable, and option declarations. + 名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 - Zoom in - + Module imports must occur before function, variable, and option declarations. + モジュールのインポートは、関数、変数、オプションの宣言の前にしなければなりません。 - - Zoom out - + + The keyword %1 cannot occur with any other mode name. + キーワード %1 は、他の名をともなって使用することはできません。 - - Portrait - + + The value of attribute %1 must of type %2, which %3 isn't. + 属性 '%1' の値として '%3' が指定されましたが、型 '%2' でなければなりません。 - - Landscape - + + It is not possible to redeclare prefix %1. + プレフィックス '%1' を再定義することはできません。 - - Show single page - + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + プレフィックス '%1' はバウンドできません。デフォルトでは、それは既に名前空間 '%2' にバウンドされています。 - - Show facing pages - + + Prefix %1 is already declared in the prolog. + プロローグ部において、プレフィックス '%1' はすでに宣言されています。 - - Show overview of all pages - + + The name of an option must have a prefix. There is no default namespace for options. + オプションの名前はプレフィックスをもたなければなりません。このオプションに対するデフォルトの名前空間は存在しません。 - - Print - + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + このスキーマのインポート機能は使用できません。また、'%1' 宣言も使用できません。 - - Page setup - + + The target namespace of a %1 cannot be empty. + 名前空間 '%1' は、空であってはなりません。 - - Close - 閉じる + + The module import feature is not supported + モジュールインポートの機能はサポートされていません - - Export to PDF - + + A variable by name %1 has already been declared. + 名前 '%1' の変数は、すでに宣言されています。 - - Export to PostScript - + + No value is available for the external variable by name %1. + 外部変数 '%1' の値がみつかりません。 - - - QPrintPropertiesDialog - PPD Properties - 印刷プロパティのダイアログのプロパティ + + A stylesheet function must have a prefixed name. + スタイルシート関数は、プレフィックス名を持たなければなりません。 - Save - 保存 + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + ユーザ定義の関数の名前空間は、空であってはなりません。(すでに定義されているプレフィックス '%1' が使用できます) - OK - OK + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + 名前空間 '%1' は予約済です。ユーザ定義の関数では使用することはできません。プレフィックス '%2' が使用できます。 - - - QPrintPropertiesWidget - - Form - + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + ライブラリモジュールで使用されている名前空間は、モジュールの名前空間と同一でなければなりません。つまり、'%2' ではなく、'%1' でなければなりません - - Page - + + A function already exists with the signature %1. + シグネチャー '%1' の関数はすでに存在しています。 - - Advanced - + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + 外部関数はサポートされていません。すべてのサポートされている関数は、外部宣言をすることなく、直接使用することができます - - - QPrintSettingsOutput - - Form - + + An argument by name %1 has already been declared. Every argument name must be unique. + 引数名 '%1' は既に宣言されています。すべての引数名はユニークである必要があります。 - - Copies - 印刷部数 + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + パターン一致の内側で関数 '%1' を使用する場合、引数はリテラルな文字列を参照する値でなければなりません。 - - Print range - 印刷範囲 + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + XSL-T パターンマッチングにおいて、関数 '%1' の最初の引数は、リテラルな文字列でなければなりません。 - - Print all - すべて印刷 + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + variable ref? + XSL-T パターンマッチングにおいて、関数 '%1' への最初の引数は、リテラルか変数でなければなりません。 - - Pages from - 先頭のページ: + + In an XSL-T pattern, function %1 cannot have a third argument. + XSL-T パターンにおいて、関数 '%1' は三つの引数をもつことはできません。 - - to - 末尾のページ: + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + XSL-T パターンマッチングにおいて、関数 '%1' と '%2' のみ使用できます。'%3' は使用できません。 - - Selection - 選択した部分を印刷 + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + XSL-T パターンにおいて、axis %1 は使用できません。%2 または %3 のみ使用できます。 - - Output Settings - + + %1 is an invalid template mode name. + %1 はテンプレートモジュール名として無効です。 - - Copies: - + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + for 構文において使用する変数は、場所に関する変数とは異なる必要があります。つまり、'%1' が重複して使用されています。 - - Collate - 丁合い + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + スキーマの検証機能はサポートされていません。よって、'%1' 構文は使用できません。 - - Reverse - + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + pragma 構文はサポートされていません。fallback 構文でなければなりません - - Options - + + Each name of a template parameter must be unique; %1 is duplicated. + テンプレートパラメータ名はユニークである必要があります。'%1' は重複しています。 - - Color Mode - + + The %1-axis is unsupported in XQuery + XQuery において、%1 axis はサポートされていません - - Color - + + No function by name %1 is available. + 関数名 '%1' はみつかりません。 - - Grayscale - + + The namespace URI cannot be the empty string when binding to a prefix, %1. + プレフィックス '%1' にバインディングする名前空間の URI は、空であってはなりません。 - - Duplex Printing - + + %1 is an invalid namespace URI. + %1 は名前空間 URI として無効です。 - - None - + + It is not possible to bind to the prefix %1 + プレフィックス %1 にバインドすることはできません - - Long side - + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + ? + 名前空間 %1 は %2 にのみバウンドできます。 - - Short side - + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + プリフィックス %1 は %2 にのみバウンドできます。 - - - QPrintWidget - - Form - + + Two namespace declaration attributes have the same name: %1. + 二つの名前空間宣言の属性が、同じ名前 '%1' をもっています。 - - Printer - プリンタ + + The namespace URI must be a constant and cannot use enclosed expressions. + 名前空間 URI は、constantでなければなりません。式を含むことはできません。 - - &Name: - + + An attribute by name %1 has already appeared on this element. + 属性名 '%1' は、すでにこのエレメントで使用されています。 - - P&roperties - + + A direct element constructor is not well-formed. %1 is ended with %2. + 直積的な指定のエレメントがwell formedではありません。'%1' が、'%2' で終わっています。 - - Location: - + + The name %1 does not refer to any schema type. + 名前 '%1' は、なんのスキーマタイプも参照していません。 - - Preview - + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + '%1' は complex 型です。complex 型への型変換はできません。しかし、アトミックな型である '%2' への変換はできます。 - - Type: - + + %1 is not an atomic type. Casting is only possible to atomic types. + '%1' はアトミックな型ではありません。型変換はアトミックな型に対してのみ可能です。 - - Output &file: - + + %1 is not a valid name for a processing-instruction. + 処理指定において、'%1' は無効です。 - - ... - + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + '%1' は、スコープ属性宣言ではありません。スキーマインポート機能はサポートされていません。 - - - QProcess - - - Could not open input redirection for reading - + + The name of an extension expression must be in a namespace. + 拡張式 (extension expression) の名前は、名前空間の中になければなりません。 - - - Could not open output redirection for writing - + + Element %1 is not allowed at this location. + この場所にエレメント '%1' をおくことは許されていません。 - - Resource error (fork failure): %1 - + + Text nodes are not allowed at this location. + この場所にテキストノードをおくことは許されていません。 - - - - - - - - - - Process operation timed out - + + Parse error: %1 + パースエラー: %1 - - - - - Error reading from process - + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + XSL-T バージョン属性の値は、'%1' 型でなければなりません。'%2' はそうではありません。 - - - - Error writing to process - + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + XSL-T 1.0 のスタイルシートを 2.0 のプロセッサで使用します。 - - Process crashed - + + Unknown XSL-T attribute %1. + 未知の XSL-T 属性 %1 があります。 - - No program defined - + + Attribute %1 and %2 are mutually exclusive. + 属性 '%1' と '%2' は排他的にのみ使用できます。 - - Process failed to start - + + In a simplified stylesheet module, attribute %1 must be present. + simplified stylesheet モジュールにおいては、属性 '%1' を指定されなければなりません。 - - - QProgressDialog - - Cancel - キャンセル + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + エレメント '%1' が属性 '%2' を持たない場合は、属性 '%3' や '%4' を使用することはできません。 - - - QPushButton - - Open - オープン + + Element %1 must have at least one of the attributes %2 or %3. + エレメント '%1' は、属性 '%2' か '%3' のいずれかを持たなければなりません。 - - - QRadioButton - - Check - 選択 + + At least one mode must be specified in the %1-attribute on element %2. + エレメント '%2' において、'%1' 属性は少くとも一つのモードを指定しなければなりません。 - - - QRegExp - - no error occurred - エラーは発生しませんでした + + Element %1 must come last. + エレメント %1 は最後になければなりません。 - - disabled feature used - 無効な機能が使用されました + + At least one %1-element must occur before %2. + %2 の前に、少くとも一つは %1 エレメントが存在しなければなりません。 - - bad char class syntax - 不正なcharクラス構文 + + Only one %1-element can appear. + %1 エレメントは一つのみ存在しなければなりません。 - - bad lookahead syntax - 不正なlookahead構文 + + At least one %1-element must occur inside %2. + %2 の内側には、少くとも一つの '%1' エレメントが存在しなければなりません。 - - bad repetition syntax - 不正なrepetition構文 + + When attribute %1 is present on %2, a sequence constructor cannot be used. + %2 に属性 %1 がある場合、sequence constructor は使用できません。 - - invalid octal value - 無効な8進値 + + Element %1 must have either a %2-attribute or a sequence constructor. + エレメント %1 には、%2 属性またはsequence constructorがなければなりません。 - - missing left delim - 左の区切り文字がありません + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + パラメータが要求されているときには、デフォルトの値は、%1 属性または sequence constructor によって指定されていてはなりません。 - - unexpected end - 予期しない末尾です + + Element %1 cannot have children. + エレメント %1 は、子要素を持つことができません。 - - met internal limit - 内部制限を満たしました + + Element %1 cannot have a sequence constructor. + エレメント %1 は、sequence constructor を含むことができません。 - - - QSQLite2Driver - - Error to open database - データベースのオープンでエラーが発生しました + + + The attribute %1 cannot appear on %2, when it is a child of %3. + %2 が %3 の子要素であるときは、属性 %1 を使用してはなりません。 - - Unable to begin transaction - トランザクションを開始できません + + A parameter in a function cannot be declared to be a tunnel. + 関数へのパラメータは、トンネルであってはなりません。 - - Unable to commit transaction - トランザクションをコミットできません + + This processor is not Schema-aware and therefore %1 cannot be used. + この処理系は、Schema-aware ではありません。よって、%1 は使用できません。 - - Unable to rollback Transaction - トランザクションをロールバックできません + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + トップレベルのスタイルシートのエレメントは、non-nullな名前空間を持っていなければなりません。しかし、%1 はそうではありません。 - - - QSQLite2Result - - Unable to fetch results - 実行結果をフェッチできません + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + エレメント %2 の属性 %1 の値は、%3 または %4 でなければなりません。%5 は異なります。 - - Unable to execute statement - ステートメントを実行できません + + Attribute %1 cannot have the value %2. + 属性 %1 に、値 %2 を指定することはできません。 - - - QSQLiteDriver - - Error opening database - データベースのオープンでエラーが発生しました + + The attribute %1 can only appear on the first %2 element. + 属性 %1 は、最初の %2 エレメントにのみ指定できます。 - - Error closing database - データベースのクローズでエラーが発生しました + + At least one %1 element must appear as child of %2. + %2 の子要素としては、少くとも一つは %1 エレメントがなければなりません。 - - Unable to begin transaction - トランザクションを開始できません + + empty + - - Unable to commit transaction - トランザクションをコミットできません + + zero or one + ゼロまたは一つ - Unable to roll back transaction - トランザクションをロールバックできません + + exactly one + 厳密に一つ - - Unable to rollback transaction - トランザクションをロールバックできません + + one or more + 一つまたは複数 - - - QSQLiteResult - - - - Unable to fetch row - レコードをフェッチできません + + zero or more + ゼロまたはそれ以上 - - Unable to execute statement - ステートメントを実行できません + + Required type is %1, but %2 was found. + 要求されている型は %1 ですが、 %2 があります。 - - Unable to reset statement - ステートメントをリセットできません + + Promoting %1 to %2 may cause loss of precision. + %1 を %2 に変換する際に、精度のロスが生じます。 - - Unable to bind parameters - パラメータをバインドできません + + The focus is undefined. + フォーカスが定義されていません。 + + + + It's not possible to add attributes after any other kind of node. + 他の種類のノードの中では、属性を追加することはできません。 - Parameter count mismatch - パラメータの数が合っていません + An attribute by name %1 has already been created. + 名前 '%1' の属性は、すでに生成されています。 - - No query - + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + UNICODE Codepoint Collection のみ使用できます(%1)。 %2 はサポートされていません。 - QScrollBar + QPluginLoader - - Scroll here - ここにスクロール + + Unknown error + 不明なエラー - - Left edge - 左端 + + The plugin was not loaded. + そのプラグインはロードされていません。 + + + QPrintDialog - - Top - 上端 + Page size: + ページサイズ: - - Right edge - 右端 + Orientation: + 方向: - - Bottom - 下端 + Paper source: + 給紙装置: - - Page left - 1ページ左へスクロール + + OK + OK - - - Page up - 1ページ戻る + Cancel + キャンセル - - Page right - 1ページ右へスクロール + Portrait + - - - Page down - 1ページ進む + Landscape + - - Scroll left - 左へスクロール + + locally connected + ローカルに接続しています - - Scroll up - 上へスクロール + + + Aliases: %1 + エイリアス: %1 - - Scroll right - 右へスクロール + + + unknown + 不明 - - Scroll down - 下へスクロール + Print in color if available + 可能であればカラーで印刷 - - Line up - 1行上へ + Print to file + ファイルに出力: - - Position - 位置 + Browse + 参照... - - Line down - 1行下へ + + Print all + すべて印刷 - - - QSharedMemory - - %1: unable to set key on lock - + Selection + 選択した部分を印刷 - - %1: create size is less then 0 - + + Print range + 印刷範囲 - - - %1: unable to lock - + Pages from + 先頭のページ: - - %1: unable to unlock - + to + 末尾のページ: - - - %1: permission denied - + Print last page first + 末尾のページから印刷 - - - %1: already exists - + Number of copies: + 部数: - - - %1: doesn't exists - + Paper format + 用紙の形式 - - - %1: out of resources - + + A0 (841 x 1189 mm) + A0 (841 x 1189mm) - - - %1: unknown error %2 - + + A1 (594 x 841 mm) + A1 (594 x 841mm) - - %1: key is empty - + + A2 (420 x 594 mm) + A2 (420 x 594mm) - - %1: unix key file doesn't exists - + + A3 (297 x 420 mm) + A3 (297 x 420mm) - - %1: ftok failed - + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297mm、8.26 x 11.7インチ) - - - %1: unable to make key - + + A5 (148 x 210 mm) + A5 (148 x 210mm) - - %1: system-imposed size restrictions - + + A6 (105 x 148 mm) + A6 (105 x 148mm) - - %1: not attached - + + A7 (74 x 105 mm) + A7 (74 x 105mm) - - %1: invalid size - + + A8 (52 x 74 mm) + A8 (52 x 74mm) - - %1: key error - + + A9 (37 x 52 mm) + A9 (37 x 52mm) - - %1: size query failed - + + B0 (1000 x 1414 mm) + B0 (1000 x 1414mm) - - - QShortcut - - Space - Space + + B1 (707 x 1000 mm) + B1 (707 x 1000mm) - Esc - Esc + B2 (500 x 707 mm) + B2 (500 x 707mm) - Tab - Tab + B3 (353 x 500 mm) + B3 (353 x 500mm) - Backtab - Backtab + B4 (250 x 353 mm) + B4 (250 x 353mm) - Backspace - Backspace + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250mm、6.93 x 9.84インチ) - Return - Return + B6 (125 x 176 mm) + B6 (125 x 176mm) - Enter - Enter + B7 (88 x 125 mm) + B7 (88 x 125mm) - Ins - Ins + B8 (62 x 88 mm) + B8 (62 x 88mm) - Del - Del + B9 (44 x 62 mm) + B9 (44 x 62mm) - Pause - Pause + B10 (31 x 44 mm) + B10 (31 x 44mm) - Print - Print + C5E (163 x 229 mm) + C5E (163 x 229mm) - SysReq - SysReq + DLE (110 x 220 mm) + DLE (110 x 220mm) - Home - Home + Executive (7.5 x 10 inches, 191 x 254 mm) + Executive (7.5 x 10インチ、191 x 254mm) - End - End + Folio (210 x 330 mm) + Folio (210 x 330mm) - Left - + Ledger (432 x 279 mm) + Ledger (432 x 279mm) - Up - + Legal (8.5 x 14 inches, 216 x 356 mm) + Legal (8.5 x 14インチ、216 x 356mm) - Right - + Letter (8.5 x 11 inches, 216 x 279 mm) + Letter (8.5 x 11インチ、216 x 279mm) - Down - + Tabloid (279 x 432 mm) + Tabloid (279 x 432mm) - PgUp - PgUp + US Common #10 Envelope (105 x 241 mm) + US Common #10 Envelope (105 x 241mm) - - PgDown - PgDown + Print dialog + プリントダイアログ - - CapsLock - CapsLock + Size: + サイズ: - - NumLock - NumLock + Printer + プリンタ - - ScrollLock - ScrollLock + Properties + プロパティ - - Menu - メニュー + Printer info: + プリンタ情報: - - Help - ヘルプ + Copies + 印刷部数 - - Back - 戻る + Collate + 丁合い - - Forward - 進む + Other + その他 - - Stop - 停止 + Double side printing + 両面印刷 - - Refresh - 更新間隔 + + + + Print + 印刷 - - Volume Down - 音量を下げる + File + ファイル - - Volume Mute - 消音 + + Print To File ... + ファイルへ出力... - - Volume Up - 音量を上げる + + File %1 is not writable. +Please choose a different file name. + ファイル %1 は書き込み可能ではありません。 +別のファイル名を選んでください。 - - Bass Boost - 低音ブースト + + %1 already exists. +Do you want to overwrite it? + %1 はすでに存在します。 +上書きしますか? - - Bass Up - 低音を上げる + + File exists + ファイルは既に存在しています - Bass Down - 低音を下げる + <qt>Do you want to overwrite it?</qt> + <qt>ファイルを上書きしてもよろしいですか?</qt> - - Treble Up - 高音を上げる + + Print selection + 選択された範囲を印刷 - - Treble Down - 高音を下げる + + %1 is a directory. +Please choose a different file name. + %1 はディレクトリです。 +ファイル名を指定してください。 + + + + A0 + A0 - Media Play - メディアの再生 + A1 + A1 - Media Stop - メディアの停止 + A2 + A2 - Media Previous - 前のメディア + A3 + A3 - Media Next - 次のメディア + A4 + A4 - Media Record - メディアの録音 + A5 + A5 - Home Page - ホームページ + A6 + A6 - Favorites - お気に入り + A7 + A7 - Search - 検索 + A8 + A8 - Standby - スタンバイ + A9 + A9 - Open URL - URLを開く + B0 + B0 - Launch Mail - メールの起動 + B1 + B1 - Launch Media - メディアの起動 + B2 + B2 - Launch (0) - (0)の起動 + B3 + B3 - Launch (1) - (1)の起動 + B4 + B4 - Launch (2) - (2)の起動 + B5 + B5 - Launch (3) - (3)の起動 + B6 + B6 - Launch (4) - (4)の起動 + B7 + B7 - Launch (5) - (5)の起動 + B8 + B8 - Launch (6) - (6)の起動 + B9 + B9 - Launch (7) - (7)の起動 + B10 + B10 - Launch (8) - (8)の起動 + C5E + C5E - Launch (9) - (9)の起動 + DLE + DLE - Launch (A) - (A)の起動 + Executive + Exclusive - Launch (B) - (B)の起動 + Folio + Folio - Launch (C) - (C)の起動 + Ledger + Ledger - Launch (D) - (D)の起動 + Legal + リーガルサイズ - Launch (E) - (E)の起動 + Letter + レターサイズ - Launch (F) - (F)の起動 + Tabloid + タブロイドサイズ - - Print Screen - Print Screen + + US Common #10 Envelope + US標準#10封筒 - Page Up - Page Up + Custom + カスタム - - Page Down - Page Down + + + &Options >> + オプション(&O) >> - - Caps Lock - Caps Lock + + &Print + 印刷(&P) - - Num Lock - Num Lock + + &Options << + オプション(&O) << - - Number Lock - Number Lock + + Print to File (PDF) + PDFファイルに出力 - Scroll Lock - Scroll Lock + Print to File (Postscript) + Postscriptファイルに出力 + + + + Local file + ローカルファイル - Insert - Insert + Write %1 file + ファイル %1 に書き込みました + + + + The 'From' value cannot be greater than the 'To' value. + QPrintPropertiesWidgetにFromとToがあってそれを指している + 印刷開始ページ番号は、印刷終了ページ番号より小さくなければなりません。 + + + + QPrintPreviewDialog + + + + Page Setup + ページの設定 + + + + %1% + %1% + + + + Print Preview + 印刷のプレビュー + + + + Next page + 次のページ - Delete - Delete + Previous page + 前のページ - Escape - Escape + First page + 最初のページ - System Request - System Request + Last page + 最後のページ - - Select - Select + + Fit width + 幅をあわせる - Yes - はい + Fit page + 高さをあわせる + + + + Zoom in + 拡大 - No - いいえ + Zoom out + 縮小 - - Context1 - Context1 + + Portrait + - Context2 - Context2 + Landscape + - - Context3 - Context3 + + Show single page + 一枚のページを表示する - Context4 - Context4 + Show facing pages + 見開きのページを表示する - Call - Call + Show overview of all pages + すべてのページを表示する - - Hangup - Hangup + + Print + 印刷 - Flip - Flip + Page setup + ページの設定 - - - Ctrl - Ctrl + Close + 閉じる - - - Shift - Shift + + Export to PDF + PDFに出力 - - - Alt - Alt + + Export to PostScript + Postscriptに出力 + + + QPrintPropertiesDialog - - - Meta - Meta + PPD Properties + 印刷プロパティのダイアログのプロパティ - - + - + + Save + 保存 - - F%1 - F%1 + OK + OK - QSlider + QPrintPropertiesWidget - - Page left - 1ページ左へスクロール + + Form + 書式 - - Page up - 1ページ戻る + + Page + ページ - - Position - 位置 + + Advanced + 高度な設定 + + + QPrintSettingsOutput - - Page right - 1ページ右へスクロール - + + Form + 書式 - - Page down - 1ページ進む + + Copies + 印刷部数 - - - QSocks5SocketEngine - - Connection to proxy refused - + + Print range + 印刷範囲 - - Connection to proxy closed prematurely - + + Print all + すべて印刷 - - Proxy host not found - + + Pages from + 先頭のページ - - Connection to proxy timed out - + + to + 末尾のページ - - Proxy authentication failed - + + Selection + 選択した部分を印刷 - - Proxy authentication failed: %1 - + + Output Settings + 出力設定 - - SOCKS version 5 protocol error - + + Copies: + 印刷部数: - - General SOCKSv5 server failure - + + Collate + 丁合い - - Connection not allowed by SOCKSv5 server - + + Reverse + 逆順 - - TTL expired - + + Options + オプション - - SOCKSv5 command not supported - + + Color Mode + - - Address type not supported - + + Color + カラー - - Unknown SOCKSv5 proxy error code 0x%1 - + + Grayscale + グレースケール - Socks5 timeout error connecting to socks server - Socks5 はソックスサーバ接続しようとしてタイムアウトになりました + + Duplex Printing + 両面印刷 - - Network operation timed out - ネットワーク操作がタイムアウトしました + + None + なし - - - QSpinBox - - More - 増やす + + Long side + 長辺綴じ - - Less - 減らす + + Short side + 短辺綴じ - QSql + QPrintWidget - - Delete - 削除 + + Form + 書式 - - Delete this record? - このレコードを削除しますか? + + Printer + プリンタ - - - - Yes - はい - - - - - - No - いいえ + + &Name: + 名前(&N): - - Insert - 挿入 + + P&roperties + プロパティ(&r) - - Update - アップデート + + Location: + 設置場所: - - Save edits? - 編集内容を保存しますか? + + Preview + プレビュー - - Cancel - キャンセル + + Type: + タイプ: - - Confirm - 確認 + + Output &file: + 出力ファイル名(&f): - - Cancel your edits? - 編集をキャンセルしますか? + + ... + ... - QSslSocket - - - Error creating SSL context (%1) - - - - - Invalid or empty cipher list (%1) - - - - - Cannot provide a certificate with no key, %1 - - + QProcess - - Error loading local certificate, %1 - + + + Could not open input redirection for reading + 標準入力リダイレクトを読み込みのためにオープンすることができません - Error loading private key, %1 - - - - - Private key does not certificate public key, %1 - - - - - Error creating SSL session, %1 - - - - - Error creating SSL session: %1 - - - - - Unable to write data: %1 - + + Could not open output redirection for writing + 標準出力リダイレクトを書き込みのためにオープンすることができません - - Error while reading: %1 - + + Resource error (fork failure): %1 + リソースエラー (fork に失敗しました): %1 - - Error during SSL handshake: %1 - + + + + + + + + + + Process operation timed out + プロセス処理がタイムアウトしました - - - QSystemSemaphore - - - %1: out of resources - + + + + + Error reading from process + プロセスからの読み込みにおいてエラーが発生しました - - - %1: permission denied - + + + + Error writing to process + プロセスへの書き込みにおいてエラーが発生しました - - %1: already exists - + + Process crashed + プロセスがクラッシュしました - - %1: does not exist - + + No program defined + プログラム名が指定されていません - - - %1: unknown error %2 - + + Process failed to start + プロセスのスタートに失敗しました - QTDSDriver - - - Unable to open connection - 接続をオープンできません - + QProgressDialog - - Unable to use database - データベースを使用できません + + Cancel + キャンセル - QTabBar - - - Scroll Left - 左へスクロール - + QPushButton - - Scroll Right - 右へスクロール + + Open + オープン - QTcpServer - - Socket operation unsupported - ソケット操作はサポートされていません - + QRadioButton - - Operation on socket is not supported - + + Check + 選択 - QTextControl - - - &Undo - 元に戻す(&U) - + QRegExp - - &Redo - やり直す(&R) + + no error occurred + エラーは発生しませんでした - - Cu&t - 切り取り(&T) + + disabled feature used + 無効な機能が使用されました - - &Copy - コピー(&C) + + bad char class syntax + 不正なcharクラス構文 - - Copy &Link Location - リンクの場所をコピー(&L) + + bad lookahead syntax + 不正なlookahead構文 - - &Paste - 貼り付け(&P) + + bad repetition syntax + 不正なrepetition構文 - - Delete - 削除 + + invalid octal value + 無効な8進値 - - Select All - すべてを選択 + + missing left delim + 左の区切り文字がありません - - - QToolButton - - - Press - 押す + + unexpected end + 予期しない末尾です - - - Open - オープン + + met internal limit + 内部制限を満たしました - QUdpSocket + QSQLite2Driver - - This platform does not support IPv6 - このプラットフォームは IPv6 をサポートしていません + + Error to open database + データベースのオープンでエラーが発生しました - - - QUndoGroup - - Undo - 元に戻す + + Unable to begin transaction + トランザクションを開始できません - - Redo - やり直す + + Unable to commit transaction + トランザクションをコミットできません - - - QUndoModel - - <empty> - <空> + + Unable to rollback Transaction + トランザクションをロールバックできません - QUndoStack + QSQLite2Result - - Undo - 元に戻す + + Unable to fetch results + 実行結果をフェッチできません - - Redo - やり直す + + Unable to execute statement + ステートメントを実行できません - QUnicodeControlCharacterMenu - - - LRM Left-to-right mark - - - - - RLM Right-to-left mark - - - - - ZWJ Zero width joiner - - + QSQLiteDriver - - ZWNJ Zero width non-joiner - + + Error opening database + データベースのオープンでエラーが発生しました - - ZWSP Zero width space - + + Error closing database + データベースのクローズでエラーが発生しました - - LRE Start of left-to-right embedding - + + Unable to begin transaction + トランザクションを開始できません - - RLE Start of right-to-left embedding - + + Unable to commit transaction + トランザクションをコミットできません - - LRO Start of left-to-right override - + Unable to roll back transaction + トランザクションをロールバックできません - - RLO Start of right-to-left override - + + Unable to rollback transaction + トランザクションをロールバックできません + + + QSQLiteResult - - PDF Pop directional formatting - + + + + Unable to fetch row + レコードをフェッチできません - - Insert Unicode control character - Unicode制御文字を挿入 + + Unable to execute statement + ステートメントを実行できません - - - QWebFrame - - Request cancelled - + + Unable to reset statement + ステートメントをリセットできません - - Request blocked - + + Unable to bind parameters + パラメータをバインドできません - Cannot show URL - + Parameter count mismatch + パラメータの数が合っていません - - Frame load interruped by policy change - + + No query + クェリーがありません + + + QScrollBar - - Cannot show mimetype - + + Scroll here + ここにスクロール - - File does not exist - + + Left edge + 左端 - - - QWebPage - - Bad HTTP request - + + Top + 上端 - - Submit - default label for Submit buttons in forms on web pages - + + Right edge + 右端 - - Submit - Submit (input element) alt text for <input> elements with no alt, title, or value - + + Bottom + 下端 - - Reset - default label for Reset buttons in forms on web pages - リセット + + Page left + 1ページ左へスクロール - - This is a searchable index. Enter search keywords: - text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - + + + Page up + 1ページ戻る - - Choose File - title for file button used in HTML forms - + + Page right + 1ページ右へスクロール - - No file selected - text to display in file button used in HTML forms when no file is selected - + + + Page down + 1ページ進む - - Open in New Window - Open in New Window context menu item - + + Scroll left + 左へスクロール - - Save Link... - Download Linked File context menu item - + + Scroll up + 上へスクロール - - Copy Link - Copy Link context menu item - + + Scroll right + 右へスクロール - - Open Image - Open Image in New Window context menu item - + + Scroll down + 下へスクロール - - Save Image - Download Image context menu item - + + Line up + 1行上へ - - Copy Image - Copy Link context menu item - + + Position + 位置 - - Open Frame - Open Frame in New Window context menu item - + + Line down + 1行下へ + + + QSharedMemory - - Copy - Copy context menu item - + + %1: unable to set key on lock + 共有メモリ関連 + %1: ロックするためのキーを設定できません - - Go Back - Back context menu item - + + %1: create size is less then 0 + %1: 0より小さいサイズの共有メモリは作成できません - - Go Forward - Forward context menu item - + + + %1: unable to lock + %1: ロックできません - - Stop - Stop context menu item - 停止 + + %1: unable to unlock + %1: アンロックできません - - Reload - Reload context menu item - + + + %1: permission denied + %1: 許可されていません - - Cut - Cut context menu item - + + + %1: already exists + %1: 既に存在します - - Paste - Paste context menu item - + + + %1: doesn't exists + %1: 存在しません - - No Guesses Found - No Guesses Found context menu item - + + + %1: out of resources + %1: リソース不足です - - Ignore - Ignore Spelling context menu item - 無視 + + + %1: unknown error %2 + %1: 未知のエラー %2 - - Add To Dictionary - Learn Spelling context menu item - + + %1: key is empty + %1: キーが空です - - Search The Web - Search The Web context menu item - + + %1: unix key file doesn't exists + ? + %1: UNIX key file が存在しません - - Look Up In Dictionary - Look Up in Dictionary context menu item - + + %1: ftok failed + %1: fork に失敗しました - - Open Link - Open Link context menu item - + + + %1: unable to make key + %1: キーを作成できません - - Ignore - Ignore Grammar context menu item - 無視 + + %1: system-imposed size restrictions + EINVAL + %1: 指定されたサイズはシステムにより拒否されました - - Spelling - Spelling and Grammar context sub-menu item - + + %1: not attached + %1: アタッチしていません - - Show Spelling and Grammar - menu item title - + + %1: invalid size + %1: 無効なサイズです - - Hide Spelling and Grammar - menu item title - + + %1: key error + safekey.isEmpty()==true + %1: キーかありません - - Check Spelling - Check spelling context menu item - + + %1: size query failed + %1: サイズのクェリーに失敗しました + + + QShortcut - - Check Spelling While Typing - Check spelling while typing context menu item - + + Space + Space - - Check Grammar With Spelling - Check grammar with spelling context menu item - + + Esc + Esc - - Fonts - Font context sub-menu item - + + Tab + Tab - - Bold - Bold context menu item - + + Backtab + Backtab - - Italic - Italic context menu item - + + Backspace + Backspace - - Underline - Underline context menu item - + + Return + Return - - Outline - Outline context menu item - + + Enter + Enter - - Direction - Writing direction context sub-menu item - + + Ins + Ins - - Text Direction - Text direction context sub-menu item - + + Del + Del - - Default - Default writing direction context menu item - + + Pause + Pause - - LTR - Left to Right context menu item - + + Print + Print - - RTL - Right to Left context menu item - + + SysReq + SysReq - - Inspect - Inspect Element context menu item - + + Home + Home - - No recent searches - Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - + + End + End - - Recent searches - label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - + + Left + - - Clear recent searches - menu item in Recent Searches menu that empties menu's contents - + + Up + - - Unknown - Unknown filesize FTP directory listing item - 不明 + + Right + - - %1 (%2x%3 pixels) - Title string for images - + + Down + - - Web Inspector - %2 - + + PgUp + PgUp - - Scroll here - ここにスクロール + + PgDown + PgDown - - Left edge - 左端 + + CapsLock + CapsLock - - Top - 上端 + + NumLock + NumLock - Right edge - 右端 + ScrollLock + ScrollLock - - Bottom - 下端 + + Menu + メニュー + + + + Help + ヘルプ - Page left - 1ページ左へスクロール + Back + 戻る - - Page up - 1ページ戻る + + Forward + 進む - Page right - + Stop + 停止 - - Page down - 1ページ進む + + Refresh + 更新間隔 - - Scroll left - 左へスクロール + + Volume Down + 音量を下げる - - Scroll up - 上へスクロール + + Volume Mute + 消音 - Scroll right - 右へスクロール + Volume Up + 音量を上げる - - Scroll down - 下へスクロール + + Bass Boost + 低音ブースト - - - %n file(s) - number of chosen file - - - + + + Bass Up + 低音を上げる - - JavaScript Alert - %1 - + + Bass Down + 低音を下げる - - JavaScript Confirm - %1 - + + Treble Up + 高音を上げる - - JavaScript Prompt - %1 - + + Treble Down + 高音を下げる - - Move the cursor to the next character - + + Media Play + メディアの再生 - - Move the cursor to the previous character - + + Media Stop + メディアの停止 - - Move the cursor to the next word - + + Media Previous + 前のメディア - - Move the cursor to the previous word - + + Media Next + 次のメディア - - Move the cursor to the next line - + + Media Record + メディアの録音 - - Move the cursor to the previous line - + + Home Page + ホームページ - - Move the cursor to the start of the line - + + Favorites + お気に入り - - Move the cursor to the end of the line - + + Search + 検索 - - Move the cursor to the start of the block - + + Standby + スタンバイ - - Move the cursor to the end of the block - + + Open URL + URLを開く - - Move the cursor to the start of the document - + + Launch Mail + メールの起動 - - Move the cursor to the end of the document - + + Launch Media + メディアの起動 - - Select all - + + Launch (0) + (0)の起動 - - Select to the next character - + + Launch (1) + (1)の起動 - - Select to the previous character - + + Launch (2) + (2)の起動 - - Select to the next word - + + Launch (3) + (3)の起動 - - Select to the previous word - + + Launch (4) + (4)の起動 - - Select to the next line - + + Launch (5) + (5)の起動 - - Select to the previous line - + + Launch (6) + (6)の起動 - - Select to the start of the line - + + Launch (7) + (7)の起動 - - Select to the end of the line - + + Launch (8) + (8)の起動 - - Select to the start of the block - + + Launch (9) + (9)の起動 - - Select to the end of the block - + + Launch (A) + (A)の起動 - - Select to the start of the document - + + Launch (B) + (B)の起動 - - Select to the end of the document - + + Launch (C) + (C)の起動 - - Delete to the start of the word - + + Launch (D) + (D)の起動 - - Delete to the end of the word - + + Launch (E) + (E)の起動 - - Insert a new paragraph - + + Launch (F) + (F)の起動 - - Insert a new line - + + Print Screen + Print Screen - - - QWhatsThisAction - - What's This? - ヒント + + Page Up + Page Up - - - QWidget - - * - * + + Page Down + Page Down - - - QWizard - - Go Back - + + Caps Lock + Caps Lock - - Continue - + + Num Lock + Num Lock - - Commit - + + Number Lock + Number Lock - - Done - + + Scroll Lock + Scroll Lock - - Help - ヘルプ + + Insert + Insert - - < &Back - < 戻る(&B) + + Delete + Delete - - &Finish - 完了(&F) + + Escape + Escape - - Cancel - キャンセル + + System Request + System Request - - &Help - ヘルプ(&H) + + Select + Select - - &Next - + + Yes + はい - - &Next > - 次へ(&N) > + + No + いいえ - - - QWorkspace - - &Restore - 元に戻す(&R) + + Context1 + Context1 - &Move - 移動(&M) + Context2 + Context2 - &Size - サイズを変更(&S) + Context3 + Context3 - - Mi&nimize - 最小化(&N) + + Context4 + Context4 - - Ma&ximize - 最大化(&X) + + Call + Call - - &Close - 閉じる(&C) + + Hangup + Hangup - - Stay on &Top - 常に手前に表示(&T) + + Flip + Flip - - - Sh&ade - シェード(&A) + + + Ctrl + Ctrl - - - %1 - [%2] - %1 - [%2] + + + Shift + Shift - - Minimize - 最小化 + + + Alt + Alt - - Restore Down - 元に戻す + + + Meta + Meta - - Close - 閉じる + + + + + - - &Unshade - シェードを解除(&U) + + F%1 + F%1 - QXml - - - no error occurred - エラーは発生しませんでした - + QSlider - - error triggered by consumer - 消費者によってエラーが誘発されました + + Page left + 1ページ左へスクロール - - unexpected end of file - 予期せぬファイルの終りです + + Page up + 1ページ戻る - - more than one document type definition - ドキュメントタイプの定義が複数あります + + Position + 位置 - - error occurred while parsing element - 要素の解析中にエラーが発生しました + + Page right + 1ページ右へスクロール - - tag mismatch - タグが一致しません + + Page down + 1ページ進む + + + QSocks5SocketEngine - - error occurred while parsing content - コンテンツの解析中にエラーが発生しました + + Connection to proxy refused + プロキシーへの接続が拒否されました - - unexpected character - 予期しない文字です + + Connection to proxy closed prematurely + プロキシーの接続が通信の終了前に切断されました - - invalid name for processing instruction - 処理の指示に無効な名前です + + Proxy host not found + プロキシーホストが見つかりません - - version expected while reading the XML declaration - XML宣言を読み込むにはバージョンが必要です + + Connection to proxy timed out + プロキシーとの接続がタイムアウトしました - - wrong value for standalone declaration - スタンドアロン宣言として正しくない値です + + Proxy authentication failed + プロキシーの認証に失敗しました - encoding declaration or standalone declaration expected while reading the XML declaration - XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です + Proxy authentication failed: %1 + プロキシーの認証に失敗しました: %1 - - standalone declaration expected while reading the XML declaration - XML宣言を読み込むにはスタンドアローン宣言が必要です + + SOCKS version 5 protocol error + SOCKS バージョン 5 プロトコルのエラーです - - error occurred while parsing document type definition - ドキュメントタイプの定義を解析中にエラーが発生しました + + General SOCKSv5 server failure + SOCKS バージョン 5 サーバのエラーです - - letter is expected - 文字が必要です + + Connection not allowed by SOCKSv5 server + SOCKSv5 サーバより接続を拒否されました - - error occurred while parsing comment - コメントの解析中にエラーが発生しました + + TTL expired + 実際はホップ数です + 有効期限(TTL)がきれました - - error occurred while parsing reference - 参照の解析中にエラーが発生しました + + SOCKSv5 command not supported + この SOCKSv5 コマンドはサポートされていません - - internal general entity reference not allowed in DTD - 内部一般エンティティ参照はDTDで許されていません + + Address type not supported + 指定されたアドレスタイプはサポートされていません - - external parsed general entity reference not allowed in attribute value - 解析された外部一般エンティティ参照は属性値で許されていません + + Unknown SOCKSv5 proxy error code 0x%1 + 未知の SOCKSv5 プロキシーエラーです: 0x%1 - - external parsed general entity reference not allowed in DTD - 解析された外部一般エンティティ参照はDTDで許されていません + Socks5 timeout error connecting to socks server + Socks5 はソックスサーバ接続しようとしてタイムアウトになりました - - unparsed entity reference in wrong context - 不正な文脈で解析されないエンティティ参照です + + Network operation timed out + ネットワーク操作がタイムアウトしました + + + QSpinBox - - recursive entities - 再帰的エンティティ + + More + 増やす - - error in the text declaration of an external entity - 外部エンティティのテキスト宣言にエラーがあります + + Less + 減らす - QXmlStream + QSql - - - Extra content at end of document. - + + Delete + 削除 - - Invalid entity value. - + + Delete this record? + このレコードを削除しますか? - - Invalid XML character. - + + + + Yes + はい - - Sequence ']]>' not allowed in content. - + + + + No + いいえ - - - Encountered incorrectly encoded content. - + + Insert + 挿入 - - Namespace prefix '%1' not declared - + + Update + アップデート - - Attribute redefined. - + + Save edits? + 編集内容を保存しますか? - - Unexpected character '%1' in public id literal. - + + Cancel + キャンセル - - Invalid XML version string. - + + Confirm + 確認 - - Unsupported XML version. - + + Cancel your edits? + 編集をキャンセルしますか? + + + + QSslSocket + + + Error creating SSL context (%1) + SSL content の作成に失敗しました (%1) - - The standalone pseudo attribute must appear after the encoding. - + + Invalid or empty cipher list (%1) + 暗号方式リストが無効または空です (%1) - - %1 is an invalid encoding name. - + + Cannot provide a certificate with no key, %1 + 鍵が指定されていないため、証明書を扱えません。 %1 - Encoding %1 is unsupported - + Error loading local certificate, %1 + ローカルの証明書をロードできません。 %1 - - Standalone accepts only yes or no. - + + Error loading private key, %1 + プライベートキーをロードできません。 %1 - - Invalid attribute in XML declaration. - + + Private key does not certificate public key, %1 + プライベートキーが、パブリックキーの証明書となっていません %1 - - Premature end of document. - + + Error creating SSL session, %1 + SSL セッションを作成できません。 %1 - - Invalid document. - + + Error creating SSL session: %1 + SSL セッションを作成できません: %1 - - Expected - + + Unable to write data: %1 + 書き込みできません: %1 - - , but got ' - + + Error while reading: %1 + 読み込み時にエラーが発生しました: %1 - - Unexpected ' - + + Error during SSL handshake: %1 + SSL ハンドシェーク時にエラーが発生しました: %1 + + + QSystemSemaphore - - Expected character data. - + + + %1: out of resources + %1: リソース不足です - - Recursive entity detected. - + + + %1: permission denied + %1: 許可されていません - - Start tag expected. - + + %1: already exists + %1: 既に存在します - - NDATA in parameter entity declaration. - + + %1: does not exist + %1: 存在しません - - XML declaration not at start of document. - + + + %1: unknown error %2 + %1: 未知のエラーです %2 + + + QTDSDriver - - %1 is an invalid processing instruction name. - + + Unable to open connection + 接続をオープンできません - - Invalid processing instruction name. - + + Unable to use database + データベースを使用できません + + + QTabBar - - %1 is an invalid PUBLIC identifier. - + + Scroll Left + 左へスクロール - - - - - Illegal namespace declaration. - + + Scroll Right + 右へスクロール + + + QTcpServer - - Invalid XML name. - + Socket operation unsupported + ソケット操作はサポートされていません - - Opening and ending tag mismatch. - + + Operation on socket is not supported + このソケットへの操作はサポートされていません + + + + QTextControl + + + &Undo + 元に戻す(&U) - - Reference to unparsed entity '%1'. - + + &Redo + やり直す(&R) - - - - Entity '%1' not declared. - + + Cu&t + 切り取り(&T) - - Reference to external entity '%1' in attribute value. - + + &Copy + コピー(&C) - - Invalid character reference. - + + Copy &Link Location + リンクの場所をコピー(&L) - - - QtXmlPatterns - - An %1-attribute with value %2 has already been declared. - + + &Paste + 貼り付け(&P) - - An %1-attribute must have a valid %2 as value, which %3 isn't. - + + Delete + 削除 - - Network timeout. - + + Select All + すべてを選択 + + + QToolButton - - Element %1 can't be serialized because it appears outside the document element. - + + + Press + 押す - - Attribute %1 can't be serialized because it appears at the top level. - + + + Open + オープン + + + QUdpSocket - - Year %1 is invalid because it begins with %2. - + + This platform does not support IPv6 + このプラットフォームは IPv6 をサポートしていません + + + QUndoGroup - - Day %1 is outside the range %2..%3. - + + Undo + 元に戻す - - Month %1 is outside the range %2..%3. - + + Redo + やり直す + + + QUndoModel - - Overflow: Can't represent date %1. - + + <empty> + <空> + + + QUndoStack - - Day %1 is invalid for month %2. - + + Undo + 元に戻す - - Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; - + + Redo + やり直す + + + QUnicodeControlCharacterMenu - - Time %1:%2:%3.%4 is invalid. - + + LRM Left-to-right mark + LRM (左横書き指定) - - Overflow: Date can't be represented. - + + RLM Right-to-left mark + RLM (右横書き指定) - - - At least one component must be present. - + + ZWJ Zero width joiner + ZWJ (幅のない接続文字) - - At least one time component must appear after the %1-delimiter. - + + ZWNJ Zero width non-joiner + ZWNJ (幅のない非接続文字) - - No operand in an integer division, %1, can be %2. - + + ZWSP Zero width space + ZWSP (幅の無い空白) - - The first operand in an integer division, %1, cannot be infinity (%2). - + + LRE Start of left-to-right embedding + LRE (左横書き開始指定) - - The second operand in a division, %1, cannot be zero (%2). - + + RLE Start of right-to-left embedding + RLE (右横書き開始指定) - - %1 is not a valid value of type %2. - + + LRO Start of left-to-right override + LRO (左横書き上書き開始指定) - - When casting to %1 from %2, the source value cannot be %3. - + + RLO Start of right-to-left override + RLO (右横書き上書き開始指定) - - Integer division (%1) by zero (%2) is undefined. - + + PDF Pop directional formatting + PDF (方向上書きの終了指定) - - Division (%1) by zero (%2) is undefined. - + + Insert Unicode control character + Unicode制御文字を挿入 + + + QWebFrame - - Modulus division (%1) by zero (%2) is undefined. - + + Request cancelled + リクエストはキャンセルされました - - - Dividing a value of type %1 by %2 (not-a-number) is not allowed. - + + Request blocked + リクエストはブロックされました - - Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. - + + Cannot show URL + URL を表示できません - - Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. - + + Frame load interruped by policy change + ポリシーの変更により、フレームのロードが中断しました - - A value of type %1 cannot have an Effective Boolean Value. - + + Cannot show mimetype + MIME Type を表示できません - - Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - + + File does not exist + ファイルが存在しません + + + QWebPage - - Value %1 of type %2 exceeds maximum (%3). - + + Bad HTTP request + 誤った HTTP のリクエストです - - Value %1 of type %2 is below minimum (%3). - + + Submit + default label for Submit buttons in forms on web pages + 送信 - - A value of type %1 must contain an even number of digits. The value %2 does not. - + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + 送信 - - %1 is not valid as a value of type %2. - + + Reset + default label for Reset buttons in forms on web pages + リセット - - Operator %1 cannot be used on type %2. - + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + 検索が可能です。検索のためのキーワードを入力してください: - - Operator %1 cannot be used on atomic values of type %2 and %3. - + + Choose File + title for file button used in HTML forms + ファイルを選ぶ - - The namespace URI in the name for a computed attribute cannot be %1. - + + No file selected + text to display in file button used in HTML forms when no file is selected + ファイルが選択されていません - - The name for a computed attribute cannot have the namespace URI %1 with the local name %2. - + + Open in New Window + Open in New Window context menu item + 新しいウィンドウで開く - - Type error in cast, expected %1, received %2. - + + Save Link... + Download Linked File context menu item + リンク先を保存... - - When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. - + + Copy Link + Copy Link context menu item + リンク先をコピー - - No casting is possible with %1 as the target type. - + + Open Image + Open Image in New Window context menu item + イメージを開く - - It is not possible to cast from %1 to %2. - + + Save Image + Download Image context menu item + 画像を保存 - - Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. - + + Copy Image + Copy Link context menu item + 画像をコピー - - It's not possible to cast the value %1 of type %2 to %3 - + + Open Frame + Open Frame in New Window context menu item + フレームを新しいウィンドウで開く - - Failure when casting from %1 to %2: %3 - + + Copy + Copy context menu item + コピー - - A comment cannot contain %1 - + + Go Back + Back context menu item + 戻る - - A comment cannot end with a %1. - + + Go Forward + Forward context menu item + 進む - - No comparisons can be done involving the type %1. - + + Stop + Stop context menu item + 停止 - - Operator %1 is not available between atomic values of type %2 and %3. - + + Reload + Reload context menu item + リロード - - An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. - + + Cut + Cut context menu item + 切り取り - - A library module cannot be evaluated directly. It must be imported from a main module. - + + Paste + Paste context menu item + 貼り付け - - No template by name %1 exists. - + + No Guesses Found + No Guesses Found context menu item + 推測候補はありません - - A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. - + + Ignore + Ignore Spelling context menu item + 無視 - - A positional predicate must evaluate to a single numeric value. - + + Add To Dictionary + Learn Spelling context menu item + 辞書に追加 - - The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. - + + Search The Web + Search The Web context menu item + Web を検索 - - %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - + + Look Up In Dictionary + Look Up in Dictionary context menu item + 辞書から探す - - The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - + + Open Link + Open Link context menu item + リンクを開く - - The data of a processing instruction cannot contain the string %1 - + + Ignore + Ignore Grammar context menu item + 無視 - - No namespace binding exists for the prefix %1 - + + Spelling + Spelling and Grammar context sub-menu item + スペル - - No namespace binding exists for the prefix %1 in %2 - + + Show Spelling and Grammar + menu item title + スペルと文法を表示 - - - %1 is an invalid %2 - - - - - %1 takes at most %n argument(s). %2 is therefore invalid. - - - + + Hide Spelling and Grammar + menu item title + スペルと文法を隠す - - - %1 requires at least %n argument(s). %2 is therefore invalid. - - - + + + Check Spelling + Check spelling context menu item + スペルをチェックする - - The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. - + + Check Spelling While Typing + Check spelling while typing context menu item + 入力中にスペルをチェックする - - The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - + + Check Grammar With Spelling + Check grammar with spelling context menu item + スペルおよび文法をチェックする - - The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - + + Fonts + Font context sub-menu item + フォント - - %1 is not a valid XML 1.0 character. - + + Bold + Bold context menu item + 太字 - - The first argument to %1 cannot be of type %2. - + + Italic + Italic context menu item + イタリック - - If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. - + + Underline + Underline context menu item + 下線 - - %1 was called. - + + Outline + Outline context menu item + アウトライン - - %1 must be followed by %2 or %3, not at the end of the replacement string. - + + Direction + Writing direction context sub-menu item + 方向 - - In the replacement string, %1 must be followed by at least one digit when not escaped. - + + Text Direction + Text direction context sub-menu item + テキストの方向 - - In the replacement string, %1 can only be used to escape itself or %2, not %3 - + + Default + Default writing direction context menu item + デフォルト - - %1 matches newline characters - + + LTR + Left to Right context menu item + 左横書き - - %1 and %2 match the start and end of a line. - + + RTL + Right to Left context menu item + 右横書き - - Matches are case insensitive - + + Inspect + Inspect Element context menu item + ? + 検査 - - Whitespace characters are removed, except when they appear in character classes - + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + 検索の履歴はありません - - %1 is an invalid regular expression pattern: %2 - + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + 検索の履歴 - - %1 is an invalid flag for regular expressions. Valid flags are: - + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + 検索の履歴をクリア - - If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - + + Unknown + Unknown filesize FTP directory listing item + 不明 - - It will not be possible to retrieve %1. - + + %1 (%2x%3 pixels) + Title string for images + %1 (%2x%3 ピクセル) - - The root node of the second argument to function %1 must be a document node. %2 is not a document node. - + + Web Inspector - %2 + Web の検査 - %2 - - The default collection is undefined - + + Scroll here + ここにスクロール - - %1 cannot be retrieved - + + Left edge + 左端 - - The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - + + Top + 上端 - - A zone offset must be in the range %1..%2 inclusive. %3 is out of range. - + + Right edge + 右端 - - %1 is not a whole number of minutes. - + + Bottom + 下端 - - Required cardinality is %1; got cardinality %2. - + + Page left + 1ページ左へスクロール - - The item %1 did not match the required type %2. - + + Page up + 1ページ戻る - - - %1 is an unknown schema type. - + + Page right + 1ページ右へスクロール - - Only one %1 declaration can occur in the query prolog. - + + Page down + 1ページ進む - - The initialization of variable %1 depends on itself - + + Scroll left + 左へスクロール - - No variable by name %1 exists - + + Scroll up + 上へスクロール - - The variable %1 is unused - + + Scroll right + 右へスクロール - - Version %1 is not supported. The supported XQuery version is 1.0. - + + Scroll down + 下へスクロール + + + + %n file(s) + number of chosen file + + %n 個のファイル + - - The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. - + + JavaScript Alert - %1 + JavaScript アラート - %1 - - No function with signature %1 is available - + + JavaScript Confirm - %1 + JavaScript 確認 - %1 - - - A default namespace declaration must occur before function, variable, and option declarations. - + + JavaScript Prompt - %1 + JavaScript 質問 - %1 - - Namespace declarations must occur before function, variable, and option declarations. - + + Move the cursor to the next character + 次の文字へカーソルを移動 - - Module imports must occur before function, variable, and option declarations. - + + Move the cursor to the previous character + 前の文字にカーソルを移動 - - It is not possible to redeclare prefix %1. - + + Move the cursor to the next word + 次の単語にカーソルを移動 - - Prefix %1 is already declared in the prolog. - + + Move the cursor to the previous word + 前の単語にカーソルを移動 - - The name of an option must have a prefix. There is no default namespace for options. - + + Move the cursor to the next line + 次の行にカーソルを移動 - - The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - + + Move the cursor to the previous line + 前の行にカーソルを移動 - - The target namespace of a %1 cannot be empty. - + + Move the cursor to the start of the line + 文なのか行なのか + 文頭にカーソルを移動 - - The module import feature is not supported - + + Move the cursor to the end of the line + 文末にカーソルを移動 - - No value is available for the external variable by name %1. - + + Move the cursor to the start of the block + ブロックの先頭にカーソルを移動 - - A construct was encountered which only is allowed in XQuery. - + + Move the cursor to the end of the block + ブロックの末尾にカーソルを移動 - - A template by name %1 has already been declared. - + + Move the cursor to the start of the document + 文章の先頭にカーソルを移動 - - The keyword %1 cannot occur with any other mode name. - + + Move the cursor to the end of the document + 文章の末尾にカーソルを移動 - - The value of attribute %1 must of type %2, which %3 isn't. - + + Select all + すべてを選択 - - The prefix %1 can not be bound. By default, it is already bound to the namespace %2. - + + Select to the next character + 次の文字を選択 - - A variable by name %1 has already been declared. - + + Select to the previous character + 前の文字を選択 - - A stylesheet function must have a prefixed name. - + + Select to the next word + 次の単語を選択 - - The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - + + Select to the previous word + 前の単語を選択 - - The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. - + + Select to the next line + 次の行を選択 - - The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 - + + Select to the previous line + 前の行を選択 - - A function already exists with the signature %1. - + + Select to the start of the line + 文頭から選択 - - No external functions are supported. All supported functions can be used directly, without first declaring them as external - + + Select to the end of the line + 文末まで選択 - - An argument by name %1 has already been declared. Every argument name must be unique. - + + Select to the start of the block + ブロックの先頭から選択 - - When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. - + + Select to the end of the block + ブロックの末尾まで選択 - - In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. - + + Select to the start of the document + ドキュメントの先頭から選択 - - In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. - + + Select to the end of the document + ドキュメントの末尾まで選択 - - In an XSL-T pattern, function %1 cannot have a third argument. - + + Delete to the start of the word + 単語の先頭まで削除 - - In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. - + + Delete to the end of the word + 単語の末尾まで削除 - - In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. - + + Insert a new paragraph + 新しい段落を挿入 - - %1 is an invalid template mode name. - + + Insert a new line + 新しい行を挿入 + + + QWhatsThisAction - - The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. - + + What's This? + ヒント? + + + QWidget - - The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - + + * + * + + + QWizard - - None of the pragma expressions are supported. Therefore, a fallback expression must be present - + + Go Back + 戻る - - Each name of a template parameter must be unique; %1 is duplicated. - + + Continue + 続き - - The %1-axis is unsupported in XQuery - + + Commit + 適用 - - %1 is not a valid name for a processing-instruction. - + + Done + 終了 - - %1 is not a valid numeric literal. - + + Help + ヘルプ - - No function by name %1 is available. - + + < &Back + < 戻る(&B) - - The namespace URI cannot be the empty string when binding to a prefix, %1. - + + &Finish + 完了(&F) - - %1 is an invalid namespace URI. - + + Cancel + キャンセル - - It is not possible to bind to the prefix %1 - + + &Help + ヘルプ(&H) - - Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). - + + &Next + 次へ(&N) - - Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). - + + &Next > + 次へ(&N) > + + + QWorkspace - - Two namespace declaration attributes have the same name: %1. - + + &Restore + 元に戻す(&R) - - The namespace URI must be a constant and cannot use enclosed expressions. - + + &Move + 移動(&M) - - An attribute by name %1 has already appeared on this element. - + + &Size + サイズを変更(&S) - - A direct element constructor is not well-formed. %1 is ended with %2. - + + Mi&nimize + 最小化(&N) - - The name %1 does not refer to any schema type. - + + Ma&ximize + 最大化(&X) - - %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. - + + &Close + 閉じる(&C) - - %1 is not an atomic type. Casting is only possible to atomic types. - + + Stay on &Top + 常に手前に表示(&T) - - - %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - + + + Sh&ade + シェード(&A) - - The name of an extension expression must be in a namespace. - + + + %1 - [%2] + %1 - [%2] - - empty - + + Minimize + 最小化 - zero or one - + Restore Down + 元に戻す - - exactly one - + + Close + 閉じる - - one or more - + + &Unshade + シェードを解除(&U) + + + + QXml + + + no error occurred + エラーは発生しませんでした + + + + error triggered by consumer + 消費者によってエラーが誘発されました - - zero or more - + + unexpected end of file + 予期せぬファイルの終りです - - Required type is %1, but %2 was found. - + + more than one document type definition + ドキュメントタイプの定義が複数あります - - Promoting %1 to %2 may cause loss of precision. - + + error occurred while parsing element + 要素の解析中にエラーが発生しました - - The focus is undefined. - + + tag mismatch + タグが一致しません - - It's not possible to add attributes after any other kind of node. - + + error occurred while parsing content + コンテンツの解析中にエラーが発生しました - - An attribute by name %1 has already been created. - + + unexpected character + 予期しない文字です - - Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - + + invalid name for processing instruction + 処理の指示に無効な名前です - - %1 is an unsupported encoding. - + + version expected while reading the XML declaration + XML宣言を読み込むにはバージョンが必要です - - %1 contains octets which are disallowed in the requested encoding %2. - + + wrong value for standalone declaration + スタンドアロン宣言として正しくない値です - - The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - + + encoding declaration or standalone declaration expected while reading the XML declaration + XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です - - Ambiguous rule match. - + + standalone declaration expected while reading the XML declaration + XML宣言を読み込むにはスタンドアローン宣言が必要です - - In a namespace constructor, the value for a namespace cannot be an empty string. - + + error occurred while parsing document type definition + ドキュメントタイプの定義を解析中にエラーが発生しました - - The prefix must be a valid %1, which %2 is not. - + + letter is expected + 文字が必要です - - The prefix %1 cannot be bound. - + + error occurred while parsing comment + コメントの解析中にエラーが発生しました - - Only the prefix %1 can be bound to %2 and vice versa. - + + error occurred while parsing reference + 参照の解析中にエラーが発生しました - - Circularity detected - + + internal general entity reference not allowed in DTD + 内部一般エンティティ参照はDTDで許されていません - - The parameter %1 is required, but no corresponding %2 is supplied. - + + external parsed general entity reference not allowed in attribute value + 解析された外部一般エンティティ参照は属性値で許されていません - - The parameter %1 is passed, but no corresponding %2 exists. - + + external parsed general entity reference not allowed in DTD + 解析された外部一般エンティティ参照はDTDで許されていません - - The URI cannot have a fragment - + + unparsed entity reference in wrong context + 不正な文脈で解析されないエンティティ参照です - - Element %1 is not allowed at this location. - + + recursive entities + 再帰的エンティティ - - Text nodes are not allowed at this location. - + + error in the text declaration of an external entity + 外部エンティティのテキスト宣言にエラーがあります + + + QXmlStream - - Parse error: %1 - + + + Extra content at end of document. + ドキュメントの末尾に余計なものがついています。 - - The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - + + Invalid entity value. + エンティティの値が無効です。 - - Running an XSL-T 1.0 stylesheet with a 2.0 processor. - + + Invalid XML character. + 無効な XML 文字です。 - - Unknown XSL-T attribute %1. - + + Sequence ']]>' not allowed in content. + このコンテキストでは、']]>' は許可されていません。 - - Attribute %1 and %2 are mutually exclusive. - + + + Encountered incorrectly encoded content. + 正しくないエンコードの文脈に遭遇しました。 - - In a simplified stylesheet module, attribute %1 must be present. - + + Namespace prefix '%1' not declared + 名前空間のブリフィックス '%1' は宣言されていません - - If element %1 has no attribute %2, it cannot have attribute %3 or %4. - + + Attribute redefined. + 属性が再度指定されています。 - - Element %1 must have at least one of the attributes %2 or %3. - + + Unexpected character '%1' in public id literal. + DTD宣言の部分 + 公開 ID 指定に使用できない文字 '%1' が使用されています。 - At least one mode must be specified in the %1-attribute on element %2. - + Invalid XML version string. + 無効な XML バージョン指定です。 - - Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. - + + Unsupported XML version. + この XML のバージョンはサポートされていません。 - - Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. - + + The standalone pseudo attribute must appear after the encoding. + &ddd; は、エンコーディングを指定していないと使えないということかな。utf8だとおもうけど。 + 仮想属性指定は、エンコーディング指定の後にのみ使用できます。 - - Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. - + + %1 is an invalid encoding name. + %1 は無効なエンコーディングの名前です。 - - Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. - + + Encoding %1 is unsupported + エンコーディング '%1' はサポートされていません - - XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. - + + Standalone accepts only yes or no. + standalone の指定は yes または no のみ指定できます。 - - The attribute %1 must appear on element %2. - + + Invalid attribute in XML declaration. + XML 宣言に無効な属性がついています。 - - The element with local name %1 does not exist in XSL-T. - + + Premature end of document. + ドキュメントが途中で終わっています。 - - Element %1 must come last. - + + Invalid document. + 無効なドキュメントです。 - - At least one %1-element must occur before %2. - + + Expected + 予期していた表現は、 - - Only one %1-element can appear. - + + , but got ' + ですが、取得した表現は以下のものでした ' - - At least one %1-element must occur inside %2. - + + Unexpected ' + 予期していなかった表現 ' - - When attribute %1 is present on %2, a sequence constructor cannot be used. - + + Expected character data. + 予期していた文字列。 - - Element %1 must have either a %2-attribute or a sequence constructor. - + + Recursive entity detected. + 再帰しているエンティティを発見しました。 - - When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. - + + Start tag expected. + 開始タグをよきしていましたが、みつかりません。 - - Element %1 cannot have children. - + + NDATA in parameter entity declaration. + パラメータエンティティの宣言において NDATA があります。 - - Element %1 cannot have a sequence constructor. - + + XML declaration not at start of document. + XML 宣言がドキュメントの先頭にありません。 - - - The attribute %1 cannot appear on %2, when it is a child of %3. - + + %1 is an invalid processing instruction name. + XMLにそんなのあったっけ? + %1 は無効な処理指定の名前です。 - - A parameter in a function cannot be declared to be a tunnel. - + + Invalid processing instruction name. + 無効な処理命令です。 - - This processor is not Schema-aware and therefore %1 cannot be used. - + + %1 is an invalid PUBLIC identifier. + %1 は、公開 (PUBLIC) 識別子として無効です。 - - Top level stylesheet elements must be in a non-null namespace, which %1 isn't. - + + + + + Illegal namespace declaration. + 無効な名前空間の指定です。 - - The value for attribute %1 on element %2 must either be %3 or %4, not %5. - + + Invalid XML name. + 無効な XML 名です。 - - Attribute %1 cannot have the value %2. - + + Opening and ending tag mismatch. + 開始タグと、終了タグがマッチしません。 - - The attribute %1 can only appear on the first %2 element. - + + Reference to unparsed entity '%1'. + まだパースしていないエンティティ '%1' を参照しています。 - - At least one %1 element must appear as child of %2. - + + + + Entity '%1' not declared. + エンティティ '%1' は宣言されていません。 - - - VolumeSlider - - Muted - + + Reference to external entity '%1' in attribute value. + 属性値として、外部エンティティ '%1' を再度指定しています。 - - - Volume: %1% - + + Invalid character reference. + 無効な文字への参照です。 -- cgit v0.12 From aef98360bfa5a5f3013c8fb29ed589545bb7a3cf Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Tue, 19 May 2009 10:20:53 +0200 Subject: Fix compiler warning: use C++ cast operator, not the old-style C cast. Reviewed-by: Marius Storm-Olsen --- src/corelib/tools/qbytearraymatcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h index 633e92c..970cbcc 100644 --- a/src/corelib/tools/qbytearraymatcher.h +++ b/src/corelib/tools/qbytearraymatcher.h @@ -70,7 +70,7 @@ public: inline QByteArray pattern() const { if (q_pattern.isNull()) - return QByteArray((const char*)p.p, p.l); + return QByteArray(reinterpret_cast(p.p), p.l); return q_pattern; } -- cgit v0.12 From 4bcc39e50b68d69f6b94b1095b35f678c42c5aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 May 2009 10:15:19 +0200 Subject: Fixed autotest failure in tst_QImage::smoothScale3() Some optimized smooth scaling functions were introduced in 4.5, so increase the tolerance level a small bit. Reviewed-by: Trond --- tests/auto/qimage/tst_qimage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp index ee4ece2..88bbb50 100644 --- a/tests/auto/qimage/tst_qimage.cpp +++ b/tests/auto/qimage/tst_qimage.cpp @@ -1454,9 +1454,9 @@ void tst_QImage::smoothScale3() QRgb cb = b.pixel(x, y); // tolerate a little bit of rounding errors - QVERIFY(compare(qRed(ca), qRed(cb), 2)); - QVERIFY(compare(qGreen(ca), qGreen(cb), 2)); - QVERIFY(compare(qBlue(ca), qBlue(cb), 2)); + QVERIFY(compare(qRed(ca), qRed(cb), 3)); + QVERIFY(compare(qGreen(ca), qGreen(cb), 3)); + QVERIFY(compare(qBlue(ca), qBlue(cb), 3)); } } } -- cgit v0.12 From 48328daeb082385bd8f8074ee77c7cbee9cde637 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 19 May 2009 10:51:30 +0200 Subject: Fix autotest compile for qitemview on windows Reviewed-by: Thomas Zander --- tests/auto/qitemview/tst_qitemview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qitemview/tst_qitemview.cpp b/tests/auto/qitemview/tst_qitemview.cpp index 748bd50..3317c1d 100644 --- a/tests/auto/qitemview/tst_qitemview.cpp +++ b/tests/auto/qitemview/tst_qitemview.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include "viewstotest.cpp" #include #if defined(Q_OS_WIN) -- cgit v0.12 From 46f776a1c6b7e72ebe69ecde130d514b69fe4319 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 19 May 2009 10:51:19 +0200 Subject: Fixed autotest tst_QPrinter::printDialogCompleter on Windows. QApplication::activeWindow() returns null for native dialogs, so null cannot be passed as the target widget when calling QTest::keyClick(). --- tests/auto/qprinter/tst_qprinter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp index cde4ae5..221e3b0 100644 --- a/tests/auto/qprinter/tst_qprinter.cpp +++ b/tests/auto/qprinter/tst_qprinter.cpp @@ -953,8 +953,9 @@ void tst_QPrinter::printDialogCompleter() QTest::qWait(100); - QTest::keyClick(0, Qt::Key_Tab); - QTest::keyClick(0, 'P'); + QTest::keyClick(&dialog, Qt::Key_Tab); + QTest::keyClick(&dialog, 'P'); + // The test passes if it doesn't crash. #endif } -- cgit v0.12 From 589a8689705dc0572990b416f7ef085986ff2f57 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 19 May 2009 11:00:41 +0200 Subject: Fix autotest for qitemmodel on windows Fixed a broken include Reviewed-by: Thomas Zander --- tests/auto/qitemmodel/tst_qitemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qitemmodel/tst_qitemmodel.cpp b/tests/auto/qitemmodel/tst_qitemmodel.cpp index ea1972e..d29a3e3 100644 --- a/tests/auto/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/qitemmodel/tst_qitemmodel.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include "modelstotest.cpp" #include Q_DECLARE_METATYPE(QModelIndex) -- cgit v0.12 From ba5fb9f05c891feac8ab69006189de1aaafebc18 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 19 May 2009 11:40:45 +0200 Subject: Cocoa 64: ssl does not work The reason is the tha config.test ssl failed building. And the reason for that was a bad makefile flag (i386_64). Task-number: 253887 Reviewed-by: Trenton Schulz --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index bd77174..20bf457 100755 --- a/configure +++ b/configure @@ -2717,6 +2717,7 @@ if [ "$PLATFORM_MAC" = "yes" ]; then # Build commmand line arguments we can pass to the compiler during configure tests # by prefixing each arch with "-arch". CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/x86/i386}" + CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/i386_64/x86_64}" for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH" done -- cgit v0.12 From 30f7edc0aab629499b74263391ae529ad31b2ff8 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Tue, 19 May 2009 10:42:46 +0200 Subject: Ignore GCC warning of unsafe floating point comparisons. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to optimizations, there are few cases where comparing with a constant is needed, e.g. in operator*=. G++ will give us a warning for this. Since we know what we are doing, surpress the warning. The only drawback for this workaround is if somebody includes qtransform.h in his code and disable the float-equal warning since the warning will be activated again. Reviewed-by: Samuel Rødal --- src/gui/painting/qtransform.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index c76409b..4ea1be3 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -255,6 +255,13 @@ inline qreal QTransform::dy() const return affine._dy; } +#if defined(Q_CC_GNU) +# define Q_CC_GNU_VERSION (((__GNUC__)<<16)|((__GNUC_MINOR__)<<8)|(__GNUC_PATCHLEVEL__)) +# if Q_CC_GNU_VERSION >= 0x040201 +# pragma GCC diagnostic ignored "-Wfloat-equal" +# endif +#endif + inline QTransform &QTransform::operator*=(qreal num) { if (num == 1.) @@ -311,6 +318,13 @@ inline QTransform &QTransform::operator-=(qreal num) return *this; } +#if defined(Q_CC_GNU_VERSION) +# if Q_CC_GNU_VERSION >= 0x040201 +# pragma GCC diagnostic warning "-Wfloat-equal" +# endif +# undef Q_GCC_GNU_VERSION +#endif + /****** stream functions *******************/ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTransform &); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTransform &); -- cgit v0.12 From ec9606bc65aaee81a4defea64afe58594349472a Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 19 May 2009 12:19:40 +0200 Subject: compile fixes with namespaces --- src/gui/image/qpixmapcache_p.h | 4 ++++ tools/kmap2qmap/main.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h index 66b30d2..5aa6eaf 100644 --- a/src/gui/image/qpixmapcache_p.h +++ b/src/gui/image/qpixmapcache_p.h @@ -58,6 +58,8 @@ #include #include "qcache.h" +QT_BEGIN_NAMESPACE + class QPixmapCache::KeyData { public: @@ -89,4 +91,6 @@ public: } }; +QT_END_NAMESPACE + #endif // QPIXMAPCACHE_P_H diff --git a/tools/kmap2qmap/main.cpp b/tools/kmap2qmap/main.cpp index b518392..12d91c6 100644 --- a/tools/kmap2qmap/main.cpp +++ b/tools/kmap2qmap/main.cpp @@ -384,10 +384,12 @@ static const symbol_synonyms_t symbol_synonyms[] = { static const int symbol_synonyms_size = sizeof(symbol_synonyms)/sizeof(symbol_synonyms_t); // makes the generated array in --header mode a bit more human readable +QT_BEGIN_NAMESPACE static bool operator<(const QWSKeyboard::Mapping &m1, const QWSKeyboard::Mapping &m2) { return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers; } +QT_END_NAMESPACE class KeymapParser { public: -- cgit v0.12 From c8f8405d154cf1c24b50777e5db2ac2ab1609b39 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 19 May 2009 12:29:55 +0200 Subject: qdoc: Corrected an escape sequence in the credits file. --- doc/src/credits.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc index 114e28d..b492967 100644 --- a/doc/src/credits.qdoc +++ b/doc/src/credits.qdoc @@ -188,7 +188,7 @@ Jesper K. Pedersen \br Jim Lauchlan \br Joachim Backes \br - Jochen Römmler \br + Jochen \ouml\c{}mmler \br Jochen Scharrlach \br Joe Croft \br Joel Lindholm \br -- cgit v0.12 From e5608cd95684a010510b136361415d47cfc53e8a Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 19 May 2009 12:38:16 +0200 Subject: Clearifying QUrl docs Adding more details on QUrl::addQueryItem() Task-number: 234125 Rev-by: Thiago Macieira --- src/corelib/io/qurl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 9ce9a2e..d1a5cdd 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4759,6 +4759,12 @@ void QUrl::setEncodedQueryItems(const QList > &que Inserts the pair \a key = \a value into the query string of the URL. + The key/value pair is encoded before it is added to the query. The + pair is converted into separate strings internally. The \a key and + \a value is first encoded into UTF-8 and then delimited by the + character returned by valueDelimiter(). Each key/value pair is + delimited by the character returned by pairDelimiter(). + \sa addEncodedQueryItem() */ void QUrl::addQueryItem(const QString &key, const QString &value) -- cgit v0.12 From 01fd310f47a4a0cf7a72366105cc36e07550494c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 19 May 2009 10:59:02 +0200 Subject: fix compiler warnings when qreal == float in tessellator autotest Reviewed-by: mauricek --- tests/auto/qtessellator/tst_tessellator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qtessellator/tst_tessellator.cpp b/tests/auto/qtessellator/tst_tessellator.cpp index 8958ac3..8899285 100644 --- a/tests/auto/qtessellator/tst_tessellator.cpp +++ b/tests/auto/qtessellator/tst_tessellator.cpp @@ -218,8 +218,8 @@ void tst_QTessellator::testArc() const int stop = 1000; #endif for (int i = 0; i < stop; ++i) { - mat.rotate(.01); - mat.scale(.99, .99); + mat.rotate(qreal(.01)); + mat.scale(qreal(.99), qreal(.99)); QPolygonF poly = arc.at(0); QPolygonF vec = poly * mat; QVERIFY(test_arc(vec, true)); @@ -361,11 +361,11 @@ void tst_QTessellator::testRects() QVector v(5); for (int i = 0; i < 5; ++i) v[i] = vec[5 * rect + i]; - if (!test(v.data(), v.size(), false, test_tessellate_polygon_rect, 0.05)) { + if (!test(v.data(), v.size(), false, test_tessellate_polygon_rect, qreal(0.05))) { simplifyTestFailure(v, false); ++failures; } - if (!test(v.data(), v.size(), true, test_tessellate_polygon_rect, 0.05)) { + if (!test(v.data(), v.size(), true, test_tessellate_polygon_rect, qreal(0.05))) { simplifyTestFailure(v, true); ++failures; } -- cgit v0.12 From ad9d9a93e1f63e2509e9cdb8c245853fb3c8674a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 19 May 2009 11:00:31 +0200 Subject: Windows CE autotest compile fixes Not always is "." in the includes path... Reviewed-by: mauricek --- tests/auto/qfuture/tst_qfuture.cpp | 2 +- tests/auto/qtessellator/testtessellator.cpp | 2 +- tests/auto/qtessellator/utils.cpp | 2 +- tests/auto/qthreadonce/tst_qthreadonce.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qfuture/tst_qfuture.cpp b/tests/auto/qfuture/tst_qfuture.cpp index 43fd614..383ecba 100644 --- a/tests/auto/qfuture/tst_qfuture.cpp +++ b/tests/auto/qfuture/tst_qfuture.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include "versioncheck.h" #include #include #include diff --git a/tests/auto/qtessellator/testtessellator.cpp b/tests/auto/qtessellator/testtessellator.cpp index bd2795c..423c1e8 100644 --- a/tests/auto/qtessellator/testtessellator.cpp +++ b/tests/auto/qtessellator/testtessellator.cpp @@ -38,7 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include +#include "testtessellator.h" #include #include "math.h" diff --git a/tests/auto/qtessellator/utils.cpp b/tests/auto/qtessellator/utils.cpp index 8a9dc1e..d408193 100644 --- a/tests/auto/qtessellator/utils.cpp +++ b/tests/auto/qtessellator/utils.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include "qnum.h" #define FloatToXFixed(i) (int)((i) * 65536) #define IntToXFixed(i) ((i) << 16) diff --git a/tests/auto/qthreadonce/tst_qthreadonce.cpp b/tests/auto/qthreadonce/tst_qthreadonce.cpp index 7e67dc3..f20788a 100644 --- a/tests/auto/qthreadonce/tst_qthreadonce.cpp +++ b/tests/auto/qthreadonce/tst_qthreadonce.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include "qthreadonce.h" //TESTED_CLASS= //TESTED_FILES=corelib/thread/qthreadonce.h corelib/thread/qthreadonce.cpp -- cgit v0.12 From c73a5b4abfb1f05f8f976c526e0954680a3ed00e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 19 May 2009 12:48:50 +0200 Subject: qdoc: Corrected a misspelled name. --- doc/src/credits.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc index b492967..6b48514 100644 --- a/doc/src/credits.qdoc +++ b/doc/src/credits.qdoc @@ -188,7 +188,7 @@ Jesper K. Pedersen \br Jim Lauchlan \br Joachim Backes \br - Jochen \ouml\c{}mmler \br + Jochen R\ouml\c{}mmler \br Jochen Scharrlach \br Joe Croft \br Joel Lindholm \br -- cgit v0.12 From 29b1965fd198b35d8f1af20becf9ed9cab54a49f Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Tue, 19 May 2009 12:45:31 +0200 Subject: Updated WebKit from /home/ariya/dev/webkit/qtwebkit-4.5 to origin/qtwebkit-4.5 ( 7b8d6ab6f2b73862d11c2a41ab0223e55585d88f ) Changes in WebKit since the last update: ++ b/WebKit/qt/ChangeLog 2009-03-27 Erik L. Bunce Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24746 Improved selection tests. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::textSelection): --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 11 ++++++ .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 39 ++++++++++++++++------ 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index f5402ce..9f85d76 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 1f83e4058bffd5a3fe7e44cf45add01953a772d4 + 7b8d6ab6f2b73862d11c2a41ab0223e55585d88f diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index c3bd633..2aeb8da 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,14 @@ +2009-03-27 Erik L. Bunce + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=24746 + + Improved selection tests. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::textSelection): + 2009-04-24 Simon Hausmann Rubber-stamped by Ariya Hidayat. diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index fe74fac..620aa31 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -872,14 +872,6 @@ void tst_QWebPage::textSelection() "

    May the source
    be with you!

    "); page->mainFrame()->setHtml(content); - // this will select the first paragraph - QString script = "var range = document.createRange(); " \ - "var node = document.getElementById(\"one\"); " \ - "range.selectNode(node); " \ - "getSelection().addRange(range);"; - page->mainFrame()->evaluateJavaScript(script); - QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox")); - // these actions must exist QVERIFY(page->action(QWebPage::SelectAll) != 0); QVERIFY(page->action(QWebPage::SelectNextChar) != 0); @@ -895,7 +887,8 @@ void tst_QWebPage::textSelection() QVERIFY(page->action(QWebPage::SelectStartOfDocument) != 0); QVERIFY(page->action(QWebPage::SelectEndOfDocument) != 0); - // right now they are disabled because contentEditable is false + // right now they are disabled because contentEditable is false and + // there isn't an existing selection to modify QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), false); QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), false); QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), false); @@ -912,11 +905,37 @@ void tst_QWebPage::textSelection() // ..but SelectAll is awalys enabled QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true); + // this will select the first paragraph + QString selectScript = "var range = document.createRange(); " \ + "var node = document.getElementById(\"one\"); " \ + "range.selectNode(node); " \ + "getSelection().addRange(range);"; + page->mainFrame()->evaluateJavaScript(selectScript); + QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox")); + + // here the actions are enabled after a selection has been created + QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectPreviousWord)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectNextLine)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectPreviousLine)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectStartOfLine)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectEndOfLine)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectStartOfBlock)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectEndOfBlock)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectStartOfDocument)->isEnabled(), true); + QCOMPARE(page->action(QWebPage::SelectEndOfDocument)->isEnabled(), true); + // make it editable before navigating the cursor page->setContentEditable(true); + // cursor will be before the word "The", this makes sure there is a charet + page->triggerAction(QWebPage::MoveToStartOfDocument); + QVERIFY(page->isSelectionCollapsed()); + QCOMPARE(page->selectionStartOffset(), 0); + // here the actions are enabled after contentEditable is true - QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true); QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true); QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true); QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true); -- cgit v0.12 From cf427e8dcbfc63cbad67117d2da6d554aea495a9 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 19 May 2009 12:49:29 +0200 Subject: make splitter autotest pass on mac too It's not enough to call processEvents() just once on all platforms. --- tests/auto/qsplitter/tst_qsplitter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp index b463f7f..51bd99f 100644 --- a/tests/auto/qsplitter/tst_qsplitter.cpp +++ b/tests/auto/qsplitter/tst_qsplitter.cpp @@ -55,6 +55,7 @@ #include #include #include // for file error messages +#include "../../shared/util.h" //TESTED_CLASS= //TESTED_FILES= @@ -1341,9 +1342,7 @@ void tst_QSplitter::task187373_addAbstractScrollAreas() if (addOutsideConstructor) splitter->addWidget(w); - qApp->processEvents(); - - QVERIFY(w->isVisible()); + QTRY_VERIFY(w->isVisible()); QVERIFY(!w->isHidden()); QVERIFY(w->viewport()->isVisible()); QVERIFY(!w->viewport()->isHidden()); -- cgit v0.12 From 071709fb6f3988f29767074c759436cccb33bcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Tue, 19 May 2009 12:04:15 +0200 Subject: qmake autotest: Remove dependency on Qt3 Support on Windows Reviewed-by: jbache --- tests/auto/qmake/testcompiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp index 122a2b8..7255d93 100644 --- a/tests/auto/qmake/testcompiler.cpp +++ b/tests/auto/qmake/testcompiler.cpp @@ -56,10 +56,8 @@ static QString targetName( BuildType buildMode, const QString& target, const QSt targetName.append(".exe"); break; case Dll: // dll - if (version != "") { - QStringList ver = QStringList::split(".", version); - targetName.append(ver.first()); - } + if (!version.empty()) + targetName.append(version.section(".", 0, 0)); targetName.append(".dll"); break; case Lib: // lib -- cgit v0.12 From 41ba7d4a000181607004d450a8130be902a42274 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 19 May 2009 10:39:50 +0200 Subject: grabWindow in MacGui test was grabbing the wrong area. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think grabWindow was borken and we were compensating for it in the auto test. Now that it works as documented our workaround broke. Reviewed-by: Morten Sørvig --- tests/auto/macgui/tst_gui.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/auto/macgui/tst_gui.cpp b/tests/auto/macgui/tst_gui.cpp index b302f8b..641e596 100644 --- a/tests/auto/macgui/tst_gui.cpp +++ b/tests/auto/macgui/tst_gui.cpp @@ -69,8 +69,7 @@ private slots: QPixmap grabWindowContents(QWidget * widget) { - const int titleBarHeight = widget->frameGeometry().height() - widget->height(); - return QPixmap::grabWindow(widget->winId(), 0, titleBarHeight, -1, widget->height()); + return QPixmap::grabWindow(widget->winId()); } /* @@ -79,10 +78,6 @@ QPixmap grabWindowContents(QWidget * widget) */ void tst_gui::scrollbarPainting() { -#if defined (Q_WS_MAC) && defined (__i386__) - QSKIP("This test fails on scruffy when run by the autotest system (but not when you run it manually).", SkipAll); -#endif - ColorWidget colorWidget; colorWidget.resize(400, 400); -- cgit v0.12 From 8413073fe3946ed37f6424f179898af63767f060 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 19 May 2009 13:08:16 +0200 Subject: Don't "hope" that a connection gets picked up; do it right! While downloadProgress and uploadProgress both work on local files. There still may be a delay before the connection is actually picked up. This usually is caught by the processEvents(), but could be missed. Therefore, do a wait if we don't have any pending connections and work in ALL cases. Reviewed-by: Markus Goetz --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index bb199b9..d651ce5 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2637,7 +2637,8 @@ void tst_QNetworkReply::downloadProgress() QVERIFY(spy.isValid()); QCoreApplication::instance()->processEvents(); - server.waitForNewConnection(0); // ignore result, since processEvents may have got it + if (!server.hasPendingConnections()) + server.waitForNewConnection(1000); QVERIFY(server.hasPendingConnections()); QCOMPARE(spy.count(), 0); @@ -2691,7 +2692,8 @@ void tst_QNetworkReply::uploadProgress() QVERIFY(finished.isValid()); QCoreApplication::instance()->processEvents(); - server.waitForNewConnection(0); // ignore result, since processEvents may have got it + if (!server.hasPendingConnections()) + server.waitForNewConnection(1000); QVERIFY(server.hasPendingConnections()); QTcpSocket *receiver = server.nextPendingConnection(); -- cgit v0.12 From 3fe79f2524b7d37ddbc93edbbd0530a7499b5450 Mon Sep 17 00:00:00 2001 From: Nils Christian Roscher-Nielsen Date: Tue, 19 May 2009 13:27:59 +0200 Subject: Clarifying what QLocale::C is and is not Reviewed-by: David Boddie --- src/corelib/tools/qlocale.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 559ba81..ab26945 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1589,7 +1589,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l) defaults to the default locale (see setDefault()). \endlist - The "C" locale is identical to \l{English}/\l{UnitedStates}. + The "C" locale is identical in behavior to \l{English}/\l{UnitedStates}. Use language() and country() to determine the actual language and country values used. @@ -1632,7 +1632,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l) This enumerated type is used to specify a language. - \value C The "C" locale is English/UnitedStates. + \value C The "C" locale is identical in behavior to English/UnitedStates. \value Abkhazian \value Afan \value Afar -- cgit v0.12 From e85bab636c2ab5d5b538363150433f6a0269a659 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 13:29:39 +0200 Subject: Use QtNetworkSettings, don't hard code IMAP host name. This should fix failures in Berlin. --- tests/auto/qiodevice/tst_qiodevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp index 03a0665..367a2e0 100644 --- a/tests/auto/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/qiodevice/tst_qiodevice.cpp @@ -120,7 +120,7 @@ void tst_QIODevice::constructing_QTcpSocket() QVERIFY(!device->isOpen()); - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(5000)); QVERIFY(device->isOpen()); @@ -134,7 +134,7 @@ void tst_QIODevice::constructing_QTcpSocket() QCOMPARE(socket.pos(), qlonglong(0)); socket.close(); - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(5000)); while (!device->canReadLine()) -- cgit v0.12 From 78e46412675ba15ab16965d651e35c94c5861f90 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 19 May 2009 13:29:45 +0200 Subject: network autotests: do not use imap.troll.no for testing ... but use the test server instead Reviewed-by: Frans Englich --- tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp | 8 ++++---- tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index 9ef8f9a..df83efe 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -451,14 +451,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -508,7 +508,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -533,7 +533,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); tcpSocketNonBlocking_data.clear(); tcpSocketNonBlocking_totalWritten = 0; diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index 86333e0..f8c2fdb 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -589,14 +589,14 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -646,7 +646,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -671,7 +671,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); tcpSocketNonBlocking_data.clear(); tcpSocketNonBlocking_totalWritten = 0; -- cgit v0.12 From fdce2331a7491b5452c63666267ca2b8b98d1298 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 13:53:12 +0200 Subject: Use QtNetworkSettings for IMAP server, instead of hard coding. Reviewed-by: Peter Hartmann --- tests/auto/qsslsocket/tst_qsslsocket.cpp | 6 +++--- tests/auto/qtcpserver/tst_qtcpserver.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 432092a..79fbf1b 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -416,7 +416,7 @@ void tst_QSslSocket::simpleConnect() connect(&socket, SIGNAL(sslErrors(const QList &)), this, SLOT(exitLoop())); // Start connecting - socket.connectToHost("imap.troll.no", 993); + socket.connectToHost(QtNetworkSettings::serverName(), 993); QCOMPARE(socket.state(), QAbstractSocket::HostLookupState); enterLoop(10); @@ -471,7 +471,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() connect(&socket, SIGNAL(sslErrors(const QList &)), this, SLOT(exitLoop())); // Start connecting - socket.connectToHost("imap.troll.no", 993); + socket.connectToHost(QtNetworkSettings::serverName(), 993); QCOMPARE(socket.state(), QAbstractSocket::HostLookupState); enterLoop(10); @@ -490,7 +490,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() if (!socket.canReadLine()) enterLoop(10); - QCOMPARE(socket.readAll(), QByteArray("* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n")); + QCOMPARE(socket.readAll(), QByteArray("* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n")); socket.disconnectFromHost(); } diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index 50b293d..4fd1827 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -364,7 +364,7 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest() void tst_QTcpServer::ipv4PerformanceTest() { QTcpSocket probeSocket; - probeSocket.connectToHost("imap.troll.no", 143); + probeSocket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(probeSocket.waitForConnected(5000)); QTcpServer server; -- cgit v0.12 From ac70ce3f2598f0f3aae64c2e39c580375fd62df0 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 19 May 2009 13:59:54 +0200 Subject: Set the resolution when saving a tiff file The resolution was not saved when the image was saved as tiff. This fix add the resolution, and try to guess if the user have set it in dpi or dot per centimeter Task-number: 245242 Reviewed-by: Samuel --- src/plugins/imageformats/tiff/qtiffhandler.cpp | 20 +++++++++++++- tests/auto/qimagewriter/tst_qimagewriter.cpp | 38 +++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/plugins/imageformats/tiff/qtiffhandler.cpp b/src/plugins/imageformats/tiff/qtiffhandler.cpp index 518e6d1..77dfeb3 100644 --- a/src/plugins/imageformats/tiff/qtiffhandler.cpp +++ b/src/plugins/imageformats/tiff/qtiffhandler.cpp @@ -168,7 +168,7 @@ bool QTiffHandler::read(QImage *image) break; default: // do nothing as defaults have already - // been set within the QImage class + // been set within the QImage class break; } for (uint32 y=0; y(image.logicalDpiX())) + && TIFFSetField(tiff, TIFFTAG_YRESOLUTION, static_cast(image.logicalDpiY())); + } + if (!resolutionSet) { + TIFFClose(tiff); + return false; + } // try to do the ARGB32 conversion in chunks no greater than 16 MB int chunks = (width * height * 4 / (1024 * 1024 * 16)) + 1; int chunkHeight = qMax(height / chunks, 1); diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp index 878d398..70d9e70 100644 --- a/tests/auto/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp @@ -97,6 +97,9 @@ private slots: void saveWithNoFormat_data(); void saveWithNoFormat(); + void resolution_data(); + void resolution(); + void saveToTemporaryFile(); }; @@ -162,7 +165,7 @@ tst_QImageWriter::tst_QImageWriter() tst_QImageWriter::~tst_QImageWriter() { - QDir dir("images"); + QDir dir(prefix + QLatin1String("images")); QStringList filesToDelete = dir.entryList(QStringList() << "gen-*" , QDir::NoDotAndDotDot | QDir::Files); foreach( QString file, filesToDelete) { QFile::remove(dir.absoluteFilePath(file)); @@ -530,6 +533,39 @@ void tst_QImageWriter::saveWithNoFormat() QVERIFY2(!outImage.isNull(), qPrintable(reader.errorString())); } +void tst_QImageWriter::resolution_data() +{ + QTest::addColumn("filename"); + QTest::addColumn("expectedDotsPerMeterX"); + QTest::addColumn("expectedDotsPerMeterY"); +#if defined QTEST_HAVE_TIFF + QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54)); + QTest::newRow("TIFF: 50 dpi") << ("image_50dpi.tif") << qRound(50 * (100 / 2.54)) << qRound(50 * (100 / 2.54)); + QTest::newRow("TIFF: 300 dot per meter") << ("image_300dpm.tif") << 300 << 300; +#endif +} + +void tst_QImageWriter::resolution() +{ + QFETCH(QString, filename); + QFETCH(int, expectedDotsPerMeterX); + QFETCH(int, expectedDotsPerMeterY); + + QImage image(prefix + QLatin1String("colorful.bmp")); + image.setDotsPerMeterX(expectedDotsPerMeterX); + image.setDotsPerMeterY(expectedDotsPerMeterY); + const QString generatedFilepath = prefix + "gen-" + filename; + { + QImageWriter writer(generatedFilepath); + QVERIFY(writer.write(image)); + } + QImageReader reader(generatedFilepath); + const QImage generatedImage = reader.read(); + + QCOMPARE(expectedDotsPerMeterX, generatedImage.dotsPerMeterX()); + QCOMPARE(expectedDotsPerMeterY, generatedImage.dotsPerMeterY()); +} + void tst_QImageWriter::saveToTemporaryFile() { QImage image(prefix + "kollada.png"); -- cgit v0.12 From 6402c393764c884e3e113a2bf155bf38ebcd9aa1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 19 May 2009 14:38:27 +0200 Subject: Fix webkit import on cygwin and gentoo Use .XXXXX in mktemp. Reviewed-by: Janne Koskinen --- util/webkit/mkdist-webkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index d4e6d9e..c26fdc1 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -185,7 +185,7 @@ fi rev=`git ls-remote $repository | grep -E "^.+$tag$" | awk '{print $1}'` -tarball=`mktemp /tmp/webkit-snapshot.tar` || exit 1 +tarball=`mktemp /tmp/webkit-snapshot.tar.XXXXXX` || exit 1 echo "creating $tarball" echo "archiving webkit from $repository $tag ( $rev )" -- cgit v0.12 From 70429c33f0687afd489e1055bc0e1f1f340e13b9 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 15:06:46 +0200 Subject: Adpot more code to use QtNetworkSettings instead of hard coded names. Reviewed-By: Peter Hartmann --- tests/auto/network-settings.h | 9 ++++++ tests/auto/q3socketdevice/tst_q3socketdevice.cpp | 7 +++-- .../qhttpsocketengine/tst_qhttpsocketengine.cpp | 23 ++++++--------- .../tst_qnativesocketengine.cpp | 16 ++++------- .../tst_qsocks5socketengine.cpp | 31 +++++++++----------- tests/auto/qsslsocket/tst_qsslsocket.cpp | 33 ++++++++++++---------- 6 files changed, 59 insertions(+), 60 deletions(-) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index b2a449a..5a2f9c3 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include +#include class QtNetworkSettings { @@ -63,4 +64,12 @@ public: { return "qt-test-server.wildcard.dev." + serverDomainName(); } + +#ifdef QT_NETWORK_LIB + static QHostAddress serverIP() + { + return QHostInfo::fromName(serverName()).addresses().first(); + } +#endif + }; diff --git a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp index 2b0c606..6255aee 100644 --- a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp +++ b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp @@ -45,6 +45,8 @@ #include +#include "../network-settings.h" + //TESTED_CLASS= //TESTED_FILES= @@ -97,8 +99,7 @@ void tst_Q3SocketDevice::readNull() int attempts = 10; while (attempts--) { - // connect to imap.troll.no - if (device.connect(QHostAddress("62.70.27.18"), 143)) + if (device.connect(QtNetworkSettings::serverIP(), 143)) break; } @@ -117,7 +118,7 @@ void tst_Q3SocketDevice::readNull() #endif QCOMPARE(device.peerPort(), quint16(143)); QCOMPARE(device.peerAddress().toString(), - QHostAddress("62.70.27.18").toString()); + QtNetworkSettings::serverIP().toString()); QCOMPARE(device.error(), Q3SocketDevice::NoError); // write a logout notice diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index 9ef8f9a..4c92119 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -137,8 +137,6 @@ public slots: } }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QHttpSocketEngine::tst_QHttpSocketEngine() { } @@ -307,12 +305,11 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128)); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); QVERIFY(!socketDevice.localAddress().isNull()); QVERIFY(socketDevice.localPort() > 0); @@ -328,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -369,7 +366,6 @@ void tst_QHttpSocketEngine::simpleErrorsAndStates() QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverName()), 8088)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); if (socketDevice.waitForWrite(15000)) { - qDebug() << socketDevice.state(); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState || socketDevice.state() == QAbstractSocket::UnconnectedState); } else { @@ -451,14 +447,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -508,7 +504,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -696,12 +692,11 @@ void tst_QHttpSocketEngine::passwordAuth() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128, "qsockstest", "password")); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -715,7 +710,7 @@ void tst_QHttpSocketEngine::passwordAuth() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp index 68ec414..90276f2 100644 --- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp +++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp @@ -100,8 +100,6 @@ private slots: void receiveUrgentData(); }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QNativeSocketEngine::tst_QNativeSocketEngine() { } @@ -155,15 +153,14 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol)); QVERIFY(socketDevice.state() == QAbstractSocket::UnconnectedState); - // Connect to imap.trolltech.com's IP - bool connected = socketDevice.connectToHost(QHostAddress(IMAP_IP), 143); - if (!connected) { + const bool isConnected = socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143); + if (!isConnected) { QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); } QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -176,7 +173,7 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(array.constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "ZZZ LOGOUT\r\n"; @@ -580,9 +577,8 @@ void tst_QNativeSocketEngine::networkError() QVERIFY(client.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol)); - // Connect to imap.trolltech.com's IP - bool connected = client.connectToHost(QHostAddress(IMAP_IP), 143); - if (!connected) { + const bool isConnected = client.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143); + if (!isConnected) { QVERIFY(client.state() == QAbstractSocket::ConnectingState); QVERIFY(client.waitForWrite()); QVERIFY(client.state() == QAbstractSocket::ConnectedState); diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index 86333e0..470f897 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -145,8 +145,6 @@ private slots: } }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QSocks5SocketEngine::tst_QSocks5SocketEngine() { } @@ -321,12 +319,11 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -340,7 +337,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -589,7 +586,7 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest() QTcpSocket socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected()); QCOMPARE(socket.state(), QTcpSocket::ConnectedState); @@ -646,7 +643,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() tcpSocketNonBlocking_socket = &socket; // Connect - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QCOMPARE(socket.state(), QTcpSocket::HostLookupState); QTestEventLoop::instance().enterLoop(30); @@ -834,15 +831,14 @@ void tst_QSocks5SocketEngine::passwordAuth() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080, "qsockstest", "password")); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); - if (!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)) { + if (!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)) { qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData()); } QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -856,7 +852,7 @@ void tst_QSocks5SocketEngine::passwordAuth() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -902,17 +898,16 @@ void tst_QSocks5SocketEngine::passwordAuth2() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1081)); socketDevice.setReceiver(this); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); while (socketDevice.state() == QAbstractSocket::ConnectingState) { QVERIFY(socketDevice.waitForWrite()); - socketDevice.connectToHost(QHostAddress(IMAP_IP), 143); + socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143); } if (socketDevice.state() != QAbstractSocket::ConnectedState) qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -926,7 +921,7 @@ void tst_QSocks5SocketEngine::passwordAuth2() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 79fbf1b..d87ab7b 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -499,36 +499,39 @@ void tst_QSslSocket::sslErrors_data() { QTest::addColumn("host"); QTest::addColumn("port"); - QTest::addColumn("errors"); - - QTest::newRow("imap.troll.no") << "imap.troll.no" << 993 - << (SslErrorList() - << QSslError::HostNameMismatch - << QSslError::SelfSignedCertificateInChain); - QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993 - << (SslErrorList() - << QSslError::SelfSignedCertificateInChain); + QTest::addColumn("expected"); + + QTest::newRow(qPrintable(QtNetworkSettings::serverLocalName())) + << QtNetworkSettings::serverLocalName() + << 993 + << (SslErrorList() << QSslError::HostNameMismatch + << QSslError::SelfSignedCertificate); + + QTest::newRow("imap.trolltech.com") + << "imap.trolltech.com" + << 993 + << (SslErrorList() << QSslError::SelfSignedCertificateInChain); } void tst_QSslSocket::sslErrors() { QFETCH(QString, host); QFETCH(int, port); - QFETCH(SslErrorList, errors); + QFETCH(SslErrorList, expected); QSslSocketPtr socket = newSocket(); socket->connectToHostEncrypted(host, port); socket->waitForEncrypted(5000); - SslErrorList list; + SslErrorList output; foreach (QSslError error, socket->sslErrors()) - list << error.error(); + output << error.error(); #ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND - if (list.last() == QSslError::CertificateUntrusted) - list.takeLast(); + if (output.last() == QSslError::CertificateUntrusted) + output.takeLast(); #endif - QCOMPARE(list, errors); + QCOMPARE(output, expected); } void tst_QSslSocket::addCaCertificate() -- cgit v0.12 From bc5cf95c9622fee5bdcc97736dee11923aa9daf4 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 13:29:39 +0200 Subject: Use QtNetworkSettings, don't hard code IMAP host name. This should fix failures in Berlin. --- tests/auto/qiodevice/tst_qiodevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp index 03a0665..367a2e0 100644 --- a/tests/auto/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/qiodevice/tst_qiodevice.cpp @@ -120,7 +120,7 @@ void tst_QIODevice::constructing_QTcpSocket() QVERIFY(!device->isOpen()); - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(5000)); QVERIFY(device->isOpen()); @@ -134,7 +134,7 @@ void tst_QIODevice::constructing_QTcpSocket() QCOMPARE(socket.pos(), qlonglong(0)); socket.close(); - socket.connectToHost("imap.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(5000)); while (!device->canReadLine()) -- cgit v0.12 From 879d5cf234bb06657b67a39969ea16d68f79fbeb Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 13:53:12 +0200 Subject: Use QtNetworkSettings for IMAP server, instead of hard coding. Reviewed-by: Peter Hartmann --- tests/auto/qsslsocket/tst_qsslsocket.cpp | 6 +++--- tests/auto/qtcpserver/tst_qtcpserver.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 4f98624..3100dd5 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -415,7 +415,7 @@ void tst_QSslSocket::simpleConnect() connect(&socket, SIGNAL(sslErrors(const QList &)), this, SLOT(exitLoop())); // Start connecting - socket.connectToHost("imap.troll.no", 993); + socket.connectToHost(QtNetworkSettings::serverName(), 993); QCOMPARE(socket.state(), QAbstractSocket::HostLookupState); enterLoop(10); @@ -470,7 +470,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() connect(&socket, SIGNAL(sslErrors(const QList &)), this, SLOT(exitLoop())); // Start connecting - socket.connectToHost("imap.troll.no", 993); + socket.connectToHost(QtNetworkSettings::serverName(), 993); QCOMPARE(socket.state(), QAbstractSocket::HostLookupState); enterLoop(10); @@ -489,7 +489,7 @@ void tst_QSslSocket::simpleConnectWithIgnore() if (!socket.canReadLine()) enterLoop(10); - QCOMPARE(socket.readAll(), QByteArray("* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n")); + QCOMPARE(socket.readAll(), QByteArray("* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n")); socket.disconnectFromHost(); } diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index 50b293d..4fd1827 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -364,7 +364,7 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest() void tst_QTcpServer::ipv4PerformanceTest() { QTcpSocket probeSocket; - probeSocket.connectToHost("imap.troll.no", 143); + probeSocket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(probeSocket.waitForConnected(5000)); QTcpServer server; -- cgit v0.12 From 07e5f5f3b3b1936c5f5090b02cc2c02e344822b5 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 15:06:46 +0200 Subject: Adpot more code to use QtNetworkSettings instead of hard coded names. Reviewed-By: Peter Hartmann --- tests/auto/network-settings.h | 9 ++++++ tests/auto/q3socketdevice/tst_q3socketdevice.cpp | 7 +++-- .../qhttpsocketengine/tst_qhttpsocketengine.cpp | 17 ++++------- .../tst_qnativesocketengine.cpp | 16 ++++------- .../tst_qsocks5socketengine.cpp | 27 ++++++++---------- tests/auto/qsslsocket/tst_qsslsocket.cpp | 33 ++++++++++++---------- 6 files changed, 54 insertions(+), 55 deletions(-) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index b2a449a..5a2f9c3 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include +#include class QtNetworkSettings { @@ -63,4 +64,12 @@ public: { return "qt-test-server.wildcard.dev." + serverDomainName(); } + +#ifdef QT_NETWORK_LIB + static QHostAddress serverIP() + { + return QHostInfo::fromName(serverName()).addresses().first(); + } +#endif + }; diff --git a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp index 2b0c606..6255aee 100644 --- a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp +++ b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp @@ -45,6 +45,8 @@ #include +#include "../network-settings.h" + //TESTED_CLASS= //TESTED_FILES= @@ -97,8 +99,7 @@ void tst_Q3SocketDevice::readNull() int attempts = 10; while (attempts--) { - // connect to imap.troll.no - if (device.connect(QHostAddress("62.70.27.18"), 143)) + if (device.connect(QtNetworkSettings::serverIP(), 143)) break; } @@ -117,7 +118,7 @@ void tst_Q3SocketDevice::readNull() #endif QCOMPARE(device.peerPort(), quint16(143)); QCOMPARE(device.peerAddress().toString(), - QHostAddress("62.70.27.18").toString()); + QtNetworkSettings::serverIP().toString()); QCOMPARE(device.error(), Q3SocketDevice::NoError); // write a logout notice diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index df83efe..7eaf7c7 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -137,8 +137,6 @@ public slots: } }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QHttpSocketEngine::tst_QHttpSocketEngine() { } @@ -307,12 +305,11 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128)); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); QVERIFY(!socketDevice.localAddress().isNull()); QVERIFY(socketDevice.localPort() > 0); @@ -328,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -369,7 +366,6 @@ void tst_QHttpSocketEngine::simpleErrorsAndStates() QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverName()), 8088)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); if (socketDevice.waitForWrite(15000)) { - qDebug() << socketDevice.state(); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState || socketDevice.state() == QAbstractSocket::UnconnectedState); } else { @@ -696,12 +692,11 @@ void tst_QHttpSocketEngine::passwordAuth() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128, "qsockstest", "password")); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -715,7 +710,7 @@ void tst_QHttpSocketEngine::passwordAuth() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp index 68ec414..90276f2 100644 --- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp +++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp @@ -100,8 +100,6 @@ private slots: void receiveUrgentData(); }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QNativeSocketEngine::tst_QNativeSocketEngine() { } @@ -155,15 +153,14 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol)); QVERIFY(socketDevice.state() == QAbstractSocket::UnconnectedState); - // Connect to imap.trolltech.com's IP - bool connected = socketDevice.connectToHost(QHostAddress(IMAP_IP), 143); - if (!connected) { + const bool isConnected = socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143); + if (!isConnected) { QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); } QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -176,7 +173,7 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + QCOMPARE(array.constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "ZZZ LOGOUT\r\n"; @@ -580,9 +577,8 @@ void tst_QNativeSocketEngine::networkError() QVERIFY(client.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol)); - // Connect to imap.trolltech.com's IP - bool connected = client.connectToHost(QHostAddress(IMAP_IP), 143); - if (!connected) { + const bool isConnected = client.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143); + if (!isConnected) { QVERIFY(client.state() == QAbstractSocket::ConnectingState); QVERIFY(client.waitForWrite()); QVERIFY(client.state() == QAbstractSocket::ConnectedState); diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index f8c2fdb..f501e78 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -145,8 +145,6 @@ private slots: } }; -static const char *IMAP_IP = "62.70.27.18"; - tst_QSocks5SocketEngine::tst_QSocks5SocketEngine() { } @@ -321,12 +319,11 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -340,7 +337,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -834,15 +831,14 @@ void tst_QSocks5SocketEngine::passwordAuth() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080, "qsockstest", "password")); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); QVERIFY(socketDevice.waitForWrite()); - if (!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)) { + if (!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)) { qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData()); } QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -856,7 +852,7 @@ void tst_QSocks5SocketEngine::passwordAuth() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -902,17 +898,16 @@ void tst_QSocks5SocketEngine::passwordAuth2() socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1081)); socketDevice.setReceiver(this); - // Connect to imap.trolltech.com's IP - QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)); + QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); while (socketDevice.state() == QAbstractSocket::ConnectingState) { QVERIFY(socketDevice.waitForWrite()); - socketDevice.connectToHost(QHostAddress(IMAP_IP), 143); + socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143); } if (socketDevice.state() != QAbstractSocket::ConnectedState) qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData()); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState); - QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP)); + QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP()); // Wait for the greeting QVERIFY(socketDevice.waitForRead()); @@ -926,7 +921,7 @@ void tst_QSocks5SocketEngine::passwordAuth2() // Check that the greeting is what we expect it to be QCOMPARE(array.constData(), - "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"); + "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 3100dd5..5c99164 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -498,36 +498,39 @@ void tst_QSslSocket::sslErrors_data() { QTest::addColumn("host"); QTest::addColumn("port"); - QTest::addColumn("errors"); - - QTest::newRow("imap.troll.no") << "imap.troll.no" << 993 - << (SslErrorList() - << QSslError::HostNameMismatch - << QSslError::SelfSignedCertificateInChain); - QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993 - << (SslErrorList() - << QSslError::SelfSignedCertificateInChain); + QTest::addColumn("expected"); + + QTest::newRow(qPrintable(QtNetworkSettings::serverLocalName())) + << QtNetworkSettings::serverLocalName() + << 993 + << (SslErrorList() << QSslError::HostNameMismatch + << QSslError::SelfSignedCertificate); + + QTest::newRow("imap.trolltech.com") + << "imap.trolltech.com" + << 993 + << (SslErrorList() << QSslError::SelfSignedCertificateInChain); } void tst_QSslSocket::sslErrors() { QFETCH(QString, host); QFETCH(int, port); - QFETCH(SslErrorList, errors); + QFETCH(SslErrorList, expected); QSslSocketPtr socket = newSocket(); socket->connectToHostEncrypted(host, port); socket->waitForEncrypted(5000); - SslErrorList list; + SslErrorList output; foreach (QSslError error, socket->sslErrors()) - list << error.error(); + output << error.error(); #ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND - if (list.last() == QSslError::CertificateUntrusted) - list.takeLast(); + if (output.last() == QSslError::CertificateUntrusted) + output.takeLast(); #endif - QCOMPARE(list, errors); + QCOMPARE(output, expected); } void tst_QSslSocket::addCaCertificate() -- cgit v0.12 From 04fa2a69545fddbf96454972ebf243d4c6f7b6b2 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Tue, 19 May 2009 15:37:18 +0200 Subject: Doc - changing the stylesheet to use a greeny color. Reviewed-By: David Boddie --- tools/qdoc3/test/classic.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 3704a15..e53ea29 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -17,7 +17,7 @@ H3 { h3.fn,span.fn { - background-color: #d5e1e8; + background-color: #d5e1d5; border-width: 1px; border-style: solid; border-color: #84b0c7; @@ -112,7 +112,7 @@ table td.memItemRight { border-right-style: none; border-bottom-style: none; border-left-style: none; - background-color: #FAFAFA; + background-color: #d5e1d5; font-size: 80%; } -- cgit v0.12 From 1096c69365d14df903ad1dd0e842764146aee01d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 19 May 2009 15:44:33 +0200 Subject: Fix stopping link loops in QDirIterator on Windows currentFileInfo is only used for returning from the public functions since the file info used in the algorithm is one step ahead. nextFileInfo is the one actually used in the algorithm. The bug was introduced in a compile fix for Windows and broke the stopLinkLoop test for QDirIterator. Reviewed-by: Olivier --- src/corelib/io/qdiriterator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index b14f436..81bfb27 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -201,8 +201,8 @@ void QDirIteratorPrivate::advance() QString subDir = it->currentFilePath(); #ifdef Q_OS_WIN - if (currentFileInfo.isSymLink()) - subDir = currentFileInfo.canonicalFilePath(); + if (nextFileInfo.isSymLink()) + subDir = nextFileInfo.canonicalFilePath(); #endif pushSubDirectory(subDir, it->nameFilters(), it->filters()); } -- cgit v0.12 From 9a512ee004535983e12a1dd38dc2e28eb35c1d5c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 19 May 2009 15:52:55 +0200 Subject: make the changedSignal test more robust On some platforms (e.g. Mac) it's not sufficient to call processEvents() only once. Reviewed-by: Andreas Aardal Hanssen --- tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index da99c30..0c5ebf6 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -47,6 +47,7 @@ #include #include +#include "../../shared/util.h" #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) #include @@ -3537,8 +3538,7 @@ void tst_QGraphicsScene::changedSignal() scene.addItem(rect); QCOMPARE(cl.changes.size(), 0); - qApp->processEvents(); - QCOMPARE(cl.changes.size(), 1); + QTRY_COMPARE(cl.changes.size(), 1); QCOMPARE(cl.changes.at(0).size(), 1); QCOMPARE(cl.changes.at(0).first(), QRectF(0, 0, 10, 10)); -- cgit v0.12 From bff689f3c5b127add96c50e4b2fdb2eadbf498a9 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 19 May 2009 16:15:32 +0200 Subject: qwidget autotest fixed for Windows CE translucentWidget: On Windows mobile the ColorRedWidget is initially moved to the taskbar position where it cannot be grabbed. Reviewed-by: mauricek --- tests/auto/qwidget/tst_qwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 5896df9..5afaebf 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -8371,6 +8371,7 @@ void tst_QWidget::translucentWidget() ColorRedWidget label; label.setFixedSize(16,16); label.setAttribute(Qt::WA_TranslucentBackground); + label.move(qApp->desktop()->availableGeometry().topLeft()); label.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&label); -- cgit v0.12 From a29ede629a18f9e107bae5e9ca03059a66f25de5 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 2 Apr 2009 12:49:13 +0200 Subject: Doc: Added a note about copying by value in QMetaProperty and included details about BlockingQueuedConnection in QMetaObject::invokeMethod(). Task-number: 187869 Task-number: 216742 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmetaobject.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 719398c..b65f956 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1007,6 +1007,11 @@ enum { MaximumParamCount = 11 }; // up to 10 arguments + 1 return value a QEvent will be sent and the member is invoked as soon as the application enters the main event loop. + \o If \a type is Qt::BlockingQueuedConnection, the method will be invoked in + the same way as for Qt::QueuedConnection, except that the current thread + will block until the event is delivered. Using this connection type to + communicate between objects in the same thread will lead to deadlocks. + \o If \a type is Qt::AutoConnection, the member is invoked synchronously if \a obj lives in the same thread as the caller; otherwise it will invoke the member asynchronously. @@ -1897,6 +1902,12 @@ static QByteArray qualifiedName(const QMetaEnum &e) \ingroup objectmodel + Property meta-data is obtained from an object's meta-object. See + QMetaObject::property() and QMetaObject::propertyCount() for + details. + + \section1 Property Meta-Data + A property has a name() and a type(), as well as various attributes that specify its behavior: isReadable(), isWritable(), isDesignable(), isScriptable(), and isStored(). @@ -1912,9 +1923,10 @@ static QByteArray qualifiedName(const QMetaEnum &e) functions. See QObject::setProperty() and QObject::property() for details. - You get property meta-data through an object's meta-object. See - QMetaObject::property() and QMetaObject::propertyCount() for - details. + \section1 Copying and Assignment + + QMetaProperty objects can be copied by value. However, each copy will + refer to the same underlying property meta-data. \sa QMetaObject, QMetaEnum, QMetaMethod, {Qt's Property System} */ -- cgit v0.12 From 2c5b7fe040575aa2ee560117c1c3455724c2f9ae Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 2 Apr 2009 12:49:13 +0200 Subject: Doc: Added a note about copying by value in QMetaProperty and included details about BlockingQueuedConnection in QMetaObject::invokeMethod(). Task-number: 187869 Task-number: 216742 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmetaobject.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 719398c..b65f956 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1007,6 +1007,11 @@ enum { MaximumParamCount = 11 }; // up to 10 arguments + 1 return value a QEvent will be sent and the member is invoked as soon as the application enters the main event loop. + \o If \a type is Qt::BlockingQueuedConnection, the method will be invoked in + the same way as for Qt::QueuedConnection, except that the current thread + will block until the event is delivered. Using this connection type to + communicate between objects in the same thread will lead to deadlocks. + \o If \a type is Qt::AutoConnection, the member is invoked synchronously if \a obj lives in the same thread as the caller; otherwise it will invoke the member asynchronously. @@ -1897,6 +1902,12 @@ static QByteArray qualifiedName(const QMetaEnum &e) \ingroup objectmodel + Property meta-data is obtained from an object's meta-object. See + QMetaObject::property() and QMetaObject::propertyCount() for + details. + + \section1 Property Meta-Data + A property has a name() and a type(), as well as various attributes that specify its behavior: isReadable(), isWritable(), isDesignable(), isScriptable(), and isStored(). @@ -1912,9 +1923,10 @@ static QByteArray qualifiedName(const QMetaEnum &e) functions. See QObject::setProperty() and QObject::property() for details. - You get property meta-data through an object's meta-object. See - QMetaObject::property() and QMetaObject::propertyCount() for - details. + \section1 Copying and Assignment + + QMetaProperty objects can be copied by value. However, each copy will + refer to the same underlying property meta-data. \sa QMetaObject, QMetaEnum, QMetaMethod, {Qt's Property System} */ -- cgit v0.12 From 92b47ba61809de30eed205e7d1eafb1cde1087e1 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Tue, 19 May 2009 16:35:49 +0200 Subject: Ensure that the export symbols are correct. Patch supplied by Saleem/Dallas team. Reviewed-By: Thiago Reviewed-By: jbache --- src/3rdparty/phonon/phonon/phonon_export.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/phonon/phonon/phonon_export.h b/src/3rdparty/phonon/phonon/phonon_export.h index e579f67..5f93ea0 100644 --- a/src/3rdparty/phonon/phonon/phonon_export.h +++ b/src/3rdparty/phonon/phonon/phonon_export.h @@ -32,7 +32,11 @@ # define PHONON_EXPORT Q_DECL_IMPORT # endif # else /* UNIX */ -# define PHONON_EXPORT Q_DECL_EXPORT +# ifdef MAKE_PHONON_LIB /* We are building this library */ +# define PHONON_EXPORT Q_DECL_EXPORT +# else /* We are using this library */ +# define PHONON_EXPORT Q_DECL_IMPORT +# endif # endif #endif -- cgit v0.12 From 90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 19 May 2009 17:53:38 +0200 Subject: Revert "Makes the layout of many of the areas be in aligned columns to immensely increase readability" This was pushed accidentially. This reverts commit ffecdf0bf9f25f7ab9aa4f69e37507dd595fecea. --- tools/qdoc3/htmlgenerator.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 7702628..13d52bf 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2079,7 +2079,17 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela CodeMarker *marker, CodeMarker::SynopsisStyle style) { if (!section.members.isEmpty()) { - out() << "\n"; + bool twoColumn = false; + if (style == CodeMarker::SeparateList) { + twoColumn = (section.members.count() >= 16); + } else if (section.members.first()->type() == Node::Property) { + twoColumn = (section.members.count() >= 5); + } + if (twoColumn) + out() << "

    \n" + << "\n"; + out() << "\n"; i++; ++m; } - out() << "
    "; + out() << "
      \n"; int i = 0; NodeList::ConstIterator m = section.members.begin(); @@ -2089,17 +2099,22 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela continue; } - out() << "
    "; + if (twoColumn && i == (int) (section.members.count() + 1) / 2) + out() << "
      \n"; + + out() << "
    • "; if (style == CodeMarker::Accessors) out() << ""; generateSynopsis(*m, relative, marker, style); if (style == CodeMarker::Accessors) out() << ""; - out() << "
    \n"; + out() << "\n"; + if (twoColumn) + out() << "\n

    \n"; } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -2114,7 +2129,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N { QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "
  • "; + out() << "
  • "; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2410,9 +2425,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" static const QString linkTag("link"); for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { - if (i != 0) - html += " "; + if (src.at(i) == charLangle && src.at(i + 1) == charAt) { i += 2; if (parseArg(src, linkTag, &i, n, &arg, &par1)) { QString link = linkForNode( -- cgit v0.12 From 4e4ff34e3c4c905f17aa02160a17fdb7b9ad61ed Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 14 May 2009 14:18:59 +0200 Subject: qdoc: Ensure that all inner class methods are included in the function index. Since the original code only used the parent class name as a key in the map that collects functions, you would only ever see either QHash::iterator::key() or QMap::iterator::key() in the index. This patch changes the key to the fully-qualified name for the parent class so that inner class methods are included. Reviewed-by: Martin Smith --- tools/qdoc3/htmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 13d52bf..f5b5a2d 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2851,7 +2851,7 @@ void HtmlGenerator::findAllFunctions(const InnerNode *node) const FunctionNode *func = static_cast(*c); if (func->status() > Node::Obsolete && func->metaness() != FunctionNode::Ctor && func->metaness() != FunctionNode::Dtor) { - funcIndex[(*c)->name()].insert((*c)->parent()->name(), *c); + funcIndex[(*c)->name()].insert(tre->fullDocumentName((*c)->parent()), *c); } } } -- cgit v0.12 From c51204359b7c9c2e63e4101f771d07774b921fee Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 20 May 2009 17:00:37 +1000 Subject: Remove unused variables from various About dialogs. Reviewed-by: Trust Me --- tools/assistant/compat/mainwindow.cpp | 11 ++--------- tools/assistant/tools/assistant/mainwindow.cpp | 13 +++---------- tools/designer/src/designer/versiondialog.cpp | 6 +----- tools/linguist/linguist/mainwindow.cpp | 6 +----- tools/qdbus/qdbusviewer/qdbusviewer.cpp | 11 ++--------- 5 files changed, 9 insertions(+), 38 deletions(-) diff --git a/tools/assistant/compat/mainwindow.cpp b/tools/assistant/compat/mainwindow.cpp index 9f91f9b..5de0d3c 100644 --- a/tools/assistant/compat/mainwindow.cpp +++ b/tools/assistant/compat/mainwindow.cpp @@ -312,21 +312,14 @@ void MainWindow::about() { QMessageBox box(this); - // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze. - QString edition; - QString info; - QString moreInfo; - box.setText(QString::fromLatin1("
    " "

    %1

    " - "

    Version %2 %3

    " - "

    %4

    " - "

    %5

    " + "

    Version %2

    " "

    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).

    " "

    The program is provided AS IS with NO WARRANTY OF ANY KIND," " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A" " PARTICULAR PURPOSE.

    ") - .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)).arg(edition).arg(info).arg(moreInfo)); + .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR))); box.setWindowTitle(tr("Qt Assistant")); box.setIcon(QMessageBox::NoIcon); box.exec(); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 1db3bc2..2b53f09 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -797,23 +797,16 @@ void MainWindow::showAboutDialog() aboutDia.setPixmap(pix); aboutDia.setWindowTitle(aboutDia.documentTitle()); } else { - // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze. - QString edition; - QString info; - QString moreInfo; - QByteArray resources; aboutDia.setText(QString::fromLatin1("

    " "

    %1

    " - "

    Version %2 %3

    " - "

    %4

    " - "

    %5

    " + "

    Version %2

    " "

    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)" ".

    The program is provided AS IS with NO WARRANTY OF ANY KIND," " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A" " PARTICULAR PURPOSE.

    ") - .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)) - .arg(edition).arg(info).arg(moreInfo), resources); + .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)), + resources); QLatin1String path(":/trolltech/assistant/images/assistant-128.png"); aboutDia.setPixmap(QString(path)); } diff --git a/tools/designer/src/designer/versiondialog.cpp b/tools/designer/src/designer/versiondialog.cpp index c21912b..97dc5a1 100644 --- a/tools/designer/src/designer/versiondialog.cpp +++ b/tools/designer/src/designer/versiondialog.cpp @@ -172,15 +172,11 @@ VersionDialog::VersionDialog(QWidget *parent) version = version.arg(tr("Qt Designer")).arg(QLatin1String(QT_VERSION_STR)); version.append(tr("
    Qt Designer is a graphical user interface designer for Qt applications.
    ")); - // TODO: Remove this variable for 4.6.0. Must keep this way for 4.5.x due to string freeze - QString edition; - lbl->setText(tr("%1" - "
    %2" "
    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)." "

    The program is provided AS IS with NO WARRANTY OF ANY KIND," " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A" - " PARTICULAR PURPOSE.
    ").arg(version).arg(edition)); + " PARTICULAR PURPOSE.
    ").arg(version)); lbl->setWordWrap(true); lbl->setOpenExternalLinks(true); diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 5157fbe..921b8b6 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -1342,17 +1342,13 @@ void MainWindow::about() QString version = tr("Version %1"); version = version.arg(QLatin1String(QT_VERSION_STR)); - // TODO: Remove this variable for 4.6.0. Must keep this way for 4.5.x due to string freeze. - QString edition; - box.setText(tr("

    %1

    " "

    Qt Linguist is a tool for adding translations to Qt " "applications.

    " - "

    %2

    " "

    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)." "

    The program is provided AS IS with NO WARRANTY OF ANY KIND," " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A" - " PARTICULAR PURPOSE.

    ").arg(version).arg(edition)); + " PARTICULAR PURPOSE.

    ").arg(version)); box.setWindowTitle(QApplication::translate("AboutDialog", "Qt Linguist")); box.setIcon(QMessageBox::NoIcon); diff --git a/tools/qdbus/qdbusviewer/qdbusviewer.cpp b/tools/qdbus/qdbusviewer/qdbusviewer.cpp index 9c25a89..fcb63a8 100644 --- a/tools/qdbus/qdbusviewer/qdbusviewer.cpp +++ b/tools/qdbus/qdbusviewer/qdbusviewer.cpp @@ -441,21 +441,14 @@ void QDBusViewer::about() { QMessageBox box(this); - // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze. - QString edition; - QString info; - QString moreInfo; - box.setText(QString::fromLatin1("
    " "

    %1

    " - "

    Version %2 %3

    " - "

    %4

    " - "

    %5

    " + "

    Version %2

    " "

    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).

    " "

    The program is provided AS IS with NO WARRANTY OF ANY KIND," " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A" " PARTICULAR PURPOSE.

    ") - .arg(tr("D-Bus Viewer")).arg(QLatin1String(QT_VERSION_STR)).arg(edition).arg(info).arg(moreInfo)); + .arg(tr("D-Bus Viewer")).arg(QLatin1String(QT_VERSION_STR))); box.setWindowTitle(tr("D-Bus Viewer")); box.exec(); } -- cgit v0.12 From ba71f22dbee3e5bd4e0db0054b8ba57bde89d224 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 20 May 2009 10:21:11 +0200 Subject: Refactor the qimagereader autotest to work with shadow build Refactor the test of QImageReader to work with shadow build. Add two tests for the TIFF format Fix an error of the test of QImageWriter that prevented the cleaning of the created files after the test. Reviewed-by: Olivier --- tests/auto/qimage/images/image.tif | Bin 0 -> 2242 bytes tests/auto/qimage/tst_qimage.cpp | 3 + tests/auto/qimagereader/images/image_100dpi.tif | Bin 0 -> 2242 bytes tests/auto/qimagereader/qimagereader.pro | 2 + tests/auto/qimagereader/qimagereader.qrc | 1 + tests/auto/qimagereader/tst_qimagereader.cpp | 421 ++++++++++++------------ tests/auto/qimagewriter/tst_qimagewriter.cpp | 8 +- 7 files changed, 224 insertions(+), 211 deletions(-) create mode 100644 tests/auto/qimage/images/image.tif create mode 100644 tests/auto/qimagereader/images/image_100dpi.tif diff --git a/tests/auto/qimage/images/image.tif b/tests/auto/qimage/images/image.tif new file mode 100644 index 0000000..ee0637c Binary files /dev/null and b/tests/auto/qimage/images/image.tif differ diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp index 88bbb50..c6b0560 100644 --- a/tests/auto/qimage/tst_qimage.cpp +++ b/tests/auto/qimage/tst_qimage.cpp @@ -274,6 +274,9 @@ void tst_QImage::formatHandlersInput_data() QTest::newRow("PPM") << "PPM" << prefix + "image.ppm"; QTest::newRow("XBM") << "XBM" << prefix + "image.xbm"; QTest::newRow("XPM") << "XPM" << prefix + "image.xpm"; +#if defined QTEST_HAVE_TIFF + QTest::newRow("TIFF") << "TIFF" << prefix + "image.tif"; +#endif } void tst_QImage::formatHandlersInput() diff --git a/tests/auto/qimagereader/images/image_100dpi.tif b/tests/auto/qimagereader/images/image_100dpi.tif new file mode 100644 index 0000000..fcf3cd8 Binary files /dev/null and b/tests/auto/qimagereader/images/image_100dpi.tif differ diff --git a/tests/auto/qimagereader/qimagereader.pro b/tests/auto/qimagereader/qimagereader.pro index b178823..2c9510e 100644 --- a/tests/auto/qimagereader/qimagereader.pro +++ b/tests/auto/qimagereader/qimagereader.pro @@ -3,6 +3,7 @@ SOURCES += tst_qimagereader.cpp MOC_DIR=tmp QT += network RESOURCES += qimagereader.qrc +DEFINES += SRCDIR=\\\"$$PWD\\\" !contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF !contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG @@ -22,5 +23,6 @@ wince*: { imagePlugins.path = imageformats DEPLOYMENT += images imagePlugins + DEFINES += SRCDIR=\\\".\\\" } diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 13ce582..3c674ad 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -30,6 +30,7 @@ images/image.pgm images/image.png images/image.ppm + images/image.tif images/kollada.png images/marble.xpm images/namedcolors.xpm diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 8f7094c..f5313eb 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -158,6 +158,8 @@ private slots: void pixelCompareWithBaseline(); }; +static const QLatin1String prefix(SRCDIR "/images/"); + // Testing get/set functions void tst_QImageReader::getSetCheck() { @@ -232,7 +234,7 @@ void tst_QImageReader::readImage() QFETCH(QByteArray, format); for (int i = 0; i < 2; ++i) { - QImageReader io("images/" + fileName, i ? QByteArray() : format); + QImageReader io(prefix + fileName, i ? QByteArray() : format); if (success) { if (!io.supportsAnimation()) QVERIFY(io.imageCount() > 0); @@ -248,16 +250,16 @@ void tst_QImageReader::readImage() QVERIFY2(!image.isNull(), io.errorString().toLatin1().constData()); // No format - QImageReader io2("images/" + fileName); + QImageReader io2(prefix + fileName); QVERIFY2(!io2.read().isNull(), io.errorString().toLatin1().constData()); // No extension, no format - QImageReader io3("images/" + fileName.left(fileName.lastIndexOf(QLatin1Char('.')))); + QImageReader io3(prefix + fileName.left(fileName.lastIndexOf(QLatin1Char('.')))); QVERIFY2(!io3.read().isNull(), io.errorString().toLatin1().constData()); // Read into \a image2 QImage image2; - QImageReader image2Reader("images/" + fileName, i ? QByteArray() : format); + QImageReader image2Reader(prefix + fileName, i ? QByteArray() : format); QCOMPARE(image2Reader.format(), format); QVERIFY(image2Reader.read(&image2)); if (image2Reader.canRead()) { @@ -281,8 +283,8 @@ void tst_QImageReader::readImage() void tst_QImageReader::jpegRgbCmyk() { - QImage image1(QLatin1String("images/YCbCr_cmyk.jpg")); - QImage image2(QLatin1String("images/YCbCr_cmyk.png")); + QImage image1(prefix + QLatin1String("YCbCr_cmyk.jpg")); + QImage image2(prefix + QLatin1String("YCbCr_cmyk.png")); QCOMPARE(image1, image2); } @@ -293,24 +295,24 @@ void tst_QImageReader::setScaledSize_data() QTest::addColumn("newSize"); QTest::addColumn("format"); - QTest::newRow("BMP: colorful") << "images/colorful" << QSize(200, 200) << QByteArray("bmp"); - QTest::newRow("BMP: font") << "images/font" << QSize(200, 200) << QByteArray("bmp"); - QTest::newRow("XPM: marble") << "images/marble" << QSize(200, 200) << QByteArray("xpm"); - QTest::newRow("PNG: kollada") << "images/kollada" << QSize(200, 200) << QByteArray("png"); - QTest::newRow("PPM: teapot") << "images/teapot" << QSize(200, 200) << QByteArray("ppm"); - QTest::newRow("PPM: runners") << "images/runners.ppm" << QSize(400, 400) << QByteArray("ppm"); - QTest::newRow("PPM: test") << "images/test.ppm" << QSize(10, 10) << QByteArray("ppm"); - QTest::newRow("XBM: gnus") << "images/gnus" << QSize(200, 200) << QByteArray("xbm"); + QTest::newRow("BMP: colorful") << "colorful" << QSize(200, 200) << QByteArray("bmp"); + QTest::newRow("BMP: font") << "font" << QSize(200, 200) << QByteArray("bmp"); + QTest::newRow("XPM: marble") << "marble" << QSize(200, 200) << QByteArray("xpm"); + QTest::newRow("PNG: kollada") << "kollada" << QSize(200, 200) << QByteArray("png"); + QTest::newRow("PPM: teapot") << "teapot" << QSize(200, 200) << QByteArray("ppm"); + QTest::newRow("PPM: runners") << "runners.ppm" << QSize(400, 400) << QByteArray("ppm"); + QTest::newRow("PPM: test") << "test.ppm" << QSize(10, 10) << QByteArray("ppm"); + QTest::newRow("XBM: gnus") << "gnus" << QSize(200, 200) << QByteArray("xbm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("JPEG: beavis") << "images/beavis" << QSize(200, 200) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis") << "beavis" << QSize(200, 200) << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF - QTest::newRow("GIF: earth") << "images/earth" << QSize(200, 200) << QByteArray("gif"); - QTest::newRow("GIF: trolltech") << "images/trolltech" << QSize(200, 200) << QByteArray("gif"); + QTest::newRow("GIF: earth") << "earth" << QSize(200, 200) << QByteArray("gif"); + QTest::newRow("GIF: trolltech") << "trolltech" << QSize(200, 200) << QByteArray("gif"); #endif // QTEST_HAVE_GIF #ifdef QTEST_HAVE_MNG - QTest::newRow("MNG: ball") << "images/ball" << QSize(200, 200) << QByteArray("mng"); - QTest::newRow("MNG: fire") << "images/fire" << QSize(200, 200) << QByteArray("mng"); + QTest::newRow("MNG: ball") << "ball" << QSize(200, 200) << QByteArray("mng"); + QTest::newRow("MNG: fire") << "fire" << QSize(200, 200) << QByteArray("mng"); #endif // QTEST_HAVE_MNG } @@ -323,7 +325,7 @@ void tst_QImageReader::setScaledSize() if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format)) QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); reader.setScaledSize(newSize); QImage image = reader.read(); QVERIFY(!image.isNull()); @@ -336,25 +338,25 @@ void tst_QImageReader::setClipRect_data() QTest::addColumn("fileName"); QTest::addColumn("newRect"); QTest::addColumn("format"); - QTest::newRow("BMP: colorful") << "images/colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); - QTest::newRow("BMP: font") << "images/font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); - QTest::newRow("BMP: 4bpp uncompressed") << "images/tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp"); - QTest::newRow("XPM: marble") << "images/marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); - QTest::newRow("PNG: kollada") << "images/kollada" << QRect(0, 0, 50, 50) << QByteArray("png"); - QTest::newRow("PPM: teapot") << "images/teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("PPM: runners") << "images/runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("PPM: test") << "images/test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("XBM: gnus") << "images/gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm"); + QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: 4bpp uncompressed") << "tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp"); + QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); + QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png"); + QTest::newRow("PPM: teapot") << "teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("PPM: runners") << "runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("PPM: test") << "test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("XBM: gnus") << "gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("JPEG: beavis") << "images/beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis") << "beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF - QTest::newRow("GIF: earth") << "images/earth" << QRect(0, 0, 50, 50) << QByteArray("gif"); - QTest::newRow("GIF: trolltech") << "images/trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif"); + QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif"); + QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif"); #endif // QTEST_HAVE_GIF #ifdef QTEST_HAVE_MNG - QTest::newRow("MNG: ball") << "images/ball" << QRect(0, 0, 50, 50) << QByteArray("mng"); - QTest::newRow("MNG: fire") << "images/fire" << QRect(0, 0, 50, 50) << QByteArray("mng"); + QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng"); + QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng"); #endif // QTEST_HAVE_MNG } @@ -367,13 +369,13 @@ void tst_QImageReader::setClipRect() if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format)) QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); reader.setClipRect(newRect); QImage image = reader.read(); QVERIFY(!image.isNull()); QCOMPARE(image.rect(), newRect); - QImageReader originalReader(fileName); + QImageReader originalReader(prefix + fileName); QImage originalImage = originalReader.read(); QCOMPARE(originalImage.copy(newRect), image); } @@ -384,24 +386,24 @@ void tst_QImageReader::setScaledClipRect_data() QTest::addColumn("newRect"); QTest::addColumn("format"); - QTest::newRow("BMP: colorful") << "images/colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); - QTest::newRow("BMP: font") << "images/font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); - QTest::newRow("XPM: marble") << "images/marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); - QTest::newRow("PNG: kollada") << "images/kollada" << QRect(0, 0, 50, 50) << QByteArray("png"); - QTest::newRow("PPM: teapot") << "images/teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("PPM: runners") << "images/runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("PPM: test") << "images/test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); - QTest::newRow("XBM: gnus") << "images/gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm"); + QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp"); + QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm"); + QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png"); + QTest::newRow("PPM: teapot") << "teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("PPM: runners") << "runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("PPM: test") << "test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm"); + QTest::newRow("XBM: gnus") << "gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("JPEG: beavis") << "images/beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg"); + QTest::newRow("JPEG: beavis") << "beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF - QTest::newRow("GIF: earth") << "images/earth" << QRect(0, 0, 50, 50) << QByteArray("gif"); - QTest::newRow("GIF: trolltech") << "images/trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif"); + QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif"); + QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif"); #endif // QTEST_HAVE_GIF #ifdef QTEST_HAVE_MNG - QTest::newRow("MNG: ball") << "images/ball" << QRect(0, 0, 50, 50) << QByteArray("mng"); - QTest::newRow("MNG: fire") << "images/fire" << QRect(0, 0, 50, 50) << QByteArray("mng"); + QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng"); + QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng"); #endif // QTEST_HAVE_MNG } @@ -414,14 +416,14 @@ void tst_QImageReader::setScaledClipRect() if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format)) QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); reader.setScaledSize(QSize(300, 300)); reader.setScaledClipRect(newRect); QImage image = reader.read(); QVERIFY(!image.isNull()); QCOMPARE(image.rect(), newRect); - QImageReader originalReader(fileName); + QImageReader originalReader(prefix + fileName); originalReader.setScaledSize(QSize(300, 300)); QImage originalImage = originalReader.read(); QCOMPARE(originalImage.copy(newRect), image); @@ -433,29 +435,29 @@ void tst_QImageReader::imageFormat_data() QTest::addColumn("format"); QTest::addColumn("imageFormat"); - QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm") << QImage::Format_Mono; - QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm") << QImage::Format_Indexed8; - QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm") << QImage::Format_RGB32; - QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm") << QImage::Format_RGB32; - QTest::newRow("ppm-3") << QString("images/runners.ppm") << QByteArray("ppm") << QImage::Format_RGB32; - QTest::newRow("ppm-4") << QString("images/test.ppm") << QByteArray("ppm") << QImage::Format_RGB32; + QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm") << QImage::Format_Mono; + QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm") << QImage::Format_Indexed8; + QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm") << QImage::Format_RGB32; + QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm") << QImage::Format_RGB32; + QTest::newRow("ppm-3") << QString("runners.ppm") << QByteArray("ppm") << QImage::Format_RGB32; + QTest::newRow("ppm-4") << QString("test.ppm") << QByteArray("ppm") << QImage::Format_RGB32; #ifdef QTEST_HAVE_JPEG - QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg") << QImage::Format_Indexed8; - QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg") << QImage::Format_RGB32; - QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg") << QImage::Format_RGB32; + QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg") << QImage::Format_Indexed8; + QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg") << QImage::Format_RGB32; + QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg") << QImage::Format_RGB32; #endif #if defined QTEST_HAVE_GIF - QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif") << QImage::Format_Invalid; - QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif") << QImage::Format_Invalid; + QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif") << QImage::Format_Invalid; + QTest::newRow("gif-2") << QString("trolltech.gif") << QByteArray("gif") << QImage::Format_Invalid; #endif - QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm") << QImage::Format_MonoLSB; - QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8; - QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8; - QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8; - QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png") << QImage::Format_ARGB32; - QTest::newRow("png-2") << QString("images/YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32; - QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng") << QImage::Format_Invalid; - QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng") << QImage::Format_Invalid; + QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm") << QImage::Format_MonoLSB; + QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8; + QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8; + QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8; + QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32; + QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32; + QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng") << QImage::Format_Invalid; + QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng") << QImage::Format_Invalid; } void tst_QImageReader::imageFormat() @@ -463,7 +465,8 @@ void tst_QImageReader::imageFormat() QFETCH(QString, fileName); QFETCH(QByteArray, format); QFETCH(QImage::Format, imageFormat); - if (QImageReader::imageFormat(fileName).isEmpty()) { + + if (QImageReader::imageFormat(prefix + fileName).isEmpty()) { if (QByteArray("jpeg") == format) #ifndef QTEST_HAVE_JPEG return; @@ -478,31 +481,31 @@ void tst_QImageReader::imageFormat() #endif // !QTEST_HAVE_MNG QSKIP(("Qt does not support the " + format + " format.").constData(), SkipSingle); } else { - QCOMPARE(QImageReader::imageFormat(fileName), format); + QCOMPARE(QImageReader::imageFormat(prefix + fileName), format); } - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); QCOMPARE(reader.imageFormat(), imageFormat); } void tst_QImageReader::blackXPM() { - QImage image(QLatin1String("images/black.xpm")); - QImage image2(QLatin1String("images/black.png")); + QImage image(prefix + QLatin1String("black.xpm")); + QImage image2(prefix + QLatin1String("black.png")); QCOMPARE(image.pixel(25, 25), qRgb(190, 190, 190)); QCOMPARE(image.pixel(25, 25), image2.pixel(25, 25)); } void tst_QImageReader::transparentXPM() { - QImage image(QLatin1String("images/nontransparent.xpm")); - QImage image2(QLatin1String("images/transparent.xpm")); + QImage image(prefix + QLatin1String("nontransparent.xpm")); + QImage image2(prefix + QLatin1String("transparent.xpm")); QCOMPARE(image.format(), QImage::Format_RGB32); QCOMPARE(image2.format(), QImage::Format_ARGB32); } void tst_QImageReader::multiWordNamedColorXPM() { - QImage image(QLatin1String("images/namedcolors.xpm")); + QImage image(prefix + QLatin1String("namedcolors.xpm")); QCOMPARE(image.pixel(0, 0), qRgb(102, 139, 139)); // pale turquoise 4 QCOMPARE(image.pixel(0, 1), qRgb(250, 250, 210)); // light golden rod yellow QCOMPARE(image.pixel(0, 2), qRgb(255, 250, 205)); // lemon chiffon @@ -593,7 +596,7 @@ void tst_QImageReader::supportsAnimation() { QFETCH(QString, fileName); QFETCH(bool, success); - QImageReader io("images/" + fileName); + QImageReader io(prefix + fileName); QCOMPARE(io.supportsAnimation(), success); } @@ -606,7 +609,7 @@ void tst_QImageReader::sizeBeforeRead() { QFETCH(QString, fileName); QFETCH(QByteArray, format); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); QVERIFY(reader.canRead()); if (format == "mng") { QCOMPARE(reader.size(), QSize()); @@ -644,7 +647,7 @@ void tst_QImageReader::imageFormatBeforeRead() void tst_QImageReader::gifHandlerBugs() { { - QImageReader io("images/trolltech.gif"); + QImageReader io(prefix + "trolltech.gif"); QVERIFY(io.loopCount() != 1); int count=0; for (; io.canRead(); io.read(), ++count) ; @@ -653,8 +656,8 @@ void tst_QImageReader::gifHandlerBugs() // Task 95166 { - QImageReader io1("images/bat1.gif"); - QImageReader io2("images/bat2.gif"); + QImageReader io1(prefix + "bat1.gif"); + QImageReader io2(prefix + "bat2.gif"); QVERIFY(io1.canRead()); QVERIFY(io2.canRead()); QImage im1 = io1.read(); @@ -666,8 +669,8 @@ void tst_QImageReader::gifHandlerBugs() // Task 9994 { - QImageReader io1("images/noclearcode.gif"); - QImageReader io2("images/noclearcode.bmp"); + QImageReader io1(prefix + "noclearcode.gif"); + QImageReader io2(prefix + "noclearcode.bmp"); QVERIFY(io1.canRead()); QVERIFY(io2.canRead()); QImage im1 = io1.read(); QImage im2 = io2.read(); QVERIFY(!im1.isNull()); QVERIFY(!im2.isNull()); @@ -731,29 +734,29 @@ void tst_QImageReader::readFromDevice_data() QTest::addColumn("fileName"); QTest::addColumn("format"); - QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm"); - QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm"); - QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-3") << QString("images/teapot.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-4") << QString("images/runners.ppm") << QByteArray("ppm"); + QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm"); + QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm"); + QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-3") << QString("teapot.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-4") << QString("runners.ppm") << QByteArray("ppm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg"); - QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg"); - QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF - QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif"); - QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif"); + QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif"); + QTest::newRow("gif-2") << QString("trolltech.gif") << QByteArray("gif"); #endif // QTEST_HAVE_GIF - QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm"); - QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm"); - QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp"); - QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp"); - QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png"); + QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm"); + QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); + QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); #ifdef QTEST_HAVE_MNG - QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng"); - QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng"); + QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng"); + QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng"); #endif // QTEST_HAVE_MNG } @@ -762,9 +765,9 @@ void tst_QImageReader::readFromDevice() QFETCH(QString, fileName); QFETCH(QByteArray, format); - QImage expectedImage(fileName, format); + QImage expectedImage(prefix + fileName, format); - QFile file(fileName); + QFile file(prefix + fileName); QVERIFY(file.open(QFile::ReadOnly)); QByteArray imageData = file.readAll(); QVERIFY(!imageData.isEmpty()); @@ -813,26 +816,26 @@ void tst_QImageReader::readFromFileAfterJunk_data() QTest::addColumn("fileName"); QTest::addColumn("format"); - QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm"); - QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm"); - QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-3") << QString("images/teapot.ppm") << QByteArray("ppm"); - QTest::newRow("ppm-4") << QString("images/runners.ppm") << QByteArray("ppm"); + QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm"); + QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm"); + QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-3") << QString("teapot.ppm") << QByteArray("ppm"); + QTest::newRow("ppm-4") << QString("runners.ppm") << QByteArray("ppm"); #ifdef QTEST_HAVE_JPEG - QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg"); - QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg"); - QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg"); #endif #if defined QTEST_HAVE_GIF // QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif"); // QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif"); #endif - QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm"); - QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm"); - QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp"); - QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp"); - QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png"); + QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm"); + QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); + QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); // QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng"); // QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng"); } @@ -851,7 +854,7 @@ void tst_QImageReader::readFromFileAfterJunk() QFile junkFile("junk"); QVERIFY(junkFile.open(QFile::WriteOnly)); - QFile imageFile(fileName); + QFile imageFile(prefix + fileName); QVERIFY(imageFile.open(QFile::ReadOnly)); QByteArray imageData = imageFile.readAll(); QVERIFY(!imageData.isNull()); @@ -869,7 +872,7 @@ void tst_QImageReader::readFromFileAfterJunk() for (int i = 0; i < iterations; ++i) { QImageWriter writer(&junkFile, format); junkFile.write("deadbeef", 9); - QVERIFY(writer.write(QImage(fileName))); + QVERIFY(writer.write(QImage(prefix + fileName))); } } junkFile.close(); @@ -903,8 +906,8 @@ void tst_QImageReader::description_data() willem["Software"] = "Created on a NeXTstation color using \"pnmtopng\"."; willem["Disclaimer"] = "Freeware."; - QTest::newRow("PNG") << QString("images/pngwithtext.png") << willem; - QTest::newRow("PNG Compressed") << QString("images/pngwithcompressedtext.png") << willem; + QTest::newRow("PNG") << QString("pngwithtext.png") << willem; + QTest::newRow("PNG Compressed") << QString("pngwithcompressedtext.png") << willem; } void tst_QImageReader::description() @@ -913,9 +916,9 @@ void tst_QImageReader::description() QFETCH(QStringMap, description); // Sanity check - QVERIFY(!QImage(fileName).isNull()); + QVERIFY(!QImage(prefix + fileName).isNull()); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); foreach (QString key, description.keys()) QCOMPARE(reader.text(key), description.value(key)); @@ -940,143 +943,143 @@ void tst_QImageReader::readFromResources_data() QTest::addColumn("size"); QTest::addColumn("message"); - QTest::newRow("images/corrupt.bmp") << QString("images/corrupt.bmp") + QTest::newRow("corrupt.bmp") << QString("corrupt.bmp") << QByteArray("bmp") << QSize(0, 0) << QString(""); - QTest::newRow("images/negativeheight.bmp") << QString("images/negativeheight.bmp") + QTest::newRow("negativeheight.bmp") << QString("negativeheight.bmp") << QByteArray("bmp") << QSize(127, 64) << QString(""); - QTest::newRow("images/font.bmp") << QString("images/font.bmp") + QTest::newRow("font.bmp") << QString("font.bmp") << QByteArray("bmp") << QSize(240, 8) << QString(""); - QTest::newRow("images/noclearcode.bmp") << QString("images/noclearcode.bmp") + QTest::newRow("noclearcode.bmp") << QString("noclearcode.bmp") << QByteArray("bmp") << QSize(29, 18) << QString(""); - QTest::newRow("images/colorful.bmp") << QString("images/colorful.bmp") + QTest::newRow("colorful.bmp") << QString("colorful.bmp") << QByteArray("bmp") << QSize(320, 200) << QString(""); - QTest::newRow("images/16bpp.bmp") << QString("images/16bpp.bmp") + QTest::newRow("16bpp.bmp") << QString("16bpp.bmp") << QByteArray("bmp") << QSize(320, 240) << QString(""); - QTest::newRow("images/crash-signed-char.bmp") << QString("images/crash-signed-char.bmp") + QTest::newRow("crash-signed-char.bmp") << QString("crash-signed-char.bmp") << QByteArray("bmp") << QSize(360, 280) << QString(""); - QTest::newRow("images/4bpp-rle.bmp") << QString("images/4bpp-rle.bmp") + QTest::newRow("4bpp-rle.bmp") << QString("4bpp-rle.bmp") << QByteArray("bmp") << QSize(640, 480) << QString(""); #ifdef QTEST_HAVE_GIF - QTest::newRow("images/corrupt.gif") << QString("images/corrupt.gif") + QTest::newRow("corrupt.gif") << QString("corrupt.gif") << QByteArray("gif") << QSize(0, 0) << QString(""); - QTest::newRow("images/trolltech.gif") << QString("images/trolltech.gif") + QTest::newRow("trolltech.gif") << QString("trolltech.gif") << QByteArray("gif") << QSize(128, 64) << QString(""); - QTest::newRow("images/noclearcode.gif") << QString("images/noclearcode.gif") + QTest::newRow("noclearcode.gif") << QString("noclearcode.gif") << QByteArray("gif") << QSize(29, 18) << QString(""); - QTest::newRow("images/earth.gif") << QString("images/earth.gif") + QTest::newRow("earth.gif") << QString("earth.gif") << QByteArray("gif") << QSize(320, 200) << QString(""); - QTest::newRow("images/bat1.gif") << QString("images/bat1.gif") + QTest::newRow("bat1.gif") << QString("bat1.gif") << QByteArray("gif") << QSize(32, 32) << QString(""); - QTest::newRow("images/bat2.gif") << QString("images/bat2.gif") + QTest::newRow("bat2.gif") << QString("bat2.gif") << QByteArray("gif") << QSize(32, 32) << QString(""); #endif #ifdef QTEST_HAVE_JPEG - QTest::newRow("images/corrupt.jpg") << QString("images/corrupt.jpg") + QTest::newRow("corrupt.jpg") << QString("corrupt.jpg") << QByteArray("jpg") << QSize(0, 0) << QString("JPEG datastream contains no image"); - QTest::newRow("images/beavis.jpg") << QString("images/beavis.jpg") + QTest::newRow("beavis.jpg") << QString("beavis.jpg") << QByteArray("jpg") << QSize(350, 350) << QString(""); - QTest::newRow("images/YCbCr_cmyk.jpg") << QString("images/YCbCr_cmyk.jpg") + QTest::newRow("YCbCr_cmyk.jpg") << QString("YCbCr_cmyk.jpg") << QByteArray("jpg") << QSize(75, 50) << QString(""); - QTest::newRow("images/YCbCr_rgb.jpg") << QString("images/YCbCr_rgb.jpg") + QTest::newRow("YCbCr_rgb.jpg") << QString("YCbCr_rgb.jpg") << QByteArray("jpg") << QSize(75, 50) << QString(""); #endif #ifdef QTEST_HAVE_MNG - QTest::newRow("images/corrupt.mng") << QString("images/corrupt.mng") + QTest::newRow("corrupt.mng") << QString("corrupt.mng") << QByteArray("mng") << QSize(0, 0) << QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0"); - QTest::newRow("images/fire.mng") << QString("images/fire.mng") + QTest::newRow("fire.mng") << QString("fire.mng") << QByteArray("mng") << QSize(30, 60) << QString(""); - QTest::newRow("images/ball.mng") << QString("images/ball.mng") + QTest::newRow("ball.mng") << QString("ball.mng") << QByteArray("mng") << QSize(32, 32) << QString(""); #endif - QTest::newRow("images/image.pbm") << QString("images/image.pbm") + QTest::newRow("image.pbm") << QString("image.pbm") << QByteArray("pbm") << QSize(16, 6) << QString(""); - QTest::newRow("images/image.pgm") << QString("images/image.pgm") + QTest::newRow("image.pgm") << QString("image.pgm") << QByteArray("pgm") << QSize(24, 7) << QString(""); - QTest::newRow("images/corrupt.png") << QString("images/corrupt.png") + QTest::newRow("corrupt.png") << QString("corrupt.png") << QByteArray("png") << QSize(0, 0) << QString(""); - QTest::newRow("images/away.png") << QString("images/away.png") + QTest::newRow("away.png") << QString("away.png") << QByteArray("png") << QSize(16, 16) << QString(""); - QTest::newRow("images/image.png") << QString("images/image.png") + QTest::newRow("image.png") << QString("image.png") << QByteArray("png") << QSize(22, 22) << QString(""); - QTest::newRow("images/pngwithcompressedtext.png") << QString("images/pngwithcompressedtext.png") + QTest::newRow("pngwithcompressedtext.png") << QString("pngwithcompressedtext.png") << QByteArray("png") << QSize(32, 32) << QString(""); - QTest::newRow("images/pngwithtext.png") << QString("images/pngwithtext.png") + QTest::newRow("pngwithtext.png") << QString("pngwithtext.png") << QByteArray("png") << QSize(32, 32) << QString(""); - QTest::newRow("images/kollada.png") << QString("images/kollada.png") + QTest::newRow("kollada.png") << QString("kollada.png") << QByteArray("png") << QSize(436, 160) << QString(""); - QTest::newRow("images/black.png") << QString("images/black.png") + QTest::newRow("black.png") << QString("black.png") << QByteArray("png") << QSize(48, 48) << QString(""); - QTest::newRow("images/YCbCr_cmyk.png") << QString("images/YCbCr_cmyk.png") + QTest::newRow("YCbCr_cmyk.png") << QString("YCbCr_cmyk.png") << QByteArray("png") << QSize(75, 50) << QString(""); - QTest::newRow("images/teapot.ppm") << QString("images/teapot.ppm") + QTest::newRow("teapot.ppm") << QString("teapot.ppm") << QByteArray("ppm") << QSize(256, 256) << QString(""); - QTest::newRow("images/image.ppm") << QString("images/image.ppm") + QTest::newRow("image.ppm") << QString("image.ppm") << QByteArray("ppm") << QSize(4, 4) << QString(""); - QTest::newRow("images/runners.ppm") << QString("images/runners.ppm") + QTest::newRow("runners.ppm") << QString("runners.ppm") << QByteArray("ppm") << QSize(400, 400) << QString(""); - QTest::newRow("images/test.ppm") << QString("images/test.ppm") + QTest::newRow("test.ppm") << QString("test.ppm") << QByteArray("ppm") << QSize(10, 10) << QString(""); -// QTest::newRow("images/corrupt.xbm") << QString("images/corrupt.xbm") << QByteArray("xbm") << QSize(0, 0); - QTest::newRow("images/gnus.xbm") << QString("images/gnus.xbm") +// QTest::newRow("corrupt.xbm") << QString("corrupt.xbm") << QByteArray("xbm") << QSize(0, 0); + QTest::newRow("gnus.xbm") << QString("gnus.xbm") << QByteArray("xbm") << QSize(271, 273) << QString(""); - QTest::newRow("images/corrupt-colors.xpm") << QString("images/corrupt-colors.xpm") + QTest::newRow("corrupt-colors.xpm") << QString("corrupt-colors.xpm") << QByteArray("xpm") << QSize(0, 0) << QString("QImage: XPM color specification is missing: bla9an.n#x"); - QTest::newRow("images/corrupt-pixels.xpm") << QString("images/corrupt-pixels.xpm") + QTest::newRow("corrupt-pixels.xpm") << QString("corrupt-pixels.xpm") << QByteArray("xpm") << QSize(0, 0) << QString("QImage: XPM pixels missing on image line 3"); - QTest::newRow("images/marble.xpm") << QString("images/marble.xpm") + QTest::newRow("marble.xpm") << QString("marble.xpm") << QByteArray("xpm") << QSize(240, 240) << QString(""); - QTest::newRow("images/test.xpm") << QString("images/test.xpm") + QTest::newRow("test.xpm") << QString("test.xpm") << QByteArray("xpm") << QSize(256, 256) << QString(""); - QTest::newRow("images/black.xpm") << QString("images/black.xpm") + QTest::newRow("black.xpm") << QString("black.xpm") << QByteArray("xpm") << QSize(48, 48) << QString(""); - QTest::newRow("images/namedcolors.xpm") << QString("images/namedcolors.xpm") + QTest::newRow("namedcolors.xpm") << QString("namedcolors.xpm") << QByteArray("xpm") << QSize(8, 8) << QString(""); - QTest::newRow("images/nontransparent.xpm") << QString("images/nontransparent.xpm") + QTest::newRow("nontransparent.xpm") << QString("nontransparent.xpm") << QByteArray("xpm") << QSize(8, 8) << QString(""); - QTest::newRow("images/transparent.xpm") << QString("images/transparent.xpm") + QTest::newRow("transparent.xpm") << QString("transparent.xpm") << QByteArray("xpm") << QSize(8, 8) << QString(""); } @@ -1087,9 +1090,8 @@ void tst_QImageReader::readFromResources() QFETCH(QByteArray, format); QFETCH(QSize, size); QFETCH(QString, message); - for (int i = 0; i < 2; ++i) { - QString file = i ? (":/" + fileName) : fileName; + QString file = i ? (":/images/" + fileName) : (prefix + fileName); { // suppress warnings if we expect them if (!message.isEmpty()) { @@ -1153,7 +1155,7 @@ void tst_QImageReader::readFromResources() QTest::ignoreMessage(QtWarningMsg, message.toLatin1()); QTest::ignoreMessage(QtWarningMsg, message.toLatin1()); } - QCOMPARE(QImageReader(fileName).read(), QImageReader(":/" + fileName).read()); + QCOMPARE(QImageReader(prefix + fileName).read(), QImageReader(":/images/" + fileName).read()); } void tst_QImageReader::readCorruptImage_data() @@ -1162,25 +1164,25 @@ void tst_QImageReader::readCorruptImage_data() QTest::addColumn("shouldFail"); QTest::addColumn("message"); #if defined QTEST_HAVE_JPEG - QTest::newRow("corrupt jpeg") << QString("images/corrupt.jpg") << true + QTest::newRow("corrupt jpeg") << QString("corrupt.jpg") << true << QString("JPEG datastream contains no image"); #endif #if defined QTEST_HAVE_GIF - QTest::newRow("corrupt gif") << QString("images/corrupt.gif") << true << QString(""); + QTest::newRow("corrupt gif") << QString("corrupt.gif") << true << QString(""); #endif #ifdef QTEST_HAVE_MNG - QTest::newRow("corrupt mng") << QString("images/corrupt.mng") << true + QTest::newRow("corrupt mng") << QString("corrupt.mng") << true << QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0"); #endif - QTest::newRow("corrupt png") << QString("images/corrupt.png") << true << QString(""); - QTest::newRow("corrupt bmp") << QString("images/corrupt.bmp") << true << QString(""); - QTest::newRow("corrupt xpm (colors)") << QString("images/corrupt-colors.xpm") << true + QTest::newRow("corrupt png") << QString("corrupt.png") << true << QString(""); + QTest::newRow("corrupt bmp") << QString("corrupt.bmp") << true << QString(""); + QTest::newRow("corrupt xpm (colors)") << QString("corrupt-colors.xpm") << true << QString("QImage: XPM color specification is missing: bla9an.n#x"); - QTest::newRow("corrupt xpm (pixels)") << QString("images/corrupt-pixels.xpm") << true + QTest::newRow("corrupt xpm (pixels)") << QString("corrupt-pixels.xpm") << true << QString("QImage: XPM pixels missing on image line 3"); - QTest::newRow("corrupt xbm") << QString("images/corrupt.xbm") << false << QString(""); + QTest::newRow("corrupt xbm") << QString("corrupt.xbm") << false << QString(""); #if defined QTEST_HAVE_TIFF - QTest::newRow("corrupt tiff") << QString("images/corrupt-data.tif") << true << QString(""); + QTest::newRow("corrupt tiff") << QString("corrupt-data.tif") << true << QString(""); #endif } @@ -1189,16 +1191,17 @@ void tst_QImageReader::readCorruptImage() QFETCH(QString, fileName); QFETCH(bool, shouldFail); QFETCH(QString, message); + if (!message.isEmpty()) QTest::ignoreMessage(QtWarningMsg, message.toLatin1()); - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); QVERIFY(reader.canRead()); QCOMPARE(reader.read().isNull(), shouldFail); } void tst_QImageReader::readCorruptBmp() { - QCOMPARE(QImage("images/tst7.bmp").convertToFormat(QImage::Format_ARGB32_Premultiplied), QImage("images/tst7.png").convertToFormat(QImage::Format_ARGB32_Premultiplied)); + QCOMPARE(QImage("tst7.bmp").convertToFormat(QImage::Format_ARGB32_Premultiplied), QImage("images/tst7.png").convertToFormat(QImage::Format_ARGB32_Premultiplied)); } void tst_QImageReader::supportsOption_data() @@ -1206,7 +1209,7 @@ void tst_QImageReader::supportsOption_data() QTest::addColumn("fileName"); QTest::addColumn("options"); - QTest::newRow("png") << QString("images/black.png") + QTest::newRow("png") << QString("black.png") << (QIntList() << QImageIOHandler::Gamma << QImageIOHandler::Description << QImageIOHandler::Quality @@ -1234,7 +1237,7 @@ void tst_QImageReader::supportsOption() << QImageIOHandler::Animation << QImageIOHandler::BackgroundColor; - QImageReader reader(fileName); + QImageReader reader(prefix + fileName); for (int i = 0; i < options.size(); ++i) { QVERIFY(reader.supportsOption(QImageIOHandler::ImageOption(options.at(i)))); allOptions.remove(QImageIOHandler::ImageOption(options.at(i))); @@ -1250,14 +1253,14 @@ void tst_QImageReader::tiffCompression_data() QTest::addColumn("uncompressedFile"); QTest::addColumn("compressedFile"); - QTest::newRow("TIFF: adobedeflate") << "images/rgba_nocompression_littleendian.tif" - << "images/rgba_adobedeflate_littleendian.tif"; - QTest::newRow("TIFF: lzw") << "images/rgba_nocompression_littleendian.tif" - << "images/rgba_lzw_littleendian.tif"; - QTest::newRow("TIFF: packbits") << "images/rgba_nocompression_littleendian.tif" - << "images/rgba_packbits_littleendian.tif"; - QTest::newRow("TIFF: zipdeflate") << "images/rgba_nocompression_littleendian.tif" - << "images/rgba_zipdeflate_littleendian.tif"; + QTest::newRow("TIFF: adobedeflate") << "rgba_nocompression_littleendian.tif" + << "rgba_adobedeflate_littleendian.tif"; + QTest::newRow("TIFF: lzw") << "rgba_nocompression_littleendian.tif" + << "rgba_lzw_littleendian.tif"; + QTest::newRow("TIFF: packbits") << "rgba_nocompression_littleendian.tif" + << "rgba_packbits_littleendian.tif"; + QTest::newRow("TIFF: zipdeflate") << "rgba_nocompression_littleendian.tif" + << "rgba_zipdeflate_littleendian.tif"; } void tst_QImageReader::tiffCompression() @@ -1265,16 +1268,16 @@ void tst_QImageReader::tiffCompression() QFETCH(QString, uncompressedFile); QFETCH(QString, compressedFile); - QImage uncompressedImage(uncompressedFile); - QImage compressedImage(compressedFile); + QImage uncompressedImage(prefix + uncompressedFile); + QImage compressedImage(prefix + compressedFile); QCOMPARE(uncompressedImage, compressedImage); } void tst_QImageReader::tiffEndianness() { - QImage littleEndian("images/rgba_nocompression_littleendian.tif"); - QImage bigEndian("images/rgba_nocompression_bigendian.tif"); + QImage littleEndian(prefix + "rgba_nocompression_littleendian.tif"); + QImage bigEndian(prefix + "rgba_nocompression_bigendian.tif"); QCOMPARE(littleEndian, bigEndian); } @@ -1286,8 +1289,10 @@ void tst_QImageReader::dotsPerMeter_data() QTest::addColumn("fileName"); QTest::addColumn("expectedDotsPerMeterX"); QTest::addColumn("expectedDotsPerMeterY"); - - QTest::newRow("TIFF: 72 dpi") << "images/rgba_nocompression_littleendian.tif" << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54)); +#if defined QTEST_HAVE_TIFF + QTest::newRow("TIFF: 72 dpi") << ("rgba_nocompression_littleendian.tif") << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54)); + QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54)); +#endif } void tst_QImageReader::dotsPerMeter() @@ -1296,7 +1301,7 @@ void tst_QImageReader::dotsPerMeter() QFETCH(int, expectedDotsPerMeterX); QFETCH(int, expectedDotsPerMeterY); - QImage image(fileName); + QImage image(prefix + fileName); QCOMPARE(image.dotsPerMeterX(), expectedDotsPerMeterX); QCOMPARE(image.dotsPerMeterY(), expectedDotsPerMeterY); @@ -1307,8 +1312,10 @@ void tst_QImageReader::physicalDpi_data() QTest::addColumn("fileName"); QTest::addColumn("expectedPhysicalDpiX"); QTest::addColumn("expectedPhysicalDpiY"); - - QTest::newRow("TIFF: 72 dpi") << "images/rgba_nocompression_littleendian.tif" << 72 << 72; +#if defined QTEST_HAVE_TIFF + QTest::newRow("TIFF: 72 dpi") << "rgba_nocompression_littleendian.tif" << 72 << 72; + QTest::newRow("TIFF: 100 dpi") << "image_100dpi.tif" << 100 << 100; +#endif } void tst_QImageReader::physicalDpi() @@ -1317,7 +1324,7 @@ void tst_QImageReader::physicalDpi() QFETCH(int, expectedPhysicalDpiX); QFETCH(int, expectedPhysicalDpiY); - QImage image(fileName); + QImage image(prefix + fileName); QCOMPARE(image.physicalDpiX(), expectedPhysicalDpiX); QCOMPARE(image.physicalDpiY(), expectedPhysicalDpiY); @@ -1328,7 +1335,7 @@ void tst_QImageReader::autoDetectImageFormat() // Assume PNG is supported :-) { // Disables file name extension probing - QImageReader reader("images/kollada"); + QImageReader reader(prefix + "kollada"); reader.setAutoDetectImageFormat(false); QVERIFY(!reader.canRead()); QVERIFY(reader.read().isNull()); @@ -1338,7 +1345,7 @@ void tst_QImageReader::autoDetectImageFormat() } { // Disables detection based on suffix - QImageReader reader("images/kollada.png"); + QImageReader reader(prefix + "kollada.png"); reader.setAutoDetectImageFormat(false); QVERIFY(!reader.canRead()); QVERIFY(reader.read().isNull()); @@ -1348,7 +1355,7 @@ void tst_QImageReader::autoDetectImageFormat() } { // Disables detection based on content - QImageReader reader("images/kollada-noext"); + QImageReader reader(prefix + "kollada-noext"); reader.setAutoDetectImageFormat(false); QVERIFY(!reader.canRead()); QVERIFY(reader.read().isNull()); diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp index 70d9e70..349afa5 100644 --- a/tests/auto/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp @@ -165,7 +165,7 @@ tst_QImageWriter::tst_QImageWriter() tst_QImageWriter::~tst_QImageWriter() { - QDir dir(prefix + QLatin1String("images")); + QDir dir(prefix); QStringList filesToDelete = dir.entryList(QStringList() << "gen-*" , QDir::NoDotAndDotDot | QDir::Files); foreach( QString file, filesToDelete) { QFile::remove(dir.absoluteFilePath(file)); @@ -445,13 +445,13 @@ void tst_QImageWriter::supportsOption_data() QTest::addColumn("fileName"); QTest::addColumn("options"); - QTest::newRow("png") << QString(prefix + "gen-black.png") + QTest::newRow("png") << QString("gen-black.png") << (QIntList() << QImageIOHandler::Gamma << QImageIOHandler::Description << QImageIOHandler::Quality << QImageIOHandler::Size); #if defined QTEST_HAVE_TIFF - QTest::newRow("tiff") << QString("images/gen-black.tiff") + QTest::newRow("tiff") << QString("gen-black.tiff") << (QIntList() << QImageIOHandler::Size << QImageIOHandler::CompressionRatio); #endif @@ -478,7 +478,7 @@ void tst_QImageWriter::supportsOption() << QImageIOHandler::Animation << QImageIOHandler::BackgroundColor; - QImageWriter writer(fileName); + QImageWriter writer(prefix + fileName); for (int i = 0; i < options.size(); ++i) { QVERIFY(writer.supportsOption(QImageIOHandler::ImageOption(options.at(i)))); allOptions.remove(QImageIOHandler::ImageOption(options.at(i))); -- cgit v0.12 From e2d70563652a89384d13c9a1d7ac1c839a81e9be Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 20 May 2009 10:40:46 +0200 Subject: Inject some more Qt colors into the css to make it look a bit more QtSoftware Reviewed-By: Kavindra Palaraja --- tools/qdoc3/test/classic.css | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index e53ea29..8e9eb78 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -1,5 +1,5 @@ BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; + font-family: Arial, Geneva, Helvetica, sans-serif; } BODY,TD { font-size: 90%; @@ -20,7 +20,7 @@ h3.fn,span.fn background-color: #d5e1d5; border-width: 1px; border-style: solid; - border-color: #84b0c7; + border-color: #66bc29; font-weight: bold; -moz-border-radius: 8px 8px 8px 8px; padding: 6px 0px 6px 10px; @@ -28,7 +28,7 @@ h3.fn,span.fn a:link { - color: #004faf; + color: #0046ad; text-decoration: none } @@ -62,16 +62,6 @@ a.compat:visited text-decoration: none } -td.postheader -{ - font-family: sans-serif -} - -tr.address -{ - font-family: sans-serif -} - body { background: #ffffff; @@ -86,10 +76,10 @@ table td.memItemLeft { border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; + border-top-color: #66bc29; + border-right-color: #66bc29; + border-bottom-color: #66bc29; + border-left-color: #66bc29; border-top-style: solid; border-right-style: none; border-bottom-style: none; @@ -104,15 +94,15 @@ table td.memItemRight { border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; + border-top-color: #66bc29; + border-right-color: #66bc29; + border-bottom-color: #66bc29; + border-left-color: #66bc29; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; - background-color: #d5e1d5; + background-color: #FAFAFA; font-size: 80%; } -- cgit v0.12 From 691e83425ac5883922837bc5fd1efb5385db9871 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 20 May 2009 11:57:08 +0200 Subject: Add string-->enum conversion for properties and slots --- src/script/qscriptengine_p.cpp | 5 ++ src/script/qscriptenginefwd_p.h | 1 + src/script/qscriptextqobject.cpp | 33 +++++++++--- tests/auto/qscriptqobject/tst_qscriptqobject.cpp | 66 +++++++++++++++++++++++- 4 files changed, 96 insertions(+), 9 deletions(-) diff --git a/src/script/qscriptengine_p.cpp b/src/script/qscriptengine_p.cpp index a2e58de..84a420d 100644 --- a/src/script/qscriptengine_p.cpp +++ b/src/script/qscriptengine_p.cpp @@ -1662,6 +1662,11 @@ bool QScriptEnginePrivate::convert(const QScriptValueImpl &value, return false; } +QScriptEngine::DemarshalFunction QScriptEnginePrivate::demarshalFunction(int type) const +{ + return m_customTypes.value(type).demarshal; +} + QScriptValuePrivate *QScriptEnginePrivate::registerValue(const QScriptValueImpl &value) { if (value.isString()) { diff --git a/src/script/qscriptenginefwd_p.h b/src/script/qscriptenginefwd_p.h index 2ea66c5..855317c 100644 --- a/src/script/qscriptenginefwd_p.h +++ b/src/script/qscriptenginefwd_p.h @@ -350,6 +350,7 @@ public: QScriptValueImpl create(int type, const void *ptr); static bool convert(const QScriptValueImpl &value, int type, void *ptr, QScriptEnginePrivate *eng); + QScriptEngine::DemarshalFunction demarshalFunction(int type) const; QScriptValueImpl arrayFromStringList(const QStringList &lst); static QStringList stringListFromArray(const QScriptValueImpl &arr); diff --git a/src/script/qscriptextqobject.cpp b/src/script/qscriptextqobject.cpp index d18c3da..4522807 100644 --- a/src/script/qscriptextqobject.cpp +++ b/src/script/qscriptextqobject.cpp @@ -425,7 +425,7 @@ static void callQtMethod(QScriptContextPrivate *context, QMetaMethod::MethodType matchDistance += 10; } } - } else if (actual.isNumber()) { + } else if (actual.isNumber() || actual.isString()) { // see if it's an enum value QMetaEnum m; if (argType.isMetaEnum()) { @@ -436,11 +436,21 @@ static void callQtMethod(QScriptContextPrivate *context, QMetaMethod::MethodType m = meta->enumerator(mi); } if (m.isValid()) { - int ival = actual.toInt32(); - if (m.valueToKey(ival) != 0) { - qVariantSetValue(v, ival); - converted = true; - matchDistance += 10; + if (actual.isNumber()) { + int ival = actual.toInt32(); + if (m.valueToKey(ival) != 0) { + qVariantSetValue(v, ival); + converted = true; + matchDistance += 10; + } + } else { + QString sval = actual.toString(); + int ival = m.keyToValue(sval.toLatin1()); + if (ival != -1) { + qVariantSetValue(v, ival); + converted = true; + matchDistance += 10; + } } } } @@ -1809,7 +1819,16 @@ void QScript::QtPropertyFunction::execute(QScriptContextPrivate *context) } } else { // set - QVariant v = variantFromValue(eng_p, prop.userType(), context->argument(0)); + QScriptValueImpl arg = context->argument(0); + QVariant v; + if (prop.isEnumType() && arg.isString() + && !eng_p->demarshalFunction(prop.userType())) { + // give QMetaProperty::write() a chance to convert from + // string to enum value + v = arg.toString(); + } else { + v = variantFromValue(eng_p, prop.userType(), arg); + } QScriptable *scriptable = scriptableFromQObject(qobject); QScriptEngine *oldEngine = 0; diff --git a/tests/auto/qscriptqobject/tst_qscriptqobject.cpp b/tests/auto/qscriptqobject/tst_qscriptqobject.cpp index 9b9dd16..1025d2a 100644 --- a/tests/auto/qscriptqobject/tst_qscriptqobject.cpp +++ b/tests/auto/qscriptqobject/tst_qscriptqobject.cpp @@ -107,6 +107,7 @@ class MyQObject : public QObject Q_PROPERTY(int readOnlyProperty READ readOnlyProperty) Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType) + Q_PROPERTY(Policy enumProperty READ enumProperty WRITE setEnumProperty) Q_ENUMS(Policy Strategy) Q_FLAGS(Ability) @@ -144,6 +145,7 @@ public: m_hiddenValue(456.0), m_writeOnlyValue(789), m_readOnlyValue(987), + m_enumValue(BarPolicy), m_qtFunctionInvoked(-1) { } @@ -205,6 +207,11 @@ public: void setPropWithCustomType(const CustomType &c) { m_customType = c; } + Policy enumProperty() const + { return m_enumValue; } + void setEnumProperty(Policy policy) + { m_enumValue = policy; } + int qtFunctionInvoked() const { return m_qtFunctionInvoked; } @@ -255,8 +262,8 @@ public: { m_qtFunctionInvoked = 36; m_actuals << policy; } Q_INVOKABLE Policy myInvokableReturningEnum() { m_qtFunctionInvoked = 37; return BazPolicy; } - Q_INVOKABLE MyQObject::Policy myInvokableReturningQualifiedEnum() - { m_qtFunctionInvoked = 38; return BazPolicy; } + Q_INVOKABLE MyQObject::Strategy myInvokableReturningQualifiedEnum() + { m_qtFunctionInvoked = 38; return BazStrategy; } Q_INVOKABLE QVector myInvokableReturningVectorOfInt() { m_qtFunctionInvoked = 11; return QVector(); } Q_INVOKABLE void myInvokableWithVectorOfIntArg(const QVector &) @@ -410,6 +417,7 @@ protected: int m_readOnlyValue; QKeySequence m_shortcut; CustomType m_customType; + Policy m_enumValue; int m_qtFunctionInvoked; QVariantList m_actuals; QByteArray m_connectedSignal; @@ -417,6 +425,7 @@ protected: }; Q_DECLARE_METATYPE(MyQObject*) +Q_DECLARE_METATYPE(MyQObject::Policy) class MyOtherQObject : public MyQObject { @@ -530,6 +539,24 @@ static QScriptValue getSetProperty(QScriptContext *ctx, QScriptEngine *) return ctx->callee().property("value"); } +static QScriptValue policyToScriptValue(QScriptEngine *engine, const MyQObject::Policy &policy) +{ + return qScriptValueFromValue(engine, policy); +} + +static void policyFromScriptValue(const QScriptValue &value, MyQObject::Policy &policy) +{ + QString str = value.toString(); + if (str == QLatin1String("red")) + policy = MyQObject::FooPolicy; + else if (str == QLatin1String("green")) + policy = MyQObject::BarPolicy; + else if (str == QLatin1String("blue")) + policy = MyQObject::BazPolicy; + else + policy = (MyQObject::Policy)-1; +} + void tst_QScriptExtQObject::getSetStaticProperty() { QCOMPARE(m_engine->evaluate("myObject.noSuchProperty").isUndefined(), true); @@ -751,6 +778,31 @@ void tst_QScriptExtQObject::getSetStaticProperty() QScriptValue::ReadOnly); } + // enum property + QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy); + { + QScriptValue val = m_engine->evaluate("myObject.enumProperty"); + QVERIFY(val.isNumber()); + QCOMPARE(val.toInt32(), (int)MyQObject::BarPolicy); + } + m_engine->evaluate("myObject.enumProperty = 2"); + QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy); + m_engine->evaluate("myObject.enumProperty = 'BarPolicy'"); + QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy); + m_engine->evaluate("myObject.enumProperty = 'ScoobyDoo'"); + // ### ouch! Shouldn't QMetaProperty::write() rather not change the value...? + QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1); + // enum property with custom conversion + qScriptRegisterMetaType(m_engine, policyToScriptValue, policyFromScriptValue); + m_engine->evaluate("myObject.enumProperty = 'red'"); + QCOMPARE(m_myObject->enumProperty(), MyQObject::FooPolicy); + m_engine->evaluate("myObject.enumProperty = 'green'"); + QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy); + m_engine->evaluate("myObject.enumProperty = 'blue'"); + QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy); + m_engine->evaluate("myObject.enumProperty = 'nada'"); + QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1); + // auto-dereferencing of pointers { QBrush b = QColor(0xCA, 0xFE, 0xBA, 0xBE); @@ -1879,6 +1931,16 @@ void tst_QScriptExtQObject::classEnums() QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::BazPolicy)); m_myObject->resetQtFunctionInvoked(); + QCOMPARE(m_engine->evaluate("myObject.myInvokableWithEnumArg('BarPolicy')").isUndefined(), true); + QCOMPARE(m_myObject->qtFunctionInvoked(), 10); + QCOMPARE(m_myObject->qtFunctionActuals().size(), 1); + QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::BarPolicy)); + + m_myObject->resetQtFunctionInvoked(); + QVERIFY(m_engine->evaluate("myObject.myInvokableWithEnumArg('NoSuchPolicy')").isError()); + QCOMPARE(m_myObject->qtFunctionInvoked(), -1); + + m_myObject->resetQtFunctionInvoked(); QCOMPARE(m_engine->evaluate("myObject.myInvokableWithQualifiedEnumArg(MyQObject.BazPolicy)").isUndefined(), true); QCOMPARE(m_myObject->qtFunctionInvoked(), 36); QCOMPARE(m_myObject->qtFunctionActuals().size(), 1); -- cgit v0.12 From fc6e0155cc3fa9beb3b48704a1effe87a74c2779 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 20 May 2009 14:23:47 +0200 Subject: Doc: First attempt at a simpler widgets tutorial. Task-number: 253710 Reviewed-by: Trust Me --- doc/src/snippets/widgets-tutorial/template.cpp | 14 +++ doc/src/tutorials/widgets-tutorial.qdoc | 132 +++++++++++++++++++-- .../tutorials/widgets/childwidget/childwidget.pro | 7 ++ examples/tutorials/widgets/childwidget/main.cpp | 60 ++++++++++ examples/tutorials/widgets/nestedlayouts/main.cpp | 100 ++++++++++++++++ .../widgets/nestedlayouts/nestedlayouts.pro | 7 ++ examples/tutorials/widgets/toplevel/main.cpp | 56 +++++++++ examples/tutorials/widgets/toplevel/toplevel.pro | 7 ++ examples/tutorials/widgets/widgets.pro | 8 ++ examples/tutorials/widgets/windowlayout/main.cpp | 62 ++++++++++ .../widgets/windowlayout/windowlayout.pro | 7 ++ 11 files changed, 449 insertions(+), 11 deletions(-) create mode 100644 doc/src/snippets/widgets-tutorial/template.cpp create mode 100644 examples/tutorials/widgets/childwidget/childwidget.pro create mode 100644 examples/tutorials/widgets/childwidget/main.cpp create mode 100644 examples/tutorials/widgets/nestedlayouts/main.cpp create mode 100644 examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro create mode 100644 examples/tutorials/widgets/toplevel/main.cpp create mode 100644 examples/tutorials/widgets/toplevel/toplevel.pro create mode 100644 examples/tutorials/widgets/widgets.pro create mode 100644 examples/tutorials/widgets/windowlayout/main.cpp create mode 100644 examples/tutorials/widgets/windowlayout/windowlayout.pro diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/doc/src/snippets/widgets-tutorial/template.cpp new file mode 100644 index 0000000..5958676 --- /dev/null +++ b/doc/src/snippets/widgets-tutorial/template.cpp @@ -0,0 +1,14 @@ +#include + +// Include header files for application components. +// ... + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + // Set up and show widgets. + // ... + + return app.exec(); +} diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc index ead44af..1e89431 100644 --- a/doc/src/tutorials/widgets-tutorial.qdoc +++ b/doc/src/tutorials/widgets-tutorial.qdoc @@ -41,11 +41,14 @@ /*! \page widgets-tutorial.html + \startpage {index.html}{Qt Reference Documentation} + \nextpage {tutorials/widgets/toplevel}{Creating a Window} \title Widgets Tutorial \ingroup tutorials - \brief This tutorial covers basic usage of widgets and layouts, showing how they are used to build GUI applications. + \brief This tutorial covers basic usage of widgets and layouts, showing how + they are used to build GUI applications. \section1 Introduction @@ -68,7 +71,60 @@ occupied by its parent. This means that, when a window is deleted, all the widgets it contains are automatically deleted. - \section1 Creating a Window + \section1 Writing a main Function + + Many of the GUI examples in Qt follow the pattern of having a \c{main.cpp} + file containing code to initialize the application, and a number of other + source and header files containing the application logic and custom GUI + components. + + A typical \c main() function, written in \c{main.cpp}, looks like this: + + \quotefile doc/src/snippets/widgets-tutorial/template.cpp + + We first construct a QApplication object which is configured using any + arguments passed in from the command line. After any widgets have been + created and shown, we call QApplication::exec() to start Qt's event loop. + Control passes to Qt until this function returns, at which point we return + the value we obtain from this function. + + In each part of this tutorial, we provide an example that is written + entirely within a \c main() function. In more sophisticated examples, the + code to set up widgets and layouts is written in other parts of the + example. For example, the GUI for a main window may be set up in the + constructor of a QMainWindow subclass. + + The \l{Qt Examples#Widgets}{Widgets examples} are a good place to look for + more complex and complete examples and applications. + + \section1 Building Examples and Tutorials + + If you obtained a binary package of Qt or compiled it yourself, the + examples described in this tutorial should already be ready to run. + However, if you may wish to modify them and recompile them, you need to + perform the following steps: + + \list 1 + \o At the command line, enter the directory containing the example you + wish to recompile. + \o Type \c qmake and press \key{Return}. If this doesn't work, make sure + that the executable is on your path, or enter its full location. + \o On Linux/Unix and Mac OS X, type \c make and press \key{Return}; + on Windows with Visual Studio, type \c nmake and press \key{Return}. + \endlist + + An executable file should have been created within the current directory. + On Windows, this file may be located within a \c debug or \c release + subdirectory. You can run this file to see the example code at work. +*/ + +/*! + \page widgets-tutorial-toplevel.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial} + \nextpage {Widgets Tutorial - Child Widgets} + \example tutorials/widgets/toplevel + \title Widgets Tutorial - Creating a Window If a widget is created without a parent, it is treated as a window, or \e{top-level widget}, when it is shown. Since it has no parent object to @@ -82,7 +138,7 @@
    \endraw - \snippet snippets/widgets-tutorial/toplevel/main.cpp create, resize and show + \snippet tutorials/widgets/toplevel/main.cpp main program \raw HTML \endraw @@ -92,15 +148,28 @@
    \endraw - We can add a child widget to this window by passing \c window as the - parent to its constructor. In this case, we add a button to the window - and place it in a specific location: + To create a real GUI, we need to place widgets inside the window. To do + this, we pass a QWidget instance to a widget's constructor, as we will + demonstrate in the next part of this tutorial. +*/ + +/*! + \page widgets-tutorial-childwidget.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Creating a Window} + \nextpage {Widgets Tutorial - Using Layouts} + \example tutorials/widgets/childwidget + \title Widgets Tutorial - Child Widgets + + We can add a child widget to the window created in the previous example by + passing \c window as the parent to its constructor. In this case, we add a + button to the window and place it in a specific location: \raw HTML
    \endraw - \snippet snippets/widgets-tutorial/childwidget/main.cpp create, position and show + \snippet tutorials/widgets/childwidget/main.cpp main program \raw HTML \endraw @@ -112,9 +181,16 @@ The button is now a child of the window and will be deleted when the window is destroyed. Note that hiding or closing the window does not - automatically destroy it. + automatically destroy it. It will be destroyed when the example exits. +*/ - \section1 Using Layouts +/*! + \page widgets-tutorial-windowlayout.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Child Widgets} + \nextpage {Widgets Tutorial - Nested Layouts} + \example tutorials/widgets/windowlayout + \title Widgets Tutorial - Using Layouts Usually, child widgets are arranged inside a window using layout objects rather than by specifying positions and sizes explicitly. Here, we @@ -125,7 +201,7 @@
    \endraw - \snippet snippets/widgets-tutorial/windowlayout/main.cpp create, lay out widgets and show + \snippet tutorials/widgets/windowlayout/main.cpp main program \raw HTML \endraw @@ -149,17 +225,31 @@ manage the label and line edit and set the layout on the window, both the widgets and the layout itself are ''reparented'' to become children of the window. +*/ + +/*! + \page widgets-tutorial-nestedlayouts.html + \contentspage {Widgets Tutorial}{Contents} + \previouspage {Widgets Tutorial - Using Layouts} + \example tutorials/widgets/nestedlayouts + \title Widgets Tutorial - Nested Layouts Just as widgets can contain other widgets, layouts can be used to provide different levels of grouping for widgets. Here, we want to display a label alongside a line edit at the top of a window, above a table view showing the results of a query. + We achieve this by creating two layouts: \c{queryLayout} is a QHBoxLayout + that contains QLabel and QLineEdit widgets placed side-by-side; + \c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a + QTableView arranged vertically. + \raw HTML
    \endraw - \snippet snippets/widgets-tutorial/nestedlayouts/main.cpp create, lay out widgets and show + \snippet tutorials/widgets/nestedlayouts/main.cpp first part + \snippet tutorials/widgets/nestedlayouts/main.cpp last part \raw HTML \endraw @@ -169,6 +259,26 @@
    \endraw + Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()} + function to insert the \c{queryLayout} above the \c{resultView} table. + + We have omitted the code that sets up the model containing the data shown + by the QTableView widget, \c resultView. For completeness, we show this below. + As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout and QFormLayout classes to help with more complex user interfaces. + These can be seen if you run \l{Qt Designer}. + + \section1 Setting up the Model + + In the code above, we did not show where the table's data came from + because we wanted to concentrate on the use of layouts. Here, we see + that the model holds a number of items corresponding to rows, each of + which is set up to contain data for two columns. + + \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model + + The use of models and views is covered in the + \l{Qt Examples#Item Views}{item view examples} and in the + \l{Model/View Programming} overview. */ diff --git a/examples/tutorials/widgets/childwidget/childwidget.pro b/examples/tutorials/widgets/childwidget/childwidget.pro new file mode 100644 index 0000000..37ae98e --- /dev/null +++ b/examples/tutorials/widgets/childwidget/childwidget.pro @@ -0,0 +1,7 @@ +SOURCES = main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/childwidget +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS childwidget.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/childwidget +INSTALLS += target sources diff --git a/examples/tutorials/widgets/childwidget/main.cpp b/examples/tutorials/widgets/childwidget/main.cpp new file mode 100644 index 0000000..99235bd --- /dev/null +++ b/examples/tutorials/widgets/childwidget/main.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [main program] +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QWidget *window = new QWidget(); + window->resize(320, 240); + window->setWindowTitle(tr("Child widget")); + window->show(); + +//! [create, position and show] + QPushButton *button = new QPushButton(tr("Press me"), window); + button->move(100, 100); + button->show(); +//! [create, position and show] + return app.exec(); +} +//! [main program] diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp new file mode 100644 index 0000000..29996c6 --- /dev/null +++ b/examples/tutorials/widgets/nestedlayouts/main.cpp @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [main program] +//! [first part] +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QWidget *window = new QWidget(); + + QLabel *queryLabel = new QLabel(tr("Query:")); + QLineEdit *queryEdit = new QLineEdit(); + QTableView *resultView = new QTableView(); + + QHBoxLayout *queryLayout = new QHBoxLayout(); + queryLayout->addWidget(queryLabel); + queryLayout->addWidget(queryEdit); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addLayout(queryLayout); + mainLayout->addWidget(resultView); + window->setLayout(mainLayout); + + // Set up the model and configure the view... +//! [first part] + +//! [set up the model] + QStandardItemModel model; + model.setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Office")); + + QList rows = QList() + << (QStringList() << "Verne Nilsen" << "123") + << (QStringList() << "Carlos Tang" << "77") + << (QStringList() << "Bronwyn Hawcroft" << "119") + << (QStringList() << "Alessandro Hanssen" << "32") + << (QStringList() << "Andrew John Bakken" << "54") + << (QStringList() << "Vanessa Weatherley" << "85") + << (QStringList() << "Rebecca Dickens" << "17") + << (QStringList() << "David Bradley" << "42") + << (QStringList() << "Knut Walters" << "25") + << (QStringList() << "Andrea Jones" << "34"); + + foreach (QStringList row, rows) { + QList items; + foreach (QString text, row) + items.append(new QStandardItem(text)); + model.appendRow(items); + } + + resultView->setModel(&model); + resultView->verticalHeader()->hide(); + resultView->horizontalHeader()->setStretchLastSection(true); +//! [set up the model] +//! [last part] + window->setWindowTitle(tr("Nested layouts")); + window->show(); + return app.exec(); +} +//! [last part] +//! [main program] diff --git a/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro new file mode 100644 index 0000000..a7f141c --- /dev/null +++ b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro @@ -0,0 +1,7 @@ +SOURCES = main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/nestedlayouts +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS nestedlayouts.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/nestedlayouts +INSTALLS += target sources diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp new file mode 100644 index 0000000..c966037 --- /dev/null +++ b/examples/tutorials/widgets/toplevel/main.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [main program] +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); +//! [create, resize and show] + QWidget *window = new QWidget(); + window->resize(320, 240); + window->show(); +//! [create, resize and show] + window->setWindowTitle(tr("Top-level widget")); + return app.exec(); +} +//! [main program] diff --git a/examples/tutorials/widgets/toplevel/toplevel.pro b/examples/tutorials/widgets/toplevel/toplevel.pro new file mode 100644 index 0000000..58d59c5 --- /dev/null +++ b/examples/tutorials/widgets/toplevel/toplevel.pro @@ -0,0 +1,7 @@ +SOURCES = main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/toplevel +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS toplevel.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/toplevel +INSTALLS += target sources diff --git a/examples/tutorials/widgets/widgets.pro b/examples/tutorials/widgets/widgets.pro new file mode 100644 index 0000000..7a870e7 --- /dev/null +++ b/examples/tutorials/widgets/widgets.pro @@ -0,0 +1,8 @@ +TEMPLATE = subdirs +SUBDIRS = toplevel childwidget windowlayout nestedlayouts + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS widgets.pro README +sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets +INSTALLS += target sources diff --git a/examples/tutorials/widgets/windowlayout/main.cpp b/examples/tutorials/widgets/windowlayout/main.cpp new file mode 100644 index 0000000..d7c75a3 --- /dev/null +++ b/examples/tutorials/widgets/windowlayout/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [main program] +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QWidget *window = new QWidget(); +//! [create, lay out widgets and show] + QLabel *label = new QLabel(tr("Name:")); + QLineEdit *lineEdit = new QLineEdit(); + + QHBoxLayout *layout = new QHBoxLayout(); + layout->addWidget(label); + layout->addWidget(lineEdit); + window->setLayout(layout); +//! [create, lay out widgets and show] + window->setWindowTitle(tr("Window layout")); + window->show(); + return app.exec(); +} +//! [main program] diff --git a/examples/tutorials/widgets/windowlayout/windowlayout.pro b/examples/tutorials/widgets/windowlayout/windowlayout.pro new file mode 100644 index 0000000..408f6ef --- /dev/null +++ b/examples/tutorials/widgets/windowlayout/windowlayout.pro @@ -0,0 +1,7 @@ +SOURCES = main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/windowlayout +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowlayout.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/windowlayout +INSTALLS += target sources -- cgit v0.12