diff options
364 files changed, 14979 insertions, 6223 deletions
diff --git a/config.tests/unix/iodbc/iodbc.cpp b/config.tests/unix/iodbc/iodbc.cpp new file mode 100644 index 0000000..6b64e12 --- /dev/null +++ b/config.tests/unix/iodbc/iodbc.cpp @@ -0,0 +1,7 @@ +#include <sql.h> +#include <sqlext.h> + +int main(int, char **) +{ + return 0; +} diff --git a/config.tests/unix/iodbc/iodbc.pro b/config.tests/unix/iodbc/iodbc.pro new file mode 100644 index 0000000..465a9a7 --- /dev/null +++ b/config.tests/unix/iodbc/iodbc.pro @@ -0,0 +1,4 @@ +SOURCES = iodbc.cpp +CONFIG -= qt dylib +mac:CONFIG -= app_bundle +LIBS += -liodbc @@ -716,6 +716,7 @@ QT_LFLAGS_MYSQL= QT_LFLAGS_MYSQL_R= QT_CFLAGS_SQLITE= QT_LFLAGS_SQLITE= +QT_LFLAGS_ODBC="-lodbc" # flags for libdbus-1 QT_CFLAGS_DBUS= @@ -2704,23 +2705,24 @@ fi if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. ALLOWED="x86 ppc x86_64 ppc64 i386" - for i in $CFG_MAC_ARCHS + # Save the list so we can re-write it using only valid values + CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS" + CFG_MAC_ARCHS= + for i in $CFG_MAC_ARCHS_IN do if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64"; exit 2; fi - done - -# replace "i386" with "x86" to support configuring with -arch i386 as an alias for x86. - CFG_MAC_ARCHS="${CFG_MAC_ARCHS/i386/x86}" - -# 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_GCC_FORMAT/i386_64/x86_64}" - for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do - MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH" + if [ "$i" = "i386" -o "$i" = "x86" ]; then + # These are synonymous values + # CFG_MAC_ARCHS requires x86 while GCC requires i386 + CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86" + MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386" + else + CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i" + MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i" + fi done fi @@ -4130,14 +4132,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)" EXTRA_OBJS="qsettings_mac.o qcore_mac.o" EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\"" - if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then + if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64 X86_CFLAGS="-arch i386" X86_LFLAGS="-arch i386" EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS" EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS" EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS" fi - if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then + if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64 PPC_CFLAGS="-arch ppc" PPC_LFLAGS="-arch ppc" EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS" @@ -4430,14 +4432,21 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do CFG_SQL_odbc=plugin fi else - if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "ODBC support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_ARCHS_COMMANDLINE; then + QT_LFLAGS_ODBC="-liodbc" + if [ "$CFG_SQL_odbc" = "auto" ]; then + CFG_SQL_odbc=plugin + fi else - CFG_SQL_odbc=no + if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "ODBC support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_SQL_odbc=no + fi fi fi fi @@ -6683,6 +6692,9 @@ fi if [ -n "$QT_LFLAGS_SQLITE" ]; then echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp" fi +if [ -n "$QT_LFLAGS_ODBC" ]; then + echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp" +fi if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp" diff --git a/demos/spreadsheet/spreadsheetdelegate.cpp b/demos/spreadsheet/spreadsheetdelegate.cpp index 465c92f..2916757 100644 --- a/demos/spreadsheet/spreadsheetdelegate.cpp +++ b/demos/spreadsheet/spreadsheetdelegate.cpp @@ -51,7 +51,7 @@ QWidget *SpreadSheetDelegate::createEditor(QWidget *parent, { if (index.column() == 1) { QDateTimeEdit *editor = new QDateTimeEdit(parent); - editor->setDisplayFormat("dd/M/yyy"); + editor->setDisplayFormat("dd/M/yyyy"); editor->setCalendarPopup(true); return editor; } @@ -93,7 +93,7 @@ void SpreadSheetDelegate::setEditorData(QWidget *editor, if (dateEditor) { dateEditor->setDate(QDate::fromString( index.model()->data(index, Qt::EditRole).toString(), - "d/M/yy")); + "d/M/yyyy")); } } } @@ -107,7 +107,7 @@ void SpreadSheetDelegate::setModelData(QWidget *editor, } else { QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor); if (dateEditor) { - model->setData(index, dateEditor->date().toString("dd/M/yyy")); + model->setData(index, dateEditor->date().toString("dd/M/yyyy")); } } } diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 2706182..ee240b5 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -58,7 +58,8 @@ and custom plugins allow you to use your own components with \QD. If you are new to \QD, you can take a look at the - \l{Getting To Know Qt Designer} document. + \l{Getting To Know Qt Designer} document. For a quick tutorial on how to + use \QD, refer to \l{A Quick Start to Qt Designer}. Qt Designer 4.5 boasts a long list of improvements. For a detailed list of what is new, refer \l{What's New in Qt Designer 4.5}. @@ -235,6 +236,7 @@ \page designer-to-know.html \contentspage {Qt Designer Manual}{Contents} + \title Getting to Know Qt Designer \tableofcontents @@ -298,12 +300,12 @@ \row \i \inlineimage designer-widget-box.png \i \bold{Qt Designer's Widget Box} - + The widget box provides a selection of standard Qt widgets, layouts, and other objects that can be used to create user interfaces on forms. Each of the categories in the widget box contain widgets with similar uses or related features. - + \note Since Qt 4.4, new widgets have been included, e.g., QPlainTextEdit, QCommandLinkButton, QScrollArea, QMdiArea, and QWebView. @@ -357,7 +359,7 @@ using a grid. The coordinates on the screenshot show the position of each widget within the grid. - \image addressbook-tutorial-part3-labeled-layout.png + \image addressbook-tutorial-part3-labeled-layout.png \note Inside the grid, the QPushButton objects are actually nested. The buttons on the right are first placed in a QVBoxLayout; the buttons at the @@ -366,7 +368,7 @@ To visualize, imagine the layout as a box that shrinks as much as possible, attempting to \e squeeze your widgets in a neat arrangement, and, at the - same time, maximize the use of available space. + same time, maximize the use of available space. Qt's layouts help when you: @@ -408,6 +410,7 @@ \page designer-quick-start.html \contentspage {Qt Designer Manual}{Contents} + \title A Quick Start to Qt Designer Using \QD involves \bold four basic steps: @@ -419,16 +422,14 @@ \o Preview the form \endlist - \omit \image rgbController-screenshot.png - \endomit - Suppose you would like to design a small widget (see screenshot above) - that contains the controls needed to manipulate Red, Green and Blue (RGB) - values -- a type of widget that can be seen everywhere in image - manipulation programs. + Suppose you would like to design a small widget (see screenshot above) that + contains the controls needed to manipulate Red, Green and Blue (RGB) values + -- a type of widget that can be seen everywhere in image manipulation + programs. - \table + \table \row \i \inlineimage designer-choosing-form.png \i \bold{Choosing a Form} @@ -436,39 +437,32 @@ You start by choosing \gui Widget from the \gui{New Form} dialog. \endtable - Then you drag three labels, three spin boxes and three vertical sliders - on to your form. You can roughly arrange them according to how you would - like them to be laid out. - \omit \table - \row \o \inlineimage rgbController-widgetBox.png - \o \inlineimage rgbController-arrangement.png + \row + \i \inlineimage rgbController-arrangement.png + \i \bold{Placing Widgets on a Form} + + Drag three labels, three spin boxes and three vertical sliders on to your + form. To change the label's default text, simply double-click on it. You + can arrange them according to how you would like them to be laid out. \endtable - \endomit To ensure that they are laid out exactly like this in your program, you need to place these widgets into a layout. We will do this in groups of - three. Select the "RED" label. Then, hold down \key Shift while you select + three. Select the "RED" label. Then, hold down \key Ctrl while you select its corresponding spin box and slider. In the \gui{Form} menu, select \gui{Lay Out in a Grid}. - \omit \table \row \i \inlineimage rgbController-form-gridLayout.png \i \inlineimage rgbController-selectForLayout.png \endtable - \endomit Repeat the step for the other two labels along with their corresponding - spin boxes and sliders as well. Your form will now look similar to the - screenshot below. - - \omit - \image rgbController-almostLaidOut.png - \endomit + spin boxes and sliders as well. The next step is to combine all three layouts into one \bold{main layout}. It is important that your form has a main layout; otherwise, the widgets @@ -476,24 +470,26 @@ layout, \gui{Right click} anywhere on your form, outside of the three separate layouts, and select \gui{Lay Out Horizontally}. Alternatively, you could also select \gui{Lay Out in a Grid} -- you will still see the same - arrangement. + arrangement (shown below). + + \image rgbController-final-layout.png \note Main layouts cannot be seen on the form. To check if you have a main layout installed, try resizing your form; your widgets should resize accordingly. When you click on the slider and drag it to a certain value, you want the - spin box to display the slider's position. To do this, you need to connect - the slider's \l{QAbstractSlider::}{valueChanged()} signal to the spin box's - \l{QSpinBox::}{setValue()} slot. You also need to make the reverse - connections, e.g., connect the spin box's \l{QSpinBox::}{valueChanged()} - signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot. + spin box to display the slider's position. To accomplish this behavior, you + need to connect the slider's \l{QAbstractSlider::}{valueChanged()} signal + to the spin box's \l{QSpinBox::}{setValue()} slot. You also need to make + the reverse connections, e.g., connect the spin box's \l{QSpinBox::} + {valueChanged()} signal to the slider's \l{QAbstractSlider::value()} + {setValue()} slot. To do this, you have to switch to \gui{Edit Signals/Slots} mode, either by pressing \key{F4} or something \gui{Edit Signals/Slots} from the \gui{Edit} menu. - \omit \table \row \i \inlineimage rgbController-signalsAndSlots.png @@ -503,17 +499,19 @@ \gui{Configure Connection} dialog, shown below, will pop up. Select the correct signal and slot and click \gui OK. \endtable - \endomit - \omit - \image rgbController-configureConnection.png - \endomit + \image rgbController-configure-connection1.png Repeat the step (in reverse order), clicking on the spin box and dragging the cursor towards the slider, to connect the spin box's \l{QSpinBox::}{valueChanged()} signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot. + You can use the screenshot below as a guide to selecting the correct signal + and slot. + + \image rgbController-configure-connection2.png + Now that you have successfully connected the objects for the "RED" component of the RGB Controller, do the same for the "GREEN" and "BLUE" components as well. @@ -521,7 +519,6 @@ Since RGB values range between 0 and 255, we need to limit the spin box and slider to that particular range. - \omit \table \row \i \inlineimage rgbController-property-editing.png @@ -532,21 +529,14 @@ \l{QSpinBox::}{maximum} property. Then, click on the first vertical slider, you will see \l{QAbstractSlider}'s properties. Enter "255" for the \l{QAbstractSlider::}{maximum} property as well. Repeat this - process for the remaining spin boxes and sliders. + process for the remaining spin boxes and sliders. \endtable - \endomit - - Now, we preview your form to see how it would look in your application. To - preview your form, press \key{Ctrl + R} or select \gui Preview from the - \gui Form menu. - - \omit - \image rgbController-preview.png - \endomit - Try dragging the slider - the spin box will mirror its value too (and vice - versa). Also, you can resize it to see how the layouts used to manage the - child widgets respond to different window sizes. + Now, we preview your form to see how it would look in your application - + press \key{Ctrl + R} or select \gui Preview from the \gui Form menu. Try + dragging the slider - the spin box will mirror its value too (and vice + versa). Also, you can resize it to see how the layouts that are used to + manage the child widgets, respond to different window sizes. */ @@ -788,11 +778,11 @@ have a \c text property that can also be edited by double-clicking on the widget or by pressing \gui F2. \QD interprets the backslash (\\) character specially, enabling newline (\\n) characters to be - inserted into the text; the \\\\ character sequence is used to + inserted into the text; the \\\\ character sequence is used to insert a single backslash into the text. A context menu can also be opened while editing, providing another way to insert special characters and newlines into the text. - \endlist + \endlist \section2 Dynamic Properties @@ -804,12 +794,12 @@ \image designer-property-editor-toolbar.png - To add a dynamic property, clcik on the \gui Add button + To add a dynamic property, clcik on the \gui Add button \inlineimage designer-property-editor-add-dynamic.png - . To remove it, click on the \gui Remove button + . To remove it, click on the \gui Remove button \inlineimage designer-property-editor-remove-dynamic.png instead. You can also sort the properties alphabetically and change the - color groups by clickinig on the \gui Configure button + color groups by clickinig on the \gui Configure button \inlineimage designer-property-editor-configure.png . @@ -911,7 +901,7 @@ \section2 Horizontal and Vertical Layouts - + The simplest way to arrange objects on a form is to place them in a horizontal or vertical layout. Horizontal layouts ensure that the widgets within are aligned horizontally; vertical layouts ensure that they are @@ -1138,7 +1128,7 @@ spacers just provide spacing hints to layouts, so they cannot be connected to other objects. - + \target HighlightedObjects \table \row @@ -1177,7 +1167,7 @@ \image designer-connection-dialog.png - To complete the connection, select a signal from the source object and a + To complete the connection, select a signal from the source object and a slot from the destination object, then click \key OK. Click \key Cancel if you wish to abandon the connection. @@ -1720,22 +1710,22 @@ \i \bold{Resource Files} Within the resource browser, you can open existing resource files or - create new ones. Click the \gui{Edit Resources} button + create new ones. Click the \gui{Edit Resources} button \inlineimage designer-edit-resources-button.png to edit your resources. To reload resources, click on the \gui Reload - button + button \inlineimage designer-reload-resources-button.png . \endtable Once a resource file is loaded, you can create or remove entries in it - using the given \gui{Add Files} - \inlineimage designer-add-resource-entry-button.png - and \gui{Remove Files} + using the given \gui{Add Files} + \inlineimage designer-add-resource-entry-button.png + and \gui{Remove Files} \inlineimage designer-remove-resource-entry-button.png buttons, and specify resources (e.g., images) using the \gui{Add Files} - button + button \inlineimage designer-add-files-button.png . Note that these resources must reside within the current resource file's directory or one of its subdirectories. @@ -1747,15 +1737,15 @@ \i \inlineimage designer-edit-resource.png \i \bold{Editing Resource Files} - Press the + Press the \inlineimage designer-add-resource-entry-button.png button to add a new resource entry to the file. Then use the - \gui{Add Files} button + \gui{Add Files} button \inlineimage designer-add-files-button.png to specify the resource. You can remove resources by selecting the corresponding entry in the - resource editor, and pressing the + resource editor, and pressing the \inlineimage designer-remove-resource-entry-button.png button. \endtable @@ -2657,7 +2647,7 @@ pixmap property in the property editor. QDesignerTaskMenuExtension is useful for custom widgets. It provides an extension that allows you to add custom menu entries to \QD's task menu. - + The \l{designer/taskmenuextension}{Task Menu Extension} example illustrates how to use this class. @@ -2758,7 +2748,7 @@ pixmap property in the property editor. function, making it able to create your extension, such as a \l{designer/containerextension}{MultiPageWidget} container extension. - You can either create a new QExtensionFactory and reimplement the + You can either create a new QExtensionFactory and reimplement the QExtensionFactory::createExtension() function: \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8 diff --git a/doc/src/emb-fonts.qdoc b/doc/src/emb-fonts.qdoc index 3ed23c3..86e169d 100644 --- a/doc/src/emb-fonts.qdoc +++ b/doc/src/emb-fonts.qdoc @@ -131,7 +131,7 @@ The Qt Prerendered Font (QPF2) is an architecture-independent, light-weight and non-scalable font format specific to \l{Qt for Embedded Linux}. - Nokia provides the cross-platform \c makeqpf tool, included in the + Nokia provides the cross-platform \l makeqpf tool, included in the \c tools directory of both \l {Qt} and \l{Qt for Embedded Linux}, which allows generation of QPF2 files from system fonts. diff --git a/doc/src/emb-makeqpf.qdoc b/doc/src/emb-makeqpf.qdoc index ca33eda..8f5d10b 100644 --- a/doc/src/emb-makeqpf.qdoc +++ b/doc/src/emb-makeqpf.qdoc @@ -44,7 +44,10 @@ \title makeqpf \ingroup qt-embedded-linux - \c makeqpf is not part of Qt 4. However, Qt 4 can still read QPF - files generated by Qt 2 or 3. To generate QPF files, use makeqpf from Qt 2 - or 3. + \c makeqpf is a tool to generate pre-rendered fonts in QPF2 format for use on Embedded Linux. + + Qt 4 can read files in QPF2 format in addition to QPF files generated by older versions of + \c makeqpf from Qt 2 or 3. + + \sa {Qt for Embedded Linux Fonts} */ diff --git a/doc/src/images/designer-choosing-form.png b/doc/src/images/designer-choosing-form.png Binary files differindex fa6e470..bee4b29 100644 --- a/doc/src/images/designer-choosing-form.png +++ b/doc/src/images/designer-choosing-form.png diff --git a/doc/src/images/rgbController-arrangement.png b/doc/src/images/rgbController-arrangement.png Binary files differnew file mode 100644 index 0000000..d9e8bab --- /dev/null +++ b/doc/src/images/rgbController-arrangement.png diff --git a/doc/src/images/rgbController-configure-connection1.png b/doc/src/images/rgbController-configure-connection1.png Binary files differnew file mode 100644 index 0000000..4e5dcf2 --- /dev/null +++ b/doc/src/images/rgbController-configure-connection1.png diff --git a/doc/src/images/rgbController-configure-connection2.png b/doc/src/images/rgbController-configure-connection2.png Binary files differnew file mode 100644 index 0000000..f3fcc62 --- /dev/null +++ b/doc/src/images/rgbController-configure-connection2.png diff --git a/doc/src/images/rgbController-final-layout.png b/doc/src/images/rgbController-final-layout.png Binary files differnew file mode 100644 index 0000000..d32a93e --- /dev/null +++ b/doc/src/images/rgbController-final-layout.png diff --git a/doc/src/images/rgbController-form-gridLayout.png b/doc/src/images/rgbController-form-gridLayout.png Binary files differnew file mode 100644 index 0000000..c8f3dcf --- /dev/null +++ b/doc/src/images/rgbController-form-gridLayout.png diff --git a/doc/src/images/rgbController-property-editing.png b/doc/src/images/rgbController-property-editing.png Binary files differnew file mode 100644 index 0000000..64fc500 --- /dev/null +++ b/doc/src/images/rgbController-property-editing.png diff --git a/doc/src/images/rgbController-screenshot.png b/doc/src/images/rgbController-screenshot.png Binary files differnew file mode 100644 index 0000000..6019233 --- /dev/null +++ b/doc/src/images/rgbController-screenshot.png diff --git a/doc/src/images/rgbController-selectForLayout.png b/doc/src/images/rgbController-selectForLayout.png Binary files differnew file mode 100644 index 0000000..7a8e184 --- /dev/null +++ b/doc/src/images/rgbController-selectForLayout.png diff --git a/doc/src/images/rgbController-signalsAndSlots.png b/doc/src/images/rgbController-signalsAndSlots.png Binary files differnew file mode 100644 index 0000000..2ba3aba --- /dev/null +++ b/doc/src/images/rgbController-signalsAndSlots.png diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 4ead9e4..23e8623 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -153,6 +153,7 @@ <li><a href="overviews.html">All Overviews and HOWTOs</a></li> <li><a href="gallery.html">Qt Widget Gallery</a></li> <li><a href="http://doc.trolltech.com/extras/qt43-class-chart.pdf">Class Chart</a></li> + <li><a href="qtglobal.html">Qt Global Declarations</a></li> </ul> </td> <td valign="top"> @@ -207,10 +208,10 @@ <td valign="top"> <ul> <li><a href="http://www.qtsoftware.com/products/add-on-products">Qt Solutions</a></li> - <li><a href="http://www.qtsoftware.com/products/qt/3rdparty/">Partner Add-ons</a></li> + <li><a href="http://www.qtsoftware.com/products/appdev">Partner Add-ons</a></li> <li><a href="http://qt-apps.org">Third-Party Qt Components (qt-apps.org)</a></li> - <li><a href="http://www.qtsoftware.com/support/">Support</a></li> - <li><a href="http://www.qtsoftware.com/support/training/">Training</a></li> + <li><a href="http://www.qtsoftware.com/support-services/support-services/">Support</a></li> + <li><a href="http://www.qtsoftware.com/support-services/training/">Training</a></li> </ul> </td> <td valign="top"> diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc index 925a195..6a689f9 100644 --- a/doc/src/installation.qdoc +++ b/doc/src/installation.qdoc @@ -738,8 +738,6 @@ in the \l{Qt for Windows CE Requirements} document. \header \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \row \o linux-x86-g++ \o GCC 4.2.4 \o 1.7M \o 2.7M \o 3.3M \o 9.9M \o 653K \o 1.1M \o N/A \o 17M \row \o linux-arm-g++ \o GCC 4.1.1 \o 1.9M \o 3.2M \o 4.1M \o 11M \o 507K \o 1.0M \o N/A \o 17M - \row \o linux-arm-g++ (thumb) - \o GCC 4.1.1 \o 1.7M \o 2.8M \o 4.0M \o 9.8M \o 409K \o 796K \o N/A \o 17M \row \o linux-mips-g++ (MIPS32) \o GCC 4.2.4 \o 2.0M \o 3.2M \o 4.5M \o 12M \o 505K \o 1003K \o N/A \o 21M \endtable diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc index dd37fe2..5deb64e 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/phonon-api.qdoc @@ -1032,6 +1032,7 @@ \value Stream The MediaSource object describes a data stream. This is the type used for \l{QIODevice}s. Note that a stream opened with a QUrl, will still be of the Url type. + \value Empty The media source doesn't have a source. \sa MediaSource::type() */ @@ -2026,6 +2027,15 @@ */ /*! + \fn void Phonon::MediaObject::clear() + + Stops and removes all playing and enqueued media sources. + + \sa setCurrentSource() +*/ + + +/*! \fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate) This signal is emitted when the state of the MediaObject has changed. @@ -3027,6 +3037,12 @@ */ /*! + \typedef Phonon::AudioOutputInterface + \inmodule Phonon + \internal +*/ + +/*! \class Phonon::AudioOutputInterface40 \inmodule Phonon \since 4.4 @@ -3251,7 +3267,19 @@ /*! \fn bool Phonon::Path::operator!=(const Path &p) const; - Returns true if this Path is not equal to \a p; otherwise returns false; + Returns true if this Path is not equal to \a p; otherwise returns false. +*/ + +/*! + \fn MediaNode *Phonon::Path::source() const; + + Returns the source MediaNode used by the path. +*/ + +/*! + \fn MediaNode *Phonon::Path::sink() const; + + Returns the sink MediaNode used by the path. */ /*! @@ -4878,7 +4906,7 @@ */ /*! - \typedef typedef void (*CleanUpFunction)() + \typedef Phonon::CleanUpFunction \inmodule Phonon \internal */ diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc index 9dc76a9..ed57566 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/qnamespace.qdoc @@ -528,6 +528,10 @@ Qt::DirectConnection; otherwise the signal is queued, as with Qt::QueuedConnection. + \value UniqueConnection Same as AutoConnection, but there will be a check that the signal is + not already connected to the same slot before connecting, otherwise, + the connection will fail. + \since 4.6 With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them diff --git a/doc/src/qset.qdoc b/doc/src/qset.qdoc index 2d12661..a168800 100644 --- a/doc/src/qset.qdoc +++ b/doc/src/qset.qdoc @@ -695,11 +695,12 @@ */ /*! - \typedef QSet::iterator::iterator_category - \typedef QSet::const_iterator::iterator_category + \typedef QSet::iterator::iterator_category + \typedef QSet::const_iterator::iterator_category - \internal -*/ + Synonyms for \e {std::bidirectional_iterator_tag} indicating + these iterators are bidirectional iterators. + */ /*! \typedef QSet::iterator::difference_type diff --git a/doc/src/signalsandslots.qdoc b/doc/src/signalsandslots.qdoc index 5432bd4..29c8215 100644 --- a/doc/src/signalsandslots.qdoc +++ b/doc/src/signalsandslots.qdoc @@ -178,9 +178,13 @@ looping in the case of cyclic connections (e.g., if \c{b.valueChanged()} were connected to \c{a.setValue()}). - A signal is emitted for every connection you make; if you - duplicate a connection, two signals will be emitted. You can - always break a connection using QObject::disconnect(). + By default, for every connection you make, a signal is emitted; + two signals are emitted for duplicate connections. You can break + all of these connections with a single disconnect() call. + If you pass the Qt::UniqueConnection \a type, the connection will only + be made if it is not a duplicate. If there is already a duplicate + (exact same signal to the exact same slot on the same objects), + the connection will fail and connect will return false This example illustrates that objects can work together without needing to know any information about each other. To enable this, the objects only @@ -218,8 +222,8 @@ will continue immediately, and the slots will be executed later. If several slots are connected to one signal, the slots will be - executed one after the other, in an arbitrary order, when the signal - is emitted. + executed one after the other, in the order they have been connected, + when the signal is emitted. Signals are automatically generated by the \l moc and must not be implemented in the \c .cpp file. They can never have return types diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp index a57de9d..d9e38ed 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp @@ -6,7 +6,7 @@ public: { qreal penWidth = 1; return QRectF(-10 - penWidth / 2, -10 - penWidth / 2, - 20 + penWidth / 2, 20 + penWidth / 2); + 20 + penWidth, 20 + penWidth); } void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp index 07cedbf..be171c6 100644 --- a/doc/src/snippets/picture/picture.cpp +++ b/doc/src/snippets/picture/picture.cpp @@ -66,7 +66,7 @@ int main() QPicture picture; picture.load("drawing.pic"); // load picture QPainter painter; - painter.begin(&myWidget); // paint in myWidget + painter.begin(&myImage); // paint in myImage painter.drawPicture(0, 0, picture); // draw the picture at (0,0) painter.end(); // painting done //! [1] diff --git a/doc/src/tools-list.qdoc b/doc/src/tools-list.qdoc index 7af9936..caef268 100644 --- a/doc/src/tools-list.qdoc +++ b/doc/src/tools-list.qdoc @@ -58,12 +58,10 @@ \o Translate applications to reach international markets. \row \o \l{qmake Manual}{qmake} \o Create makefiles from simple platform-independent project files (\c .pro files). - \omit - \row \o \l{emb-qvfb.html}{qvfb} + \row \o \l{The Virtual Framebuffer}{qvfb} \o Run and test embedded applications on the desktop. - \row \o \l{emb-makeqpf.html}{makeqpf} + \row \o \l{makeqpf} \o Create pre-rendered fonts for embedded devices. - \endomit \row \o \l{moc}{Meta-Object Compiler (moc)} \o Generate meta-object information for QObject subclasses. \row \o \l{User Interface Compiler (uic)} diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc index 301f0d4..6ef3a89 100644 --- a/doc/src/topics.qdoc +++ b/doc/src/topics.qdoc @@ -286,11 +286,9 @@ including ARM, Intel x86, MIPS and SH-4. \o \l {Qt for Windows CE Requirements} \o \l {Installing Qt on Windows CE} \o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt} - \o \l {Qt Examples#Qt for Embedded Linux}{Examples} \endlist \o \list - \o \l {Qt for Embedded Linux Classes}{Classes} \o \l {Windows CE - Using shadow builds}{Using shadow builds} \o \l {Windows CE - Working with Custom SDKs}{Working with Custom SDKs} \endlist diff --git a/examples/animation/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h index 08a9fa2..b412739 100644 --- a/examples/animation/sub-attaq/boat.h +++ b/examples/animation/sub-attaq/boat.h @@ -59,7 +59,6 @@ QT_END_NAMESPACE class Boat : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: enum Movement { None = 0, @@ -85,7 +84,7 @@ public: virtual int type() const; -Q_SIGNALS: +signals: void boatDestroyed(); void boatExecutionFinished(); diff --git a/examples/animation/sub-attaq/bomb.h b/examples/animation/sub-attaq/bomb.h index 226d056..cfd42e5 100644 --- a/examples/animation/sub-attaq/bomb.h +++ b/examples/animation/sub-attaq/bomb.h @@ -51,7 +51,6 @@ class PixmapItem; class Bomb : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: enum Direction { Left = 0, @@ -61,7 +60,7 @@ public: void launch(Direction direction); void destroy(); -Q_SIGNALS: +signals: void bombExplosed(); void bombExecutionFinished(); diff --git a/examples/animation/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp index f2d41bc..e773dae 100644 --- a/examples/animation/sub-attaq/graphicsscene.cpp +++ b/examples/animation/sub-attaq/graphicsscene.cpp @@ -120,7 +120,7 @@ GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode) //parse the xml that contain all data of the game QXmlStreamReader reader; - QFile file(QDir::currentPath() + "/data.xml"); + QFile file(":data.xml"); file.open(QIODevice::ReadOnly); reader.setDevice(&file); LevelDescription currentLevel; diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h index 8b0ea96..1e6618a 100644 --- a/examples/animation/sub-attaq/graphicsscene.h +++ b/examples/animation/sub-attaq/graphicsscene.h @@ -90,7 +90,7 @@ public: void clearScene(); QGraphicsPixmapItem *addWelcomeItem(const QPixmap &pm); -Q_SIGNALS: +signals: void subMarineDestroyed(int); void allSubMarineDestroyed(int); diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp index a166241..5e8e259 100644 --- a/examples/animation/sub-attaq/mainwindow.cpp +++ b/examples/animation/sub-attaq/mainwindow.cpp @@ -43,11 +43,14 @@ #include "mainwindow.h" #include "graphicsscene.h" -#ifndef QT_NO_OPENGL +//Qt +#ifdef QT_NO_OPENGL + #include <QtGui/QMenuBar> + #include <QtGui/QLayout> + #include <QtGui/QApplication> +#else #include <QtOpenGL/QtOpenGL> #endif -//Qt -#include <QtGui/QGraphicsView> MainWindow::MainWindow() : QMainWindow(0) { diff --git a/examples/animation/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h index e5322ad..72bb2d9 100644 --- a/examples/animation/sub-attaq/qanimationstate.h +++ b/examples/animation/sub-attaq/qanimationstate.h @@ -70,7 +70,7 @@ public: void setAnimation(QAbstractAnimation *animation); QAbstractAnimation* animation() const; -Q_SIGNALS: +signals: void animationFinished(); protected: diff --git a/examples/animation/sub-attaq/subattaq.qrc b/examples/animation/sub-attaq/subattaq.qrc index c76f8ef..80a3af1 100644 --- a/examples/animation/sub-attaq/subattaq.qrc +++ b/examples/animation/sub-attaq/subattaq.qrc @@ -34,5 +34,6 @@ <file alias="big/explosion/submarine/step2" >pics/big/explosion/submarine/step2.png</file> <file alias="big/explosion/submarine/step3" >pics/big/explosion/submarine/step3.png</file> <file alias="big/explosion/submarine/step4" >pics/big/explosion/submarine/step4.png</file> + <file>data.xml</file> </qresource> </RCC> diff --git a/examples/animation/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h index 4001603..b8dd2da 100644 --- a/examples/animation/sub-attaq/submarine.h +++ b/examples/animation/sub-attaq/submarine.h @@ -75,7 +75,7 @@ public: virtual int type() const; -Q_SIGNALS: +signals: void subMarineDestroyed(); void subMarineExecutionFinished(); void subMarineStateChanged(); diff --git a/examples/animation/sub-attaq/torpedo.h b/examples/animation/sub-attaq/torpedo.h index 4a0f457..f5ab614 100644 --- a/examples/animation/sub-attaq/torpedo.h +++ b/examples/animation/sub-attaq/torpedo.h @@ -53,14 +53,13 @@ class PixmapItem; class Torpedo : public QGraphicsWidget { Q_OBJECT -Q_PROPERTY(QPointF pos READ pos WRITE setPos) public: Torpedo(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0); void launch(); void setCurrentSpeed(int speed); void destroy(); -Q_SIGNALS: +signals: void torpedoExplosed(); void torpedoExecutionFinished(); diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro index deed112..4f5aaad 100644 --- a/examples/itemviews/puzzle/puzzle.pro +++ b/examples/itemviews/puzzle/puzzle.pro @@ -12,3 +12,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle INSTALLS += target sources + +wince* { + DEPLOYMENT_PLUGIN += qjpeg qgif qtiff +} + diff --git a/examples/network/googlesuggest/googlesuggest.pro b/examples/network/googlesuggest/googlesuggest.pro index afd600f..33b79de 100644 --- a/examples/network/googlesuggest/googlesuggest.pro +++ b/examples/network/googlesuggest/googlesuggest.pro @@ -3,7 +3,7 @@ SOURCES = main.cpp searchbox.cpp googlesuggest.cpp HEADERS = searchbox.h googlesuggest.h # install -target.path = $$[QT_INSTALL_EXAMPLES]/webkit/googlesuggest +target.path = $$[QT_INSTALL_EXAMPLES]/network/googlesuggest sources.files = $$SOURCES $$HEADERS *.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/googlesuggest +sources.path = $$[QT_INSTALL_EXAMPLES]/network/googlesuggest INSTALLS += target sources diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro index fbf864a..0a25efb 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.pro +++ b/examples/qtconcurrent/imagescaling/imagescaling.pro @@ -11,3 +11,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling INSTALLS += target sources + +wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro index 53008f0..5d73533 100644 --- a/examples/qtconcurrent/qtconcurrent.pro +++ b/examples/qtconcurrent/qtconcurrent.pro @@ -1,10 +1,13 @@ TEMPLATE = subdirs SUBDIRS = imagescaling \ map \ - progressdialog \ runfunction \ wordcount +!wince* { + SUBDIRS += progressdialog +} + # install target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtconcurrent.pro README diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro index 1881fce..c216a30 100644 --- a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro +++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro @@ -8,3 +8,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper INSTALLS += target sources + +wince*: DEPLOYMENT_PLUGIN += qsqlite + diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h index 2e1068c..ba0bede 100644 --- a/examples/webkit/fancybrowser/mainwindow.h +++ b/examples/webkit/fancybrowser/mainwindow.h @@ -41,8 +41,8 @@ #include <QtGui> -QT_BEGIN_NAMESPACE class QWebView; +QT_BEGIN_NAMESPACE class QLineEdit; QT_END_NAMESPACE diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro index 1c7cbae..6aa5780 100644 --- a/examples/widgets/movie/movie.pro +++ b/examples/widgets/movie/movie.pro @@ -7,3 +7,11 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie sources.files = $$SOURCES $$HEADERS $$RESOURCES movie.pro animation.mng sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie INSTALLS += target sources + +wince*: { + addFiles.sources += *.mng + addFiles.path = . + DEPLOYMENT += addFiles + DEPLOYMENT_PLUGIN += qmng +} + diff --git a/mkspecs/common/wince.conf b/mkspecs/common/wince.conf index d017cae..d6e4ba7 100644 --- a/mkspecs/common/wince.conf +++ b/mkspecs/common/wince.conf @@ -19,7 +19,8 @@ QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -GL -MD +QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_LTCG = -GL QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd QMAKE_CFLAGS_YACC = @@ -34,6 +35,7 @@ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_STL_ON = -EHsc QMAKE_CXXFLAGS_STL_OFF = @@ -55,8 +57,9 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB -QMAKE_LFLAGS_RELEASE = /LTCG /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO QMAKE_LFLAGS_DEBUG = /DEBUG +QMAKE_LFLAGS_LTCG = /LTCG QMAKE_LIBS_NETWORK = ws2.lib QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = diff --git a/projects.pro b/projects.pro index 2596c0a..3817792 100644 --- a/projects.pro +++ b/projects.pro @@ -61,6 +61,7 @@ unix { (cd config.tests/unix/mysql_r && $(MAKE) distclean); \ (cd config.tests/unix/nis && $(MAKE) distclean); \ (cd config.tests/unix/nix && $(MAKE) distclean); \ + (cd config.tests/unix/iodbc && $(MAKE) distclean); \ (cd config.tests/unix/odbc && $(MAKE) distclean); \ (cd config.tests/unix/oci && $(MAKE) distclean); \ (cd config.tests/unix/tds && $(MAKE) distclean); \ diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 87f55cf..c7f00dd 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -626,7 +626,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) // do this here so we can set DEST_TARGET to be the complete path to the final target if it is needed. QString orgDestDir = var("DESTDIR"); QString destDir = Option::fixPathToTargetOS(orgDestDir, false); - if (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep)) + if (!destDir.isEmpty() && (orgDestDir.endsWith('/') || orgDestDir.endsWith(Option::dir_sep))) destDir += Option::dir_sep; QString target = QString(project->first("TARGET")+project->first("TARGET_EXT")); target.remove("\""); diff --git a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp index 36c170a..e9659cf 100644 --- a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp +++ b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp @@ -624,7 +624,7 @@ LuceneLock* FSDirectory::makeLock(const QString& name) QString lockFile(getLockPrefix()); - lockFile.append(QLatin1String("-")).append(name); + lockFile.append(QLatin1Char('-')).append(name); return _CLNEW FSLock(lockDir, lockFile); } diff --git a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp index 069b487..cb2efe2 100644 --- a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp +++ b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp @@ -181,12 +181,9 @@ void Misc::segmentname(QString& buffer, int32_t bufferLen, CND_PRECONDITION(!segment.isEmpty(), "segment is NULL"); CND_PRECONDITION(!ext.isEmpty(), "extention is NULL"); - buffer.clear(); - if (x == -1) { - buffer = QString(segment + ext); - } else { - buffer = QString(QLatin1String("%1%2%3")).arg(segment).arg(ext).arg(x); - } + buffer = segment + ext; + if (x != -1) + buffer += QString::number(x); } // #pragma mark -- TCHAR related utils diff --git a/src/3rdparty/phonon/phonon/effectwidget.cpp b/src/3rdparty/phonon/phonon/effectwidget.cpp index da5a51a..d5c6c81 100644 --- a/src/3rdparty/phonon/phonon/effectwidget.cpp +++ b/src/3rdparty/phonon/phonon/effectwidget.cpp @@ -165,6 +165,7 @@ void EffectWidgetPrivate::autogenerateUi() if (minValue == -1. && maxValue == 1.) { //Special case values between -1 and 1.0 to use a slider for improved usability QSlider *slider = new QSlider(Qt::Horizontal, q); + control = slider; slider->setRange(-SLIDER_RANGE, +SLIDER_RANGE); slider->setValue(int(SLIDER_RANGE * value.toDouble())); slider->setTickPosition(QSlider::TicksBelow); @@ -188,10 +189,10 @@ void EffectWidgetPrivate::autogenerateUi() break; } + if (control) { #ifndef QT_NO_TOOLTIP control->setToolTip(para.description()); #endif - if (control) { #ifndef QT_NO_SHORTCUT label->setBuddy(control); #endif diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp index 4b94a94..26323e8 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp @@ -337,7 +337,7 @@ JSValuePtr QtField::valueFromInstance(ExecState* exec, const Instance* inst) con return ret; } else { - QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); + QString msg = QString::fromLatin1("cannot access member `%1' of deleted QObject").arg(QLatin1String(name())); return throwError(exec, GeneralError, msg.toLatin1().constData()); } } @@ -362,7 +362,7 @@ void QtField::setValueToInstance(ExecState* exec, const Instance* inst, JSValueP } else if (m_type == DynamicProperty) obj->setProperty(m_dynamicProperty.constData(), val); } else { - QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); + QString msg = QString::fromLatin1("cannot access member `%1' of deleted QObject").arg(QLatin1String(name())); throwError(exec, GeneralError, msg.toLatin1().constData()); } } diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index c7ba6c2..5a73dc7 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -1515,7 +1515,7 @@ JSValuePtr QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionOb bool ok = QMetaObject::connect(sender, signalIndex, conn, conn->metaObject()->methodOffset()); if (!ok) { delete conn; - QString msg = QString(QLatin1String("QtMetaMethod.connect: failed to connect to %1::%2()")) + QString msg = QString::fromLatin1("QtMetaMethod.connect: failed to connect to %1::%2()") .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); return throwError(exec, GeneralError, msg.toLatin1().constData()); @@ -1541,14 +1541,14 @@ JSValuePtr QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionOb } if (!ret) { - QString msg = QString(QLatin1String("QtMetaMethod.disconnect: failed to disconnect from %1::%2()")) + QString msg = QString::fromLatin1("QtMetaMethod.disconnect: failed to disconnect from %1::%2()") .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); return throwError(exec, GeneralError, msg.toLatin1().constData()); } } } else { - QString msg = QString(QLatin1String("QtMetaMethod.%1: %2::%3() is not a signal")) + QString msg = QString::fromLatin1("QtMetaMethod.%1: %2::%3() is not a signal") .arg(QLatin1String(d->m_isConnect ? "connect": "disconnect")) .arg(QLatin1String(sender->metaObject()->className())) .arg(QLatin1String(d->m_signature)); diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp index 2050a70..39ccefe 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp @@ -357,7 +357,7 @@ HashMap<String, String> parseAttributes(const String& string, bool& attrsOK) state.gotAttributes = false; QXmlStreamReader stream; - QString dummy = QString(QLatin1String("<?xml version=\"1.0\"?><attrs %1 />")).arg(string); + QString dummy = QString::fromLatin1("<?xml version=\"1.0\"?><attrs %1 />").arg(string); stream.addData(dummy); while (!stream.atEnd()) { stream.readNext(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp index e68be2b..bff9edb 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp @@ -286,10 +286,10 @@ String Path::debugString() const switch (cur.type) { case QPainterPath::MoveToElement: - ret += QString(QLatin1String("M %1 %2")).arg(cur.x).arg(cur.y); + ret += QString::fromLatin1("M %1 %2").arg(cur.x).arg(cur.y); break; case QPainterPath::LineToElement: - ret += QString(QLatin1String("L %1 %2")).arg(cur.x).arg(cur.y); + ret += QString::fromLatin1("L %1 %2").arg(cur.x).arg(cur.y); break; case QPainterPath::CurveToElement: { @@ -299,7 +299,7 @@ String Path::debugString() const Q_ASSERT(c1.type == QPainterPath::CurveToDataElement); Q_ASSERT(c2.type == QPainterPath::CurveToDataElement); - ret += QString(QLatin1String("C %1 %2 %3 %4 %5 %6")).arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y); + ret += QString::fromLatin1("C %1 %2 %3 %4 %5 %6").arg(cur.x).arg(cur.y).arg(c1.x).arg(c1.y).arg(c2.x).arg(c2.y); i += 2; break; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 5dc6363..e565476 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -268,7 +268,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object } /*! - Returns the frame's content, converted to HTML. + Returns the frame's content as HTML, enclosed in HTML and BODY tags. \sa setHtml(), toPlainText() */ @@ -280,7 +280,8 @@ QString QWebFrame::toHtml() const } /*! - Returns the content of this frame converted to plain text. + Returns the content of this frame converted to plain text, completely + stripped of all HTML formatting. \sa toHtml() */ diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 44c3e9e..e1ffb81 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -421,7 +421,7 @@ public: argv[p + 1] = varp + p + 1; } else { argv[p + 1] = const_cast<void*>(varp[p + 1].constData()); - if (ptype.endsWith("*")) { + if (ptype.endsWith('*')) { argv_pointer[p + 1] = argv[p + 1]; argv[p + 1] = argv_pointer + p + 1; } @@ -648,7 +648,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID) int index = mo->indexOfProperty(propname); const QMetaProperty prop = mo->property(index); propsignal += prop.typeName(); - propsignal += ")"; + propsignal += ')'; addProperty(dispID, propname, propsignal); return propname; @@ -1661,7 +1661,7 @@ private: void addProperty(const QByteArray &type, const QByteArray &name, uint flags) { QByteArray propertyType(type); - if (propertyType.endsWith("&")) + if (propertyType.endsWith('&')) propertyType.chop(1); Property &prop = property_list[name]; @@ -2046,11 +2046,11 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf case VT_INT: case VT_UINT: case VT_CY: - str += "&"; + str += '&'; break; case VT_PTR: if (str == "QFont" || str == "QPixmap") { - str += "&"; + str += '&'; break; } else if (str == "void*") { str = "void **"; @@ -2059,19 +2059,19 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf // FALLTHROUGH default: if (str == "QColor") - str += "&"; + str += '&'; else if (str == "QDateTime") - str += "&"; + str += '&'; else if (str == "QVariantList") - str += "&"; + str += '&'; else if (str == "QByteArray") - str += "&"; + str += '&'; else if (str == "QStringList") - str += "&"; + str += '&'; else if (!str.isEmpty() && hasEnum(str)) - str += "&"; + str += '&'; else if (!str.isEmpty() && str != "QFont" && str != "QPixmap" && str != "QVariant") - str += "*"; + str += '*'; } break; case VT_SAFEARRAY: @@ -2089,7 +2089,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf default: str = guessTypes(tdesc.lpadesc->tdescElem, info, function); if (!str.isEmpty()) - str = "QList<" + str + ">"; + str = "QList<" + str + '>'; break; } break; @@ -2097,7 +2097,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf str = guessTypes(tdesc.lpadesc->tdescElem, info, function); if (!str.isEmpty()) { for (int index = 0; index < tdesc.lpadesc->cDims; ++index) - str += "[" + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + "]"; + str += '[' + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + ']'; } break; case VT_USERDEFINED: @@ -2114,7 +2114,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf } if (tdesc.vt & VT_BYREF) - str += "&"; + str += '&'; str.replace("&*", "**"); return str; @@ -2141,7 +2141,7 @@ void MetaObjectGenerator::readClassInfo() if (d->useClassInfo && !hasClassInfo("CoClass")) { QString coClassIDstr = iidnames.value(QLatin1String("/CLSID/") + coClassID + QLatin1String("/Default"), coClassID).toString(); addClassInfo("CoClass", coClassIDstr.isEmpty() ? coClassID.toLatin1() : coClassIDstr.toLatin1()); - QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + "." + QByteArray::number(typeattr->wMinorVerNum); + QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + '.' + QByteArray::number(typeattr->wMinorVerNum); if (version != "0.0") addClassInfo("Version", version); } @@ -2174,7 +2174,7 @@ void MetaObjectGenerator::readClassInfo() while (tlfile.isEmpty() && vit != versions.end()) { QString version = *vit; ++vit; - tlfile = controls.value(QLatin1String("/") + version + QLatin1String("/0/win32/.")).toString(); + tlfile = controls.value(QLatin1Char('/') + version + QLatin1String("/0/win32/.")).toString(); } controls.endGroup(); } else { @@ -2347,7 +2347,7 @@ void MetaObjectGenerator::addChangedSignal(const QByteArray &function, const QBy // generate changed signal QByteArray signalName(function); signalName += "Changed"; - QByteArray signalProto = signalName + "(" + replaceType(type) + ")"; + QByteArray signalProto = signalName + '(' + replaceType(type) + ')'; if (!hasSignal(signalProto)) addSignal(signalProto, function); if (eventSink) @@ -2364,7 +2364,7 @@ void MetaObjectGenerator::addSetterSlot(const QByteArray &property) set = "set"; prototype[0] = toupper(prototype[0]); } - prototype = set + prototype + "(" + propertyType(property) + ")"; + prototype = set + prototype + '(' + propertyType(property) + ')'; if (!hasSlot(prototype)) addSlot(0, prototype, property); } @@ -2381,7 +2381,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t type = guessTypes(funcdesc->lprgelemdescParam->tdesc, typeinfo, function); } - prototype = function + "("; + prototype = function + '('; if (funcdesc->invkind == INVOKE_FUNC && type == hresult) type = 0; @@ -2395,7 +2395,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t QByteArray ptype = guessTypes(tdesc, typeinfo, function); if (pdesc.wParamFlags & PARAMFLAG_FRETVAL) { - if (ptype.endsWith("&")) { + if (ptype.endsWith('&')) { ptype.truncate(ptype.length() - 1); } else if (ptype.endsWith("**")) { ptype.truncate(ptype.length() - 1); @@ -2403,8 +2403,8 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t type = ptype; } else { prototype += ptype; - if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith("&") && !ptype.endsWith("**")) - prototype += "&"; + if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith('&') && !ptype.endsWith("**")) + prototype += '&'; if (optional || pdesc.wParamFlags & PARAMFLAG_FOPT) paramName += "=0"; else if (pdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) { @@ -2414,22 +2414,22 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t parameters << paramName; } if (p < funcdesc->cParams && !(pdesc.wParamFlags & PARAMFLAG_FRETVAL)) - prototype += ","; + prototype += ','; } if (!prototype.isEmpty()) { - if (prototype.right(1) == ",") { + if (prototype.endsWith(',')) { if (funcdesc->invkind == INVOKE_PROPERTYPUT && p == funcdesc->cParams) { TYPEDESC tdesc = funcdesc->lprgelemdescParam[p-1].tdesc; QByteArray ptype = guessTypes(tdesc, typeinfo, function); prototype += ptype; - prototype += ")"; + prototype += ')'; parameters << "rhs"; } else { prototype[prototype.length()-1] = ')'; } } else { - prototype += ")"; + prototype += ')'; } } @@ -2577,11 +2577,11 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) if (defargs) { parameters.takeLast(); - int lastParam = prototype.lastIndexOf(","); + int lastParam = prototype.lastIndexOf(','); if (lastParam == -1) - lastParam = prototype.indexOf("(") + 1; + lastParam = prototype.indexOf('(') + 1; prototype.truncate(lastParam); - prototype += ")"; + prototype += ')'; } } while (defargs); } @@ -2597,8 +2597,8 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif typeinfo->ReleaseFuncDesc(funcdesc); } @@ -2680,8 +2680,8 @@ void MetaObjectGenerator::readVarsInfo(ITypeInfo *typeinfo, ushort nVars) QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif typeinfo->ReleaseVarDesc(vardesc); } @@ -2827,8 +2827,8 @@ void MetaObjectGenerator::readEventInterface(ITypeInfo *eventinfo, IConnectionPo QString strDocu = QString::fromUtf16((const ushort*)bstrDocu); SysFreeString(bstrDocu); if (!!strDocu) - desc += "[" + strDocu + "]"; - desc += "\n"; + desc += '[' + strDocu + ']'; + desc += '\n'; #endif eventinfo->ReleaseFuncDesc(funcdesc); } @@ -4398,8 +4398,8 @@ QVariant QAxBase::asVariant() const cn = cn.mid(cn.lastIndexOf(':') + 1); QObject *object = qObject(); if (QMetaType::type(cn)) - qvar = QVariant(qRegisterMetaType<QObject*>(cn + "*"), &object); -// qVariantSetValue(qvar, qObject(), cn + "*"); + qvar = QVariant(qRegisterMetaType<QObject*>(cn + '*'), &object); +// qVariantSetValue(qvar, qObject(), cn + '*'); } return qvar; diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp index 62ef0a4..c3218a9 100644 --- a/src/activeqt/container/qaxdump.cpp +++ b/src/activeqt/container/qaxdump.cpp @@ -94,14 +94,14 @@ static QByteArray namedPrototype(const QList<QByteArray> ¶meterTypes, const prototype += type; if (p < parameterNames.count()) - prototype += " " + parameterNames.at(p); + prototype += ' ' + parameterNames.at(p); if (numDefArgs >= parameterTypes.count() - p) prototype += " = 0"; if (p < parameterTypes.count() - 1) prototype += ", "; } - prototype += ")"; + prototype += ')'; return prototype; } @@ -196,8 +196,8 @@ QString qax_generateDocumentation(QAxBase *that) prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames()); QString detail = QString::fromLatin1("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + - QString::fromLatin1(returntype.constData()) + QLatin1String(" ") + - QString::fromLatin1(name.constData()) + QLatin1String(" ") + + QLatin1String(returntype.constData()) + QLatin1Char(' ') + + QLatin1String(name.constData()) + QLatin1Char(' ') + QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [slot]</tt></h3>\n"); prototype = namedPrototype(slot.parameterTypes(), QList<QByteArray>()); detail += docuFromName(typeInfo, QString::fromLatin1(name.constData())); @@ -220,14 +220,14 @@ QString qax_generateDocumentation(QAxBase *that) returntype = "QAxObject *"; } if (returntype != "void") - detail += QString::fromLatin1(returntype.constData()) + QLatin1String(" result = "); - detail += QLatin1String("object->") + QString::fromLatin1(functionToCall.constData()) + - QLatin1String("(\"" + name + prototype + "\""); + detail += QLatin1String(returntype.constData()) + QLatin1String(" result = "); + detail += QLatin1String("object->") + QLatin1String(functionToCall.constData()) + + QLatin1String("(\"" + name + prototype + '\"'); if (hasParams) detail += QLatin1String(", params"); - detail += QLatin1String(")"); + detail += QLatin1Char(')'); if (returntype != "void" && returntype != "QAxObject *" && returntype != "QVariant") - detail += QLatin1String(".") + QString::fromLatin1(toType(returntype)); + detail += QLatin1Char('.') + QLatin1String(toType(returntype)); detail += QLatin1String(";</pre>\n"); } else { detail += QLatin1String("<p>This function has parameters of unsupported types and cannot be called directly."); @@ -262,9 +262,9 @@ QString qax_generateDocumentation(QAxBase *that) QByteArray name = signature.left(signature.indexOf('(')); stream << "<li>void <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl; - QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>void ") + - QString::fromLatin1(name.constData()) + QLatin1String(" ") + - QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n"); + QString detail = QLatin1String("<h3><a name=") + QLatin1String(name.constData()) + QLatin1String("></a>void ") + + QLatin1String(name.constData()) + QLatin1Char(' ') + + QLatin1String(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n"); if (typeLib) { interCount = 0; do { @@ -311,8 +311,8 @@ QString qax_generateDocumentation(QAxBase *that) stream << "<li>" << type << " <a href=\"#" << name << "\"><b>" << name << "</b></a>;</li>" << endl; QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") + - QString::fromLatin1(type.constData()) + - QLatin1String(" ") + QString::fromLatin1(name.constData()) + QLatin1String("</h3>\n"); + QLatin1String(type.constData()) + + QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("</h3>\n"); detail += docuFromName(typeInfo, QString::fromLatin1(name)); QVariant::Type vartype = QVariant::nameToType(type); if (!prop.isReadable()) @@ -326,14 +326,14 @@ QString qax_generateDocumentation(QAxBase *that) if (prop.isEnumType()) detail += QLatin1String("\tint val = "); else - detail += QLatin1String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" val = "); - detail += QLatin1String("object->property(\"") + QString::fromLatin1(name.constData()) + - QLatin1String("\").") + QString::fromLatin1(toType(type).constData()) + QLatin1String(";\n"); + detail += QLatin1Char('\t') + QLatin1String(type.constData()) + QLatin1String(" val = "); + detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) + + QLatin1String("\").") + QLatin1String(toType(type).constData()) + QLatin1String(";\n"); detail += QLatin1String("</pre>\n"); } else if (type == "IDispatch*" || type == "IUnknown*") { detail += QLatin1String("<p>Get the subobject using querySubObject:<pre>\n"); - detail += QLatin1String("\tQAxObject *") + QString::fromLatin1(name.constData()) + - QLatin1String(" = object->querySubObject(\"") + QString::fromLatin1(name.constData()) + QLatin1String("\");\n"); + detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) + + QLatin1String(" = object->querySubObject(\"") + QLatin1String(name.constData()) + QLatin1String("\");\n"); detail += QLatin1String("</pre>\n"); } else { detail += QLatin1String("<p>This property is of an unsupported type.\n"); diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index c69fea0..8f8186a 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -1203,9 +1203,9 @@ QString QAxScriptManager::scriptFileFilter() continue; allFiles += QLatin1String(" *") + engine.extension; - specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1String(")"); + specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')'); } - allFiles += QLatin1String(")"); + allFiles += QLatin1Char(')'); return allFiles + specialFiles + QLatin1String(";;All Files (*.*)"); } diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index d919382..1771293 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -90,7 +90,7 @@ QAxFactory *qAxFactory() QStringList keys(qax_factory->featureList()); for (int i = 0; i < keys.count(); ++i) { QString key(keys.at(i)); - qRegisterMetaType((key + QLatin1String("*")).toLatin1(), (void**)0); + qRegisterMetaType((key + QLatin1Char('*')).toLatin1(), (void**)0); } } return qax_factory; @@ -208,9 +208,9 @@ HRESULT UpdateRegistry(BOOL bRegister) { qAxIsServer = false; QString file = QString::fromLocal8Bit(qAxModuleFilename); - QString path = file.left(file.lastIndexOf(QLatin1String("\\"))+1); + QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1); QString module = file.right(file.length() - path.length()); - module = module.left(module.lastIndexOf(QLatin1String("."))); + module = module.left(module.lastIndexOf(QLatin1Char('.'))); const QString appId = qAxFactory()->appID().toString().toUpper(); const QString libId = qAxFactory()->typeLibID().toString().toUpper(); @@ -226,7 +226,7 @@ HRESULT UpdateRegistry(BOOL bRegister) DWORD major = libAttr->wMajorVerNum; DWORD minor = libAttr->wMinorVerNum; - typeLibVersion = QString::number((uint)major) + QLatin1String(".") + QString::number((uint)minor); + typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor); if (bRegister) RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0); @@ -271,12 +271,12 @@ HRESULT UpdateRegistry(BOOL bRegister) className = qax_clean_type(className, mo); if (object) { // don't register subobject classes - QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString(); + QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString(); if (classVersion.isNull()) classVersion = QLatin1String("1.0"); bool insertable = mo && !qstricmp(mo->classInfo(mo->indexOfClassInfo("Insertable")).value(), "yes"); bool control = object->isWidgetType(); - const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String("."))); + const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.'))); uint olemisc = OLEMISC_SETCLIENTSITEFIRST |OLEMISC_ACTIVATEWHENVISIBLE |OLEMISC_INSIDEOUT @@ -287,17 +287,17 @@ HRESULT UpdateRegistry(BOOL bRegister) else if (qFindChild<QMenuBar*>(object) && !qax_disable_inplaceframe) olemisc |= OLEMISC_WANTSTOMENUMERGE; - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class")); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."), classId); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class")); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."), classId); if (insertable) - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String(""))); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String(""))); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."), className + QLatin1String(" Class")); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."), classId); - settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."), module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."), className + QLatin1String(" Class")); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."), classId); + settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/."), className + QLatin1String(" Class")); - if (file.right(3).toLower() == QLatin1String("exe")) + if (file.endsWith(QLatin1String("exe"), Qt::CaseInsensitive)) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"), appId); if (control) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."), QVariant(QLatin1String(""))); @@ -307,15 +307,15 @@ HRESULT UpdateRegistry(BOOL bRegister) settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."), file); else settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."), - QLatin1String("\"") + file + QLatin1String("\" -activex")); + QLatin1Char('\"') + file + QLatin1String("\" -activex")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."), QString::number(olemisc)); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."), QVariant(QLatin1String(""))); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1String("\"") + + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') + file + QLatin1String("\", 101")); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."), libId); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."), classVersion); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1String(".") + className); - settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1String(".") + className + QLatin1String(".") + classVersion.left(classVersion.indexOf(QLatin1Char('.')))); + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1Char('.') + className); + settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classVersion.left(classVersion.indexOf(QLatin1Char('.')))); QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value()); if (!mime.isEmpty()) { @@ -330,15 +330,15 @@ HRESULT UpdateRegistry(BOOL bRegister) mime = mime.left(mime.length() - extension.length() - 1); // Prepend '.' before extension, if required. extension = extension.trimmed(); - if (extension[0] != QChar(QLatin1Char('.'))) - extension = QLatin1String(".") + extension; + if (extension[0] != QLatin1Char('.')) + extension = QLatin1Char('.') + extension; } if (!extension.isEmpty()) { - settings.setValue(QLatin1String("/") + extension + QLatin1String("/."), module + QLatin1String(".") + className); - settings.setValue(QLatin1String("/") + extension + QLatin1String("/Content Type"), mime); + settings.setValue(QLatin1Char('/') + extension + QLatin1String("/."), module + QLatin1Char('.') + className); + settings.setValue(QLatin1Char('/') + extension + QLatin1String("/Content Type"), mime); - mime = mime.replace(QLatin1String("/"), QLatin1String("\\")); + mime = mime.replace(QLatin1Char('/'), QLatin1Char('\\')); settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"), classId); settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"), extension); } @@ -358,22 +358,22 @@ HRESULT UpdateRegistry(BOOL bRegister) const QString classId = qAxFactory()->classID(className).toString().toUpper(); className = qax_clean_type(className, mo); - QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString(); + QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString(); if (classVersion.isNull()) classVersion = QLatin1String("1.0"); - const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String("."))); + const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.'))); qAxFactory()->unregisterClass(*key, &settings); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/.")); - settings.remove(QLatin1String("/") + module + QLatin1String(".") + className); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className); settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID")); settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/.")); @@ -404,14 +404,14 @@ HRESULT UpdateRegistry(BOOL bRegister) mime = mime.left(mime.length() - extension.length() - 1); // Prepend '.' before extension, if required. extension = extension.trimmed(); - if (extension[0] != QChar(QLatin1Char('.'))) - extension = QLatin1String(".") + extension; + if (extension[0] != QLatin1Char('.')) + extension.prepend(QLatin1Char('.')); } if (!extension.isEmpty()) { - settings.remove(QLatin1String("/") + extension + QLatin1String("/Content Type")); - settings.remove(QLatin1String("/") + extension + QLatin1String("/.")); - settings.remove(QLatin1String("/") + extension); - mime = mime.replace(QLatin1String("/"), QLatin1String("\\")); + settings.remove(QLatin1Char('/') + extension + QLatin1String("/Content Type")); + settings.remove(QLatin1Char('/') + extension + QLatin1String("/.")); + settings.remove(QLatin1Char('/') + extension); + mime.replace(QLatin1Char('/'), QLatin1Char('\\')); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension")); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID")); settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/.")); @@ -455,8 +455,8 @@ static const char* const type_map[][2] = { "QFont", "IFontDisp*" }, { "QPixmap", "IPictureDisp*" }, { "QVariant", "VARIANT" }, - { "QVariantList", "SAFEARRAY(VARIANT)" }, - { "QList<QVariant>","SAFEARRAY(VARIANT)" }, + { "QVariantList", "SAFEARRAY(VARIANT)" }, + { "QList<QVariant>", "SAFEARRAY(VARIANT)" }, { "quint64", "CY" }, { "qint64", "CY" }, { "qulonglong", "CY" }, @@ -464,8 +464,8 @@ static const char* const type_map[][2] = { "QByteArray", "SAFEARRAY(BYTE)" }, { "QStringList", "SAFEARRAY(BSTR)" }, // Userdefined Qt datatypes - some not on Borland though - { "QCursor", "enum MousePointer" }, - { "Qt::FocusPolicy","enum FocusPolicy" }, + { "QCursor", "enum MousePointer" }, + { "Qt::FocusPolicy", "enum FocusPolicy" }, #ifndef Q_CC_BOR # if __REQUIRED_RPCNDR_H_VERSION__ >= Q_REQUIRED_RPCNDR_H_VERSION { "QRect", "struct QRect" }, @@ -578,7 +578,7 @@ static QByteArray renameOverloads(const QByteArray &name) int n = mapping.value(name); if (mapping.contains(name)) { int n = mapping.value(name); - newName = name + "_" + QByteArray::number(n); + newName = name + '_' + QByteArray::number(n); mapping.insert(name, n+1); } else { mapping.insert(name, 1); @@ -686,13 +686,13 @@ static QByteArray prototype(const QList<QByteArray> ¶meterTypes, const QList QByteArray type(parameterTypes.at(p)); QByteArray name(parameterNames.at(p)); - if (type.endsWith("&")) { + if (type.endsWith('&')) { out = true; type.truncate(type.length() - 1); } else if (type.endsWith("**")) { out = true; type.truncate(type.length() - 1); - } else if (type.endsWith("*") && !subtypes.contains(type)) { + } else if (type.endsWith('*') && !subtypes.contains(type)) { type.truncate(type.length() - 1); } if (type.isEmpty()) { @@ -701,14 +701,14 @@ static QByteArray prototype(const QList<QByteArray> ¶meterTypes, const QList } type = convertTypes(type, ok); if (!out) - prototype += "[in] " + type + " "; + prototype += "[in] " + type + ' '; else - prototype += "[in,out] " + type + " "; + prototype += "[in,out] " + type + ' '; if (out) - prototype += "*"; + prototype += '*'; if (name.isEmpty()) - prototype += "p" + QByteArray::number(p); + prototype += 'p' + QByteArray::number(p); else prototype += "p_" + replaceKeyword(name); @@ -728,12 +728,12 @@ static QByteArray addDefaultArguments(const QByteArray &prototype, int numDefArg QByteArray ptype(prototype); int in = -1; while (numDefArgs) { - in = ptype.lastIndexOf("]", in); + in = ptype.lastIndexOf(']', in); ptype.replace(in, 1, ",optional]"); in = ptype.indexOf(' ', in) + 1; QByteArray type = ptype.mid(in, ptype.indexOf(' ', in) - in); if (type == "enum") - type += " " + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5); + type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5); ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/"); --numDefArgs; } @@ -801,7 +801,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN for (int j = 0; j < enumerator.keyCount(); ++j) { QByteArray key(enumerator.key(j)); while (enumValues.contains(key)) { - key += "_"; + key += '_'; } enumValues.append(key); uint value = (uint)enumerator.value(j); @@ -822,32 +822,32 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!enums.contains("MousePointer")) { enums.append("MousePointer"); out << "\tenum MousePointer {" << endl; - out << "\t\tArrowCursor = " << Qt::ArrowCursor << "," << endl; - out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << "," << endl; - out << "\t\tCrossCursor = " << Qt::CrossCursor << "," << endl; - out << "\t\tWaitCursor = " << Qt::WaitCursor << "," << endl; - out << "\t\tIBeamCursor = " << Qt::IBeamCursor << "," << endl; - out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << "," << endl; - out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << "," << endl; - out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << "," << endl; - out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << "," << endl; - out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << "," << endl; - out << "\t\tBlankCursor = " << Qt::BlankCursor << "," << endl; - out << "\t\tSplitVCursor = " << Qt::SplitVCursor << "," << endl; - out << "\t\tSplitHCursor = " << Qt::SplitHCursor << "," << endl; - out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << "," << endl; - out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << "," << endl; - out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << "," << endl; + out << "\t\tArrowCursor = " << Qt::ArrowCursor << ',' << endl; + out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << ',' << endl; + out << "\t\tCrossCursor = " << Qt::CrossCursor << ',' << endl; + out << "\t\tWaitCursor = " << Qt::WaitCursor << ',' << endl; + out << "\t\tIBeamCursor = " << Qt::IBeamCursor << ',' << endl; + out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << ',' << endl; + out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << ',' << endl; + out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << ',' << endl; + out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << ',' << endl; + out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << ',' << endl; + out << "\t\tBlankCursor = " << Qt::BlankCursor << ',' << endl; + out << "\t\tSplitVCursor = " << Qt::SplitVCursor << ',' << endl; + out << "\t\tSplitHCursor = " << Qt::SplitHCursor << ',' << endl; + out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << ',' << endl; + out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << ',' << endl; + out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << ',' << endl; out << "\t\tBusyCursor\t= " << Qt::BusyCursor << endl; out << "\t};" << endl << endl; } if (!enums.contains("FocusPolicy")) { enums.append("FocusPolicy"); out << "\tenum FocusPolicy {" << endl; - out << "\t\tNoFocus = " << Qt::NoFocus << "," << endl; - out << "\t\tTabFocus = " << Qt::TabFocus << "," << endl; - out << "\t\tClickFocus = " << Qt::ClickFocus << "," << endl; - out << "\t\tStrongFocus = " << Qt::StrongFocus << "," << endl; + out << "\t\tNoFocus = " << Qt::NoFocus << ',' << endl; + out << "\t\tTabFocus = " << Qt::TabFocus << ',' << endl; + out << "\t\tClickFocus = " << Qt::ClickFocus << ',' << endl; + out << "\t\tStrongFocus = " << Qt::StrongFocus << ',' << endl; out << "\t\tWheelFocus = " << Qt::WheelFocus << endl; out << "\t};" << endl << endl; } @@ -877,7 +877,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) out << "\t/****** Property is of unsupported datatype" << endl; - out << "\t\t[id(" << id << ")"; + out << "\t\t[id(" << id << ')'; if (!property.isWritable()) out << ", readonly"; if (isBindable && property.isScriptable(o)) @@ -886,9 +886,9 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN out << ", nonbrowsable"; if (isBindable) out << ", requestedit"; - if (defProp == QString::fromLatin1(name.constData())) + if (defProp == QLatin1String(name)) out << ", uidefault"; - out << "] " << type << " " << name << ";" << endl; + out << "] " << type << ' ' << name << ';' << endl; if (!ok) out << "\t******/" << endl; @@ -939,7 +939,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) outBuffer += "\t/****** Slot parameter uses unsupported datatype\n"; - outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + " " + name + "(" + ptype + ");\n"; + outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + ' ' + name + '(' + ptype + ");\n"; if (!ok) outBuffer += "\t******/\n"; @@ -991,7 +991,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN QList<QByteArray> parameterTypes(signal.parameterTypes()); QList<QByteArray> parameterNames(signal.parameterNames()); - bool isDefault = defSignal == QString::fromLatin1(name.constData()); + bool isDefault = defSignal == QLatin1String(name); name = renameOverloads(replaceKeyword(name)); bool ok = true; @@ -1003,10 +1003,10 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN if (!ok) out << "\t/****** Signal parameter uses unsupported datatype" << endl; - out << "\t\t[id(" << id << ")"; + out << "\t\t[id(" << id << ')'; if (isDefault) out << ", uidefault"; - out << "] void " << name << "(" << ptype << ");" << endl; + out << "] void " << name << '(' << ptype << ");" << endl; if (!ok) out << "\t******/" << endl; @@ -1031,7 +1031,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN const char *classVersion = mo->classInfo(mo->indexOfClassInfo("Version")).value(); if (classVersion) out << "\t\tversion(" << classVersion << ")," << endl; - out << "\t\tuuid(" << classID << ")"; + out << "\t\tuuid(" << classID << ')'; if (control) { out << ", " << endl; out << "\t\tcontrol"; @@ -1043,7 +1043,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN out << "\t]" << endl; out << "\tcoclass " << cleanClassName << endl; out << "\t{" << endl; - out << "\t\t[default] dispinterface I" << cleanClassName << ";" << endl; + out << "\t\t[default] dispinterface I" << cleanClassName << ';' << endl; if (hasEvents) out << "\t\t[default, source] dispinterface I" << cleanClassName << "Events;" << endl; out << "\t};" << endl; @@ -1068,7 +1068,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) file.remove(); QString filebase = QString::fromLocal8Bit(qAxModuleFilename); - filebase = filebase.left(filebase.lastIndexOf(QLatin1String("."))); + filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.'))); QString appID = qAxFactory()->appID().toString().toUpper(); if (QUuid(appID).isNull()) @@ -1103,7 +1103,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) out << "/****************************************************************************" << endl; out << "** Interface definition generated for ActiveQt project" << endl; out << "**" << endl; - out << "** '" << qAxModuleFilename << "'" << endl; + out << "** '" << qAxModuleFilename << '\'' << endl; out << "**" << endl; out << "** Created: " << QDateTime::currentDateTime().toString() << endl; out << "**" << endl; @@ -1121,13 +1121,13 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) delete_qApp = true; } - out << "[" << endl; + out << '[' << endl; out << "\tuuid(" << typeLibID << ")," << endl; out << "\tversion(" << version << ")," << endl; - out << "\thelpstring(\"" << typelib << " " << version << " Type Library\")" << endl; - out << "]" << endl; + out << "\thelpstring(\"" << typelib << ' ' << version << " Type Library\")" << endl; + out << ']' << endl; out << "library " << typelib << "Lib" << endl; - out << "{" << endl; + out << '{' << endl; out << "\timportlib(\"stdole32.tlb\");" << endl; out << "\timportlib(\"stdole2.tlb\");" << endl << endl; @@ -1188,11 +1188,12 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) // We have meta object information for this type. Forward declare it. if (mo) { QByteArray cleanType = qax_clean_type(*key, mo).toLatin1(); - out << "\tcoclass " << cleanType << ";" << endl; + out << "\tcoclass " << cleanType << ';' << endl; + subtypes.append(cleanType); + qRegisterMetaType(cleanType, (void**)0); + cleanType += '*'; subtypes.append(cleanType); - subtypes.append(cleanType + "*"); qRegisterMetaType(cleanType, (void**)0); - qRegisterMetaType(cleanType + "*", (void**)0); } } out << endl; @@ -1225,7 +1226,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver) QByteArray cleanType = qax_clean_type(*key, mo).toLatin1(); subtypes.append(cleanType); - subtypes.append(cleanType + "*"); + subtypes.append(cleanType + '*'); res = classIDL(o, mo, QString::fromLatin1(className.constData()), isBindable, out); delete o; if (res != S_OK) diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index f3e1dff..19c2404 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -2446,10 +2446,10 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, int nameLength = 0; if (index == -1) { nameLength = name.length(); - name += "("; + name += '('; // no parameter - shortcut if (!pDispParams->cArgs) - index = mo->indexOfSlot((name + ")")); + index = mo->indexOfSlot((name + ')')); // search if (index == -1) { for (int i = 0; i < mo->methodCount(); ++i) { @@ -2463,7 +2463,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, if (index == -1) { QRegExp regexp(QLatin1String("_([0-9])\\(")); if (regexp.lastIndexIn(QString::fromLatin1(name.constData())) != -1) { - name = name.left(name.length() - regexp.cap(0).length()) + "("; + name = name.left(name.length() - regexp.cap(0).length()) + '('; int overload = regexp.cap(1).toInt() + 1; for (int s = 0; s < qt.object->metaObject()->methodCount(); ++s) { @@ -2559,7 +2559,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, argv[p + 1] = varp + p + 1; } else { argv[p + 1] = const_cast<void*>(varp[p + 1].constData()); - if (ptype.endsWith("*")) { + if (ptype.endsWith('*')) { argv_pointer[p + 1] = argv[p + 1]; argv[p + 1] = argv_pointer + p + 1; } @@ -2590,7 +2590,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, } else { argv[0] = const_cast<void*>(varp[0].constData()); } - if (type.endsWith("*")) { + if (type.endsWith('*')) { argv_pointer[0] = argv[0]; argv[0] = argv_pointer; } diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp index a50fef0..e3e1e5d 100644 --- a/src/activeqt/control/qaxservermain.cpp +++ b/src/activeqt/control/qaxservermain.cpp @@ -253,7 +253,7 @@ EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, run = false; break; } else { - unprocessed += cmds.at(i) + " "; + unprocessed += cmds.at(i) + ' '; } } diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index ace81e7..12307f3 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -1111,7 +1111,7 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint if (iface) { QObject *qObj = iface->qObject(); iface->Release(); - var = QVariant(qRegisterMetaType<QObject*>(qObj ? QByteArray(qObj->metaObject()->className()) + "*" : typeName), &qObj); + var = QVariant(qRegisterMetaType<QObject*>(qObj ? QByteArray(qObj->metaObject()->className()) + '*' : typeName), &qObj); } else #endif { diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 9a17049..47361a5 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -110,17 +110,16 @@ void QPropertyAnimationPrivate::updateMetaProperty() if (!target || propertyName.isEmpty()) return; - if (hasMetaProperty == 0 && !property.isValid()) { + if (!hasMetaProperty && !property.isValid()) { const QMetaObject *mo = target->metaObject(); propertyIndex = mo->indexOfProperty(propertyName); if (propertyIndex != -1) { - hasMetaProperty = 1; + hasMetaProperty = true; property = mo->property(propertyIndex); propertyType = property.userType(); } else { if (!target->dynamicPropertyNames().contains(propertyName)) qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); - hasMetaProperty = 2; } } @@ -133,7 +132,7 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) if (!target || state == QAbstractAnimation::Stopped) return; - if (hasMetaProperty == 1) { + if (hasMetaProperty) { if (newValue.userType() == propertyType) { //no conversion is needed, we directly call the QObject::qt_metacall void *data = const_cast<void*>(newValue.constData()); @@ -216,7 +215,7 @@ void QPropertyAnimation::setTargetObject(QObject *target) connect(target, SIGNAL(destroyed()), SLOT(_q_targetDestroyed())); d->target = target; - d->hasMetaProperty = 0; + d->hasMetaProperty = false; d->updateMetaProperty(); } @@ -242,7 +241,7 @@ void QPropertyAnimation::setPropertyName(const QByteArray &propertyName) } d->propertyName = propertyName; - d->hasMetaProperty = 0; + d->hasMetaProperty = false; d->updateMetaProperty(); } diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h index b51d039..a4387dd 100644 --- a/src/corelib/animation/qpropertyanimation_p.h +++ b/src/corelib/animation/qpropertyanimation_p.h @@ -78,7 +78,7 @@ public: int propertyType; int propertyIndex; - int hasMetaProperty; + bool hasMetaProperty; QByteArray propertyName; void updateProperty(const QVariant &); void updateMetaProperty(); diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 4542a86..e973ec5 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -144,6 +144,11 @@ static bool animationValueLessThan(const QVariantAnimation::KeyValue &p1, const return p1.first < p2.first; } +static QVariant defaultInterpolator(const void *, const void *, qreal) +{ + return QVariant(); +} + template<> Q_INLINE_TEMPLATE QRect _q_interpolate(const QRect &f, const QRect &t, qreal progress) { QRect ret; @@ -174,15 +179,39 @@ template<> Q_INLINE_TEMPLATE QLineF _q_interpolate(const QLineF &f, const QLineF return QLineF( _q_interpolate(f.p1(), t.p1(), progress), _q_interpolate(f.p2(), t.p2(), progress)); } +QVariantAnimationPrivate::QVariantAnimationPrivate() : duration(250), hasStartValue(false), + interpolator(&defaultInterpolator), + changedSignalMask(1 << QVariantAnimation::staticMetaObject.indexOfSignal("valueChanged(QVariant)")) +{ + //we keep the mask so that we emit valueChanged only when needed (for performance reasons) +} + void QVariantAnimationPrivate::convertValues(int t) { //this ensures that all the keyValues are of type t for (int i = 0; i < keyValues.count(); ++i) { QVariantAnimation::KeyValue &pair = keyValues[i]; - if (pair.second.userType() != t) - pair.second.convert(static_cast<QVariant::Type>(t)); + pair.second.convert(static_cast<QVariant::Type>(t)); } - interpolator = 0; // if the type changed we need to update the interpolator + //we also need update to the current interval if needed + currentInterval.start.second.convert(static_cast<QVariant::Type>(t)); + currentInterval.end.second.convert(static_cast<QVariant::Type>(t)); + + //... and the interpolator + updateInterpolator(); +} + +void QVariantAnimationPrivate::updateInterpolator() +{ + int type = currentInterval.start.second.userType(); + if (type == currentInterval.end.second.userType()) + interpolator = getInterpolator(type); + else + interpolator = 0; + + //we make sure that the interpolator is always set to something + if (!interpolator) + interpolator = &defaultInterpolator; } /*! @@ -220,6 +249,7 @@ void QVariantAnimationPrivate::recalculateCurrentInterval(bool force/*=false*/) // update all the values of the currentInterval currentInterval.start = *itStart; currentInterval.end = *itEnd; + updateInterpolator(); } } setCurrentValueForProgress(progress); @@ -291,7 +321,6 @@ void QVariantAnimationPrivate::setDefaultStartValue(const QVariant &value) */ QVariantAnimation::QVariantAnimation(QObject *parent) : QAbstractAnimation(*new QVariantAnimationPrivate, parent) { - d_func()->init(); } /*! @@ -299,7 +328,6 @@ QVariantAnimation::QVariantAnimation(QObject *parent) : QAbstractAnimation(*new */ QVariantAnimation::QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent) : QAbstractAnimation(dd, parent) { - d_func()->init(); } /*! @@ -625,15 +653,7 @@ void QVariantAnimation::updateState(QAbstractAnimation::State oldState, */ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &to, qreal progress) const { - Q_D(const QVariantAnimation); - if (d->interpolator == 0) { - if (from.userType() == to.userType()) - d->interpolator = QVariantAnimationPrivate::getInterpolator(from.userType()); - if (d->interpolator == 0) //no interpolator found - return QVariant(); - } - - return d->interpolator(from.constData(), to.constData(), progress); + return d_func()->interpolator(from.constData(), to.constData(), progress); } /*! @@ -641,9 +661,8 @@ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &t */ void QVariantAnimation::updateCurrentTime(int msecs) { - Q_D(QVariantAnimation); Q_UNUSED(msecs); - d->recalculateCurrentInterval(); + d_func()->recalculateCurrentInterval(); } QT_END_NAMESPACE diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h index 0d296db..aee2324 100644 --- a/src/corelib/animation/qvariantanimation_p.h +++ b/src/corelib/animation/qvariantanimation_p.h @@ -67,17 +67,7 @@ class QVariantAnimationPrivate : public QAbstractAnimationPrivate Q_DECLARE_PUBLIC(QVariantAnimation) public: - QVariantAnimationPrivate() : duration(250), hasStartValue(false) - { - } - - void init() - { - //we keep the mask so that we emit valueChanged only when needed (for performance reasons) - changedSignalMask = (1 << q_func()->metaObject()->indexOfSignal("valueChanged(QVariant)")); - currentInterval.start.first = currentInterval.end.first = 2; //will force the initial refresh - interpolator = 0; - } + QVariantAnimationPrivate(); static QVariantAnimationPrivate *get(QVariantAnimation *q) { @@ -100,9 +90,9 @@ public: QVariantAnimation::KeyValue start, end; } currentInterval; - mutable QVariantAnimation::Interpolator interpolator; + QVariantAnimation::Interpolator interpolator; - quint32 changedSignalMask; + const quint32 changedSignalMask; void setCurrentValueForProgress(const qreal progress); void recalculateCurrentInterval(bool force=false); @@ -110,7 +100,10 @@ public: QVariant valueAt(qreal step) const; void convertValues(int t); - static QVariantAnimation::Interpolator getInterpolator(int interpolationType); + void updateInterpolator(); + + //XXX this is needed by dui + static Q_CORE_EXPORT QVariantAnimation::Interpolator getInterpolator(int interpolationType); }; //this should make the interpolation faster diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 564e6a5..763935e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -125,7 +125,8 @@ QT_BEGIN_NAMESPACE If you want to use QFlags for your own enum types, use the Q_DECLARE_FLAGS() and Q_DECLARE_OPERATORS_FOR_FLAGS(). - For example: + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 1 @@ -442,14 +443,18 @@ QT_BEGIN_NAMESPACE function. You can retrieve the minimum and maximum of two given objects using qMin() and qMax() respectively. All these functions return a corresponding template type; the template types can be - replaced by any other type. For example: + replaced by any other type. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 3 <QtGlobal> also contains functions that generate messages from the given string argument: qCritical(), qDebug(), qFatal() and qWarning(). These functions call the message handler with the - given message. For example: + given message. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 4 @@ -694,7 +699,9 @@ QT_BEGIN_NAMESPACE \relates <QtGlobal> Wraps the signed 64-bit integer \a literal in a - platform-independent way. For example: + platform-independent way. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 8 @@ -705,7 +712,9 @@ QT_BEGIN_NAMESPACE \relates <QtGlobal> Wraps the unsigned 64-bit integer \a literal in a - platform-independent way. For example: + platform-independent way. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 9 @@ -734,7 +743,11 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qAbs(const T &value) \relates <QtGlobal> - Returns the absolute value of \a value. For example: + Compares \a value to the 0 of type T and returns the absolute + value. Thus if T is \e {double}, then \a value is compared to + \e{(double) 0}. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 10 */ @@ -742,7 +755,9 @@ QT_BEGIN_NAMESPACE /*! \fn int qRound(qreal value) \relates <QtGlobal> - Rounds \a value to the nearest integer. For example: + Rounds \a value to the nearest integer. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 11 */ @@ -750,7 +765,9 @@ QT_BEGIN_NAMESPACE /*! \fn qint64 qRound64(qreal value) \relates <QtGlobal> - Rounds \a value to the nearest 64-bit integer. For example: + Rounds \a value to the nearest 64-bit integer. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 12 */ @@ -758,7 +775,9 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qMin(const T &value1, const T &value2) \relates <QtGlobal> - Returns the minimum of \a value1 and \a value2. For example: + Returns the minimum of \a value1 and \a value2. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 13 @@ -768,7 +787,9 @@ QT_BEGIN_NAMESPACE /*! \fn const T &qMax(const T &value1, const T &value2) \relates <QtGlobal> - Returns the maximum of \a value1 and \a value2. For example: + Returns the maximum of \a value1 and \a value2. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 14 @@ -779,7 +800,9 @@ QT_BEGIN_NAMESPACE \relates <QtGlobal> Returns \a value bounded by \a min and \a max. This is equivalent - to qMax(\a min, qMin(\a value, \a max)). For example: + to qMax(\a min, qMin(\a value, \a max)). + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 15 @@ -925,7 +948,9 @@ QT_BEGIN_NAMESPACE 4.1.2, the QT_VERSION macro will expand to 0x040102. You can use QT_VERSION to use the latest Qt features where - available. For example: + available. + + Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 16 diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 29e356e..7f6ff20 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -434,14 +434,14 @@ QLibraryInfo::location(LibraryLocation loc) #else if (QCoreApplication::instance()) { #ifdef Q_OS_MAC - CFBundleRef bundleRef = CFBundleGetMainBundle(); - if (bundleRef) { - QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef); - if (urlRef) { - QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle); - return QDir::cleanPath(path + QLatin1String("/Contents")); - } - } + CFBundleRef bundleRef = CFBundleGetMainBundle(); + if (bundleRef) { + QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef); + if (urlRef) { + QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle); + return QDir::cleanPath(path + QLatin1String("/Contents/") + ret); + } + } #endif return QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(ret); } else { diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index a6db1a4..78e2b08 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1330,7 +1330,8 @@ public: DirectConnection, QueuedConnection, AutoCompatConnection, - BlockingQueuedConnection + BlockingQueuedConnection, + UniqueConnection = 0x80 }; enum ShortcutContext { diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index b203899..e324ffe 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -622,11 +622,16 @@ QDataStream &QDataStream::operator>>(qint16 &i) setStatus(ReadPastEnd); } } else { - register uchar *p = (uchar *)(&i); + union { + qint16 val1; + char val2[2]; + } x; + char *p = x.val2; char b[2]; if (dev->read(b, 2) == 2) { *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -660,13 +665,18 @@ QDataStream &QDataStream::operator>>(qint32 &i) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&i); + union { + qint32 val1; + char val2[4]; + } x; + char *p = x.val2; char b[4]; if (dev->read(b, 4) == 4) { *p++ = b[3]; *p++ = b[2]; *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -703,7 +713,12 @@ QDataStream &QDataStream::operator>>(qint64 &i) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&i); + union { + qint64 val1; + char val2[8]; + } x; + + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { *p++ = b[7]; @@ -714,6 +729,7 @@ QDataStream &QDataStream::operator>>(qint64 &i) *p++ = b[2]; *p++ = b[1]; *p = b[0]; + i = x.val1; } else { setStatus(ReadPastEnd); } @@ -751,13 +767,19 @@ QDataStream &QDataStream::operator>>(float &f) setStatus(ReadPastEnd); } } else { // swap bytes - uchar *p = (uchar *)(&f); + union { + float val1; + char val2[4]; + } x; + + char *p = x.val2; char b[4]; if (dev->read(b, 4) == 4) { *p++ = b[3]; *p++ = b[2]; *p++ = b[1]; *p = b[0]; + f = x.val1; } else { setStatus(ReadPastEnd); } @@ -788,7 +810,11 @@ QDataStream &QDataStream::operator>>(double &f) setStatus(ReadPastEnd); } } else { // swap bytes - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { *p++ = b[7]; @@ -799,13 +825,18 @@ QDataStream &QDataStream::operator>>(double &f) *p++ = b[2]; *p++ = b[1]; *p = b[0]; + f = x.val1; } else { setStatus(ReadPastEnd); } } #else //non-standard floating point format - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + char *p = x.val2; char b[8]; if (dev->read(b, 8) == 8) { if (noswap) { @@ -827,6 +858,7 @@ QDataStream &QDataStream::operator>>(double &f) *p++ = b[Q_DF(1)]; *p = b[Q_DF(0)]; } + f = x.val1; } else { setStatus(ReadPastEnd); } @@ -970,7 +1002,12 @@ QDataStream &QDataStream::operator<<(qint16 i) if (noswap) { dev->write((char *)&i, sizeof(qint16)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint16 val1; + char val2[2]; + } x; + x.val1 = i; + char *p = x.val2; char b[2]; b[1] = *p++; b[0] = *p; @@ -992,7 +1029,12 @@ QDataStream &QDataStream::operator<<(qint32 i) if (noswap) { dev->write((char *)&i, sizeof(qint32)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint32 val1; + char val2[4]; + } x; + x.val1 = i; + char *p = x.val2; char b[4]; b[3] = *p++; b[2] = *p++; @@ -1022,13 +1064,18 @@ QDataStream &QDataStream::operator<<(qint64 i) { CHECK_STREAM_PRECOND(*this) if (version() < 6) { - quint32 i1 = i & 0xffffffff; - quint32 i2 = i >> 32; - *this << i2 << i1; + quint32 i1 = i & 0xffffffff; + quint32 i2 = i >> 32; + *this << i2 << i1; } else if (noswap) { // no conversion needed dev->write((char *)&i, sizeof(qint64)); } else { // swap bytes - register uchar *p = (uchar *)(&i); + union { + qint64 val1; + char val2[8]; + } x; + x.val1 = i; + char *p = x.val2; char b[8]; b[7] = *p++; b[6] = *p++; @@ -1077,7 +1124,12 @@ QDataStream &QDataStream::operator<<(float f) if (noswap) { // no conversion needed dev->write((char *)&g, sizeof(float)); } else { // swap bytes - register uchar *p = (uchar *)(&g); + union { + float val1; + char val2[4]; + } x; + x.val1 = f; + char *p = x.val2; char b[4]; b[3] = *p++; b[2] = *p++; @@ -1103,7 +1155,12 @@ QDataStream &QDataStream::operator<<(double f) if (noswap) { dev->write((char *)&f, sizeof(double)); } else { - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + x.val1 = f; + char *p = x.val2; char b[8]; b[7] = *p++; b[6] = *p++; @@ -1116,7 +1173,12 @@ QDataStream &QDataStream::operator<<(double f) dev->write(b, 8); } #else - register uchar *p = (uchar *)(&f); + union { + double val1; + char val2[8]; + } x; + x.val1 = f; + char *p = x.val2; char b[8]; if (noswap) { b[Q_DF(0)] = *p++; diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index e073a08..65cfb71 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -118,7 +118,7 @@ public: void stop(); -private slots: +private Q_SLOTS: void timeout(); }; diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index e79d867..07f3c9c 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -948,7 +948,7 @@ bool QFSFileEngine::supportsExtension(Extension extension) const For Windows, -2 is always returned. */ -/*! \fn QString QFSFileEngine::owner() const +/*! \fn QString QFSFileEngine::owner(FileOwner own) const \reimp */ diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 8ea48d1..3c443ff 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -83,12 +83,12 @@ static QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString & } else if (flags & QIODevice::WriteOnly) { mode = "wb"; if (flags & QIODevice::ReadOnly) - mode += "+"; + mode += '+'; } if (flags & QIODevice::Append) { mode = "ab"; if (flags & QIODevice::ReadOnly) - mode += "+"; + mode += '+'; } return mode; } @@ -723,7 +723,7 @@ QString QFSFileEngine::fileName(FileName file) const bool isDir = ret.endsWith(QLatin1Char('/')); ret = QDir::cleanPath(ret); if (isDir) - ret += QLatin1String("/"); + ret += QLatin1Char('/'); if (file == AbsolutePathName) { int slash = ret.lastIndexOf(QLatin1Char('/')); if (slash == -1) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index aee9fde..9da9e66 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1298,7 +1298,7 @@ QFileInfoList QFSFileEngine::drives() } return ret; #else - ret.append(QLatin1Char('/')); + ret.append(QString::fromLatin1("/")); return ret; #endif } @@ -1770,10 +1770,10 @@ QString QFSFileEngine::fileName(FileName file) const if(slash == -1) { if(d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) return d->filePath.left(2); - return QString::fromLatin1("."); + return QString(QLatin1Char('.')); } else { if(!slash) - return QString::fromLatin1("/"); + return QString(QLatin1Char('/')); if(slash == 2 && d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) slash++; return d->filePath.left(slash); @@ -1831,7 +1831,7 @@ QString QFSFileEngine::fileName(FileName file) const if (slash == -1) ret = QDir::currentPath(); else if (slash == 0) - ret = QLatin1String("/"); + ret = QString(QLatin1Char('/')); ret = ret.left(slash); } return ret; @@ -1893,7 +1893,7 @@ QString QFSFileEngine::owner(FileOwner own) const #else Q_UNUSED(own); #endif - return QString(QLatin1String("")); + return QString(); } bool QFSFileEngine::setPermissions(uint perms) diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h index 2a7e40b..acfc6eb 100644 --- a/src/corelib/io/qnoncontiguousbytedevice_p.h +++ b/src/corelib/io/qnoncontiguousbytedevice_p.h @@ -77,7 +77,7 @@ protected: virtual ~QNonContiguousByteDevice(); bool resetDisabled; -signals: +Q_SIGNALS: void readyRead(); void readProgress(qint64 current, qint64 total); }; diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 14fc2d4..6152518 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -3468,7 +3468,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \typedef QSettings::SettingsMap Typedef for QMap<QString, QVariant>. - + \sa registerFormat() */ @@ -3479,6 +3479,11 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 27 + \c ReadFunc is used in \c registerFormat() as a pointer to a function + that reads a set of key/value pairs. \c ReadFunc should read all the + options in one pass, and return all the settings in the \c SettingsMap + container, which is initially empty. + \sa WriteFunc, registerFormat() */ @@ -3489,6 +3494,10 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 28 + \c WriteFunc is used in \c registerFormat() as a pointer to a function + that writes a set of key/value pairs. \c WriteFunc is only called once, + so you need to output the settings in one go. + \sa ReadFunc, registerFormat() */ @@ -3504,7 +3513,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path) extension associated to the format (without the '.'). The \a readFunc and \a writeFunc parameters are pointers to - functions that read and write a set of (key, value) pairs. The + functions that read and write a set of key/value pairs. The QIODevice parameter to the read and write functions is always opened in binary mode (i.e., without the QIODevice::Text flag). diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 4563e84..7c925f1 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -333,7 +333,7 @@ public: this->stream = stream; } -public slots: +public Q_SLOTS: inline void flushStream() { stream->flush(); } private: diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 94a53f1..5846e23 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5330,7 +5330,7 @@ QString QUrl::toString(FormattingOptions options) const url += QLatin1Char('/'); url += ourPath; // check if we need to remove trailing slashes - while ((options & StripTrailingSlash) && url.right(1) == QLatin1String("/")) + while ((options & StripTrailingSlash) && url.endsWith(QLatin1Char('/'))) url.chop(1); } diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 6847173..cb40f19 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1908,7 +1908,7 @@ QStringList QCoreApplication::arguments() wchar_t tempFilename[MAX_PATH+1]; if (GetModuleFileNameW(0, tempFilename, MAX_PATH)) { tempFilename[MAX_PATH] = 0; - cmdline.prepend(QLatin1Char('\"') + QString::fromUtf16((unsigned short *)tempFilename) + QString(QLatin1String("\" "))); + cmdline.prepend(QLatin1Char('\"') + QString::fromUtf16((unsigned short *)tempFilename) + QLatin1String("\" ")); } #endif // Q_OS_WINCE diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 9868c23..815a558 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -840,7 +840,7 @@ QString decodeMSG(const MSG& msg) FLGSTR(ISC_SHOWUICANDIDATEWINDOW << 2), FLGSTR(ISC_SHOWUICANDIDATEWINDOW << 3), FLAG_STRING()); - parameters.sprintf("Input context(%s) Show flags(%s)", (fSet?"Active":"Inactive"), showFlgs.toLatin1().data()); + parameters.sprintf("Input context(%s) Show flags(%s)", (fSet? "Active" : "Inactive"), showFlgs.toLatin1().data()); } break; #endif diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 65d81f1..be622d9 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -301,7 +301,6 @@ void QObjectPrivate::addConnection(int signal, Connection *c) ConnectionList &connectionList = (*connectionLists)[signal]; connectionList.append(c); - cleanConnectionLists(); } @@ -2377,7 +2376,8 @@ int QObject::receivers(const char *signal) const can be connected to one slot. If a signal is connected to several slots, the slots are activated - in an arbitrary order when the signal is emitted. + in the same order as the order the connection was made, when the + signal is emitted. The function returns true if it successfully connects the signal to the slot. It will return false if it cannot create the @@ -2385,9 +2385,13 @@ int QObject::receivers(const char *signal) const existence of either \a signal or \a method, or if their signatures aren't compatible. - For every connection you make, a signal is emitted; two signals are emitted - for duplicate connections. You can break all of these connections with a - single disconnect() call. + By default, a signal is emitted for every connection you make; + two signals are emitted for duplicate connections. You can break + all of these connections with a single disconnect() call. + If you pass the Qt::UniqueConnection \a type, the connection will only + be made if it is not a duplicate. If there is already a duplicate + (exact same signal to the exact same slot on the same objects), + the connection will fail and connect will return false The optional \a type parameter describes the type of connection to establish. In particular, it determines whether a particular @@ -2520,7 +2524,8 @@ bool QObject::connect(const QObject *sender, const char *signal, } } #endif - QMetaObject::connect(sender, signal_index, receiver, method_index, type, types); + if (!QMetaObject::connect(sender, signal_index, receiver, method_index, type, types)) + return false; const_cast<QObject*>(sender)->connectNotify(signal - 1); return true; } @@ -2771,6 +2776,22 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, QObject *s = const_cast<QObject *>(sender); QObject *r = const_cast<QObject *>(receiver); + QOrderedMutexLocker locker(signalSlotLock(sender), + signalSlotLock(receiver)); + + if (type & Qt::UniqueConnection) { + QObjectConnectionListVector *connectionLists = s->d_func()->connectionLists; + if (connectionLists && connectionLists->count() > signal_index) { + QObjectPrivate::ConnectionList &connectionList = (*connectionLists)[signal_index]; + for (int i = 0; i < connectionList.count(); ++i) { + QObjectPrivate::Connection *c2 = connectionList.at(i); + if (c2->receiver == receiver && c2->method == method_index) + return false; + } + } + type &= Qt::UniqueConnection - 1; + } + QObjectPrivate::Connection *c = new QObjectPrivate::Connection; c->sender = s; c->receiver = r; @@ -2778,9 +2799,6 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, c->connectionType = type; c->argumentTypes = types; - QOrderedMutexLocker locker(signalSlotLock(sender), - signalSlotLock(receiver)); - s->d_func()->addConnection(signal_index, c); r->d_func()->senders.append(c); diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index 12f21b7..9187ad3 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -51,8 +51,6 @@ #ifndef QT_NO_SHAREDMEMORY -QT_BEGIN_NAMESPACE - #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 4b3feb0..08821d4 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -269,7 +269,7 @@ class QSingleShotTimer : public QObject public: ~QSingleShotTimer(); QSingleShotTimer(int msec, QObject *r, const char * m); -signals: +Q_SIGNALS: void timeout(); protected: void timerEvent(QTimerEvent *); diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 08bd2d0..de1baac 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -71,7 +71,7 @@ static QString qdlerror() #else const char *err = strerror(errno); #endif - return err ? QLatin1String("(")+QString::fromLocal8Bit(err) + QLatin1String(")"): QString(); + return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString(); } bool QLibraryPrivate::load_sys() diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 491cb87..93744b9 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -79,7 +79,7 @@ class QAbstractTransition; class QHistoryState; class QState; -class QStatePrivate : public QAbstractStatePrivate +class Q_AUTOTEST_EXPORT QStatePrivate : public QAbstractStatePrivate { Q_DECLARE_PUBLIC(QState) public: diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 757584a..84619d7 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -803,8 +803,7 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr stateForAnimation.insert(a, s); animationsForState[s].append(a); // ### connect to just the top-level animation? - QObject::disconnect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); - QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished())); + QObject::connect(a, SIGNAL(finished()), q, SLOT(_q_animationFinished()), Qt::UniqueConnection); } it2 = assignments.erase(it2); } else { @@ -1302,22 +1301,6 @@ void QStateMachinePrivate::unregisterTransition(QAbstractTransition *transition) #endif } -static int senderSignalIndex(const QObject *sender) -{ - QObjectPrivate *d = QObjectPrivate::get(const_cast<QObject*>(sender)); - QMutexLocker(&d->threadData->mutex); - if (!d->currentSender) - return -1; - - // Return -1 if d->currentSender isn't in d->senders - bool found = false; - for (int i = 0; !found && i < d->senders.count(); ++i) - found = (d->senders.at(i)->sender == d->currentSender->sender); - if (!found) - return -1; - return d->currentSender->signal; -} - void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transition) { Q_Q(QStateMachine); @@ -2088,10 +2071,15 @@ int QSignalEventGenerator::qt_metacall(QMetaObject::Call _c, int _id, void **_a) switch (_id) { case 0: { // ### in Qt 4.6 we can use QObject::senderSignalIndex() - int signalIndex = senderSignalIndex(this); + QObjectPrivate *d = static_cast<QObjectPrivate *>(d_ptr); + int signalIndex = -1; + QObject *sender = this->sender(); + if (sender && d->currentSender) + signalIndex = d->currentSender->signal; + Q_ASSERT(signalIndex != -1); QStateMachine *machine = qobject_cast<QStateMachine*>(parent()); - QStateMachinePrivate::get(machine)->handleTransitionSignal(sender(), signalIndex, _a); + QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a); break; } default: ; diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 7232626..e438179 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -74,7 +74,7 @@ public: QCryptographicHash can be used to generate cryptographic hashes of binary or text data. - Currently MD4, MD5, and SHA1 are supported. + Currently MD4, MD5, and SHA-1 are supported. */ /*! diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 090ca61..de41360 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4688,7 +4688,7 @@ QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPos if (fixup && tmpstate == Intermediate && used < sn.count) { const FieldInfo fi = fieldInfo(index); if ((fi & (Numeric|FixedWidth)) == (Numeric|FixedWidth)) { - const QString newText = QString(QLatin1String("%1")).arg(num, sn.count, 10, QLatin1Char('0')); + const QString newText = QString::fromLatin1("%1").arg(num, sn.count, 10, QLatin1Char('0')); input.replace(pos, used, newText); used = sn.count; } diff --git a/src/corelib/tools/qlistdata.cpp b/src/corelib/tools/qlistdata.cpp index d40b6b6..34a5d80 100644 --- a/src/corelib/tools/qlistdata.cpp +++ b/src/corelib/tools/qlistdata.cpp @@ -1173,7 +1173,8 @@ void **QListData::erase(void **xi) /*! \typedef QList::iterator::iterator_category - \internal + A synonym for \e {std::random_access_iterator_tag} indicating + this iterator is a random access iterator. */ /*! \typedef QList::iterator::difference_type @@ -1432,7 +1433,8 @@ void **QListData::erase(void **xi) /*! \typedef QList::const_iterator::iterator_category - \internal + A synonym for \e {std::random_access_iterator_tag} indicating + this iterator is a random access iterator. */ /*! \typedef QList::const_iterator::difference_type diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 248137a..9953155 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -321,7 +321,7 @@ static QString readEscapedFormatString(const QString &format, int *idx) { int &i = *idx; - Q_ASSERT(format.at(i).unicode() == '\''); + Q_ASSERT(format.at(i) == QLatin1Char('\'')); ++i; if (i == format.size()) return QString(); @@ -635,7 +635,7 @@ static QLocale::MeasurementSystem winSystemMeasurementSystem() QString iMeasure = QT_WA_INLINE( QString::fromUtf16(reinterpret_cast<ushort*>(output)), QString::fromLocal8Bit(reinterpret_cast<char*>(output))); - if (iMeasure == QString::fromLatin1("1")) { + if (iMeasure == QLatin1String("1")) { return QLocale::ImperialSystem; } } diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 0699400..07df28d 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -902,7 +902,8 @@ void QMapData::dump() /*! \typedef QMap::iterator::iterator_category - \internal + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QMap::iterator::pointer @@ -1123,7 +1124,8 @@ void QMapData::dump() /*! \typedef QMap::const_iterator::iterator_category - \internal + A synonym for \e {std::bidirectional_iterator_tag} indicating + this iterator is a bidirectional iterator. */ /*! \typedef QMap::const_iterator::pointer diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 29509c5..c64e1d6 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -944,6 +944,23 @@ QString::QString(int size, QChar ch) } } +/*! + Constructs a string of the given \a size without initializing the + characters. This is only used in \c QStringBuilder::toString(). + + \internal +*/ + +QString::QString(int size, Uninitialized) +{ + d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar)); + d->ref = 1; + d->alloc = d->size = size; + d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0; + d->data = d->array; + d->array[size] = '\0'; +} + /*! \fn QString::QString(const QLatin1String &str) Constructs a copy of the Latin-1 string \a str. diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 69c4f2f..7c0d6a3 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -579,6 +579,9 @@ public: bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; } + struct Uninitialized {}; + QString(int size, Uninitialized); + private: #if defined(QT_NO_CAST_FROM_ASCII) && !defined(Q_NO_DECLARED_NOT_DEFINED) QString &operator+=(const char *s); @@ -1001,13 +1004,15 @@ inline int QByteArray::findRev(const QString &s, int from) const # endif // QT3_SUPPORT #endif // QT_NO_CAST_TO_ASCII +#ifndef QT_USE_FAST_OPERATOR_PLUS +# ifndef QT_USE_FAST_CONCATENATION inline const QString operator+(const QString &s1, const QString &s2) { QString t(s1); t += s2; return t; } inline const QString operator+(const QString &s1, QChar s2) { QString t(s1); t += s2; return t; } inline const QString operator+(QChar s1, const QString &s2) { QString t(s1); t += s2; return t; } -#ifndef QT_NO_CAST_FROM_ASCII +# ifndef QT_NO_CAST_FROM_ASCII inline QT_ASCII_CAST_WARN const QString operator+(const QString &s1, const char *s2) { QString t(s1); t += QString::fromAscii(s2); return t; } inline QT_ASCII_CAST_WARN const QString operator+(const char *s1, const QString &s2) @@ -1020,7 +1025,9 @@ inline QT_ASCII_CAST_WARN const QString operator+(const QByteArray &ba, const QS { QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; } inline QT_ASCII_CAST_WARN const QString operator+(const QString &s, const QByteArray &ba) { QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; } -#endif +# endif // QT_NO_CAST_FROM_ASCII +# endif // QT_USE_FAST_CONCATENATION +#endif // QT_USE_FAST_OPERATOR_PLUS #ifndef QT_NO_STL inline std::string QString::toStdString() const @@ -1229,6 +1236,8 @@ inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef QT_END_NAMESPACE -QT_END_HEADER +#ifdef QT_USE_FAST_CONCATENATION +#include <QtCore/qstringbuilder.h> +#endif #endif // QSTRING_H diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp new file mode 100644 index 0000000..b807a89 --- /dev/null +++ b/src/corelib/tools/qstringbuilder.cpp @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** 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$ +** +****************************************************************************/ + +#include "qstringbuilder.h" + +/*! + \class QLatin1Literal + \reentrant + \since 4.6 + + \brief The QLatin1Literal class provides a thin wrapper around string + literals used in source code. + + \ingroup tools + \ingroup shared + \ingroup text + \mainclass + + Unlike \c QLatin1String, a \c QLatin1Literal can retrieve its size + without iterating over the literal. + + The main use of \c QLatin1Literal is in conjunction with \c QStringBuilder + to reduce the number of reallocations needed to build up a string from + smaller chunks. + + \sa QStringBuilder, QLatin1String, QString, QStringRef +*/ + +/*! \fn QLatin1Literal::QLatin1Literal(const char(&string)[]) + + Constructs a new literal from the given \a string. +*/ + +/*! \fn int QLatin1Literal::size() const + + Returns the number of characters in the literal \i{excluding} the trailing + NUL char. +*/ + +/*! \fn char *QLatin1Literal::data() const + + Returns a pointer to the first character of the string literal. + The string literal is terminated by a NUL character. +*/ + +/*! \fn QLatin1Literal::operator QString() const + + Converts the \c QLatin1Literal into a \c QString object. +*/ + + + +/*! + \class QStringBuilder + \reentrant + \since 4.6 + + \brief QStringBuilder is a template class that provides a facility to build + up QStrings from smaller chunks. + + \ingroup tools + \ingroup shared + \ingroup text + \mainclass + + When creating strings from smaller chunks, typically \c QString::operator+() + is used, resulting in \i{n - 1} reallocations when operating on \i{n} chunks. + + QStringBuilder uses expression templates to collect the individual parts, + compute the total size, allocate memory for the resulting QString object, + and copy the contents of the chunks into the result. + + The QStringBuilder class is not to be used explicitly in user code. + Instances of the class are created as return values of the operator%() + function, acting on objects of type \c QString, \c QLatin1String, + \c QLatin1Literal, \c \QStringRef, \c QChar, + \c QLatin1Char, and \c char. + + Concatenating strings with operator%() generally yields better + performance then using \c QString::operator+() on the same chunks + if there are three or more of them, and performs equally well in other + cases. + + \sa QLatin1Literal, QString +*/ + +/* !fn template <class A, class B> QStringBuilder<A, B> operator%(const A &a, const B &b) + + Returns a \c QStringBuilder object that is converted to a QString object + when assigned to a variable of QString type or passed to a function that + takes a QString parameter. + + This function is usable with arguments of type \c QString, + \c QLatin1String, \c QLatin1Literal, \c QStringRef, + \c QChar, \c QLatin1Char, and \c char. +*/ + diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h new file mode 100644 index 0000000..1e67b7d --- /dev/null +++ b/src/corelib/tools/qstringbuilder.h @@ -0,0 +1,207 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** 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$ +** +****************************************************************************/ + +#ifndef QSTRINGBUILDER_H +#define QSTRINGBUILDER_H + +#include <QtCore/qstring.h> + +#include <string.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + +// ### Qt 5: merge with QLatin1String +class QLatin1Literal +{ +public: + template <int N> + QLatin1Literal(const char (&str)[N]) : m_size(N - 1), m_data(str) {} + + inline int size() const { return m_size; } + inline const char *data() const { return m_data; } + +private: + const int m_size; + const char *m_data; +}; + + +template <typename T> class QConcatenable {}; + +template <typename A, typename B> +class QStringBuilder +{ +public: + QStringBuilder(const A &a_, const B &b_) : a(a_), b(b_) {} + + operator QString() const + { + QString s(QConcatenable< QStringBuilder<A, B> >::size(*this), + QString::Uninitialized()); + + QChar *d = s.data(); + QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d); + return s; + } + QByteArray toLatin1() const { return QString(*this).toLatin1(); } + + const A &a; + const B &b; +}; + + +template <> struct QConcatenable<char> +{ + typedef char type; + static int size(const char) { return 1; } + static inline void appendTo(const char c, QChar *&out) + { + *out++ = QLatin1Char(c); + } +}; + +template <> struct QConcatenable<QLatin1Char> +{ + typedef QLatin1Char type; + static int size(const QLatin1Char) { return 1; } + static inline void appendTo(const QLatin1Char c, QChar *&out) + { + *out++ = c; + } +}; + +template <> struct QConcatenable<QChar> +{ + typedef QChar type; + static int size(const QChar) { return 1; } + static inline void appendTo(const QChar c, QChar *&out) + { + *out++ = c; + } +}; + +template <> struct QConcatenable<QLatin1String> +{ + typedef QLatin1String type; + static int size(const QLatin1String &a) { return qstrlen(a.latin1()); } + static inline void appendTo(const QLatin1String &a, QChar *&out) + { + for (const char *s = a.latin1(); *s; ) + *out++ = QLatin1Char(*s++); + } + +}; + +template <> struct QConcatenable<QLatin1Literal> +{ + typedef QLatin1Literal type; + static int size(const QLatin1Literal &a) { return a.size(); } + static inline void appendTo(const QLatin1Literal &a, QChar *&out) + { + for (const char *s = a.data(); *s; ) + *out++ = QLatin1Char(*s++); + } +}; + +template <> struct QConcatenable<QString> +{ + typedef QString type; + static int size(const QString &a) { return a.size(); } + static inline void appendTo(const QString &a, QChar *&out) + { + const int n = a.size(); + memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + out += n; + } +}; + +template <> struct QConcatenable<QStringRef> +{ + typedef QStringRef type; + static int size(const QStringRef &a) { return a.size(); } + static inline void appendTo(QStringRef a, QChar *&out) + { + const int n = a.size(); + memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + out += n; + } +}; + +template <typename A, typename B> +struct QConcatenable< QStringBuilder<A, B> > +{ + typedef QStringBuilder<A, B> type; + static int size(const type &p) + { + return QConcatenable<A>::size(p.a) + QConcatenable<B>::size(p.b); + } + static inline void appendTo(const QStringBuilder<A, B> &p, QChar *&out) + { + QConcatenable<A>::appendTo(p.a, out); + QConcatenable<B>::appendTo(p.b, out); + } +}; + +template <typename A, typename B> +QStringBuilder<typename QConcatenable<A>::type, typename QConcatenable<B>::type> +operator%(const A &a, const B &b) +{ + return QStringBuilder<A, B>(a, b); +} + +#ifdef QT_USE_FAST_OPERATOR_PLUS +template <typename A, typename B> +QStringBuilder<typename QConcatenable<A>::type, typename QConcatenable<B>::type> +operator+(const A &a, const B &b) +{ + return QStringBuilder<A, B>(a, b); +} +#endif + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QSTRINGBUILDER_H diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index e22f122..cf1bff8 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -621,8 +621,6 @@ int QtPrivate::QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int the list, searching forward from index position \a from. Returns -1 if no item matched. - By default, this function is case sensitive. - \sa lastIndexOf(), contains(), QList::indexOf() */ diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 90287cb..aea0c6c 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -32,6 +32,7 @@ HEADERS += \ tools/qsize.h \ tools/qstack.h \ tools/qstring.h \ + tools/qstringbuilder.h \ tools/qstringlist.h \ tools/qstringmatcher.h \ tools/qtextboundaryfinder.h \ @@ -62,6 +63,7 @@ SOURCES += \ tools/qsharedpointer.cpp \ tools/qsize.cpp \ tools/qstring.cpp \ + tools/qstringbuilder.cpp \ tools/qstringlist.cpp \ tools/qtextboundaryfinder.cpp \ tools/qtimeline.cpp \ diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index ff1a01f..5e1fec3 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -3058,7 +3058,7 @@ QXmlStreamPrivateTagStack::NamespaceDeclaration &QXmlStreamWriterPrivate::findNa QString s; int n = ++namespacePrefixCount; forever { - s = QLatin1String("n") + QString::number(n++); + s = QLatin1Char('n') + QString::number(n++); int j = namespaceDeclarations.size() - 2; while (j >= 0 && namespaceDeclarations.at(j).prefix != s) --j; diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp index 955a31c..2347a54 100644 --- a/src/dbus/qdbuserror.cpp +++ b/src/dbus/qdbuserror.cpp @@ -339,7 +339,7 @@ QString QDBusError::errorString(ErrorType error) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QDBusError &msg) { - dbg.nospace() << "QDBusError(" << msg.name() << ", " << msg.message() << ")"; + dbg.nospace() << "QDBusError(" << msg.name() << ", " << msg.message() << ')'; return dbg.space(); } #endif diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index f40a45f..33f44ab 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -74,7 +74,7 @@ static inline QDebug operator<<(QDebug dbg, const QThread *th) dbg.nospace() << "QThread(ptr=" << (void*)th; if (th && !th->objectName().isEmpty()) dbg.nospace() << ", name=" << th->objectName(); - dbg.nospace() << ")"; + dbg.nospace() << ')'; return dbg.space(); } @@ -90,7 +90,7 @@ static inline QDebug operator<<(QDebug dbg, const QDBusConnectionPrivate *conn) dbg.nospace() << "same thread"; else dbg.nospace() << conn->thread(); - dbg.nospace() << ")"; + dbg.nospace() << ')'; return dbg.space(); } @@ -565,7 +565,7 @@ static void huntAndEmit(DBusConnection *connection, DBusMessage *msg, QDBusConnectionPrivate::ObjectTreeNode::DataList::ConstIterator it = haystack.children.constBegin(); QDBusConnectionPrivate::ObjectTreeNode::DataList::ConstIterator end = haystack.children.constEnd(); for ( ; it != end; ++it) - huntAndEmit(connection, msg, needle, *it, isScriptable, isAdaptor, path + QLatin1String("/") + it->name); + huntAndEmit(connection, msg, needle, *it, isScriptable, isAdaptor, path + QLatin1Char('/') + it->name); if (needle == haystack.obj) { // is this a signal we should relay? diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index 8eb8b1a..ce76ecc 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -601,7 +601,7 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con // mark as an error error = QDBusError(QDBusError::UnknownInterface, - QString( QLatin1String("Interface '%1' was not found") ) + QString::fromLatin1("Interface '%1' was not found") .arg(interface)); return 0; } diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index 471b899..dd983a0 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -80,15 +80,15 @@ static bool variantToString(const QVariant &arg, QString &out) int argType = arg.userType(); if (argType == QVariant::StringList) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QStringList list = arg.toStringList(); foreach (QString item, list) out += QLatin1Char('\"') + item + QLatin1String("\", "); if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QVariant::ByteArray) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QByteArray list = arg.toByteArray(); for (int i = 0; i < list.count(); ++i) { out += QString::number(list.at(i)); @@ -96,9 +96,9 @@ static bool variantToString(const QVariant &arg, QString &out) } if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QVariant::List) { - out += QLatin1String("{"); + out += QLatin1Char('{'); QList<QVariant> list = arg.toList(); foreach (QVariant item, list) { if (!variantToString(item, out)) @@ -107,7 +107,7 @@ static bool variantToString(const QVariant &arg, QString &out) } if (!list.isEmpty()) out.chop(2); - out += QLatin1String("}"); + out += QLatin1Char('}'); } else if (argType == QMetaType::Char || argType == QMetaType::Short || argType == QMetaType::Int || argType == QMetaType::Long || argType == QMetaType::LongLong) { out += QString::number(arg.toLongLong()); @@ -142,7 +142,7 @@ static bool variantToString(const QVariant &arg, QString &out) return false; out += QLatin1Char(']'); } else if (arg.canConvert(QVariant::String)) { - out += QLatin1String("\"") + arg.toString() + QLatin1String("\""); + out += QLatin1Char('\"') + arg.toString() + QLatin1Char('\"'); } else { out += QLatin1Char('['); out += QLatin1String(arg.typeName()); @@ -226,7 +226,7 @@ bool argToString(const QDBusArgument &busArg, QString &out) if (elementType != QDBusArgument::BasicType && elementType != QDBusArgument::VariantType && elementType != QDBusArgument::MapEntryType) - out += QLatin1String("]"); + out += QLatin1Char(']'); return true; } diff --git a/src/gui/accessible/qaccessiblewidget.cpp b/src/gui/accessible/qaccessiblewidget.cpp index 753ac57..1c2fcef 100644 --- a/src/gui/accessible/qaccessiblewidget.cpp +++ b/src/gui/accessible/qaccessiblewidget.cpp @@ -102,24 +102,7 @@ static QString buddyString(const QWidget *widget) QString Q_GUI_EXPORT qt_accStripAmp(const QString &text) { - if (text.isEmpty()) - return text; - - const QChar *ch = text.unicode(); - int length = text.length(); - QString str; - while (length > 0) { - if (*ch == QLatin1Char('&')) { - ++ch; - --length; - if (!ch) - --ch; - } - str += *ch; - ++ch; - --length; - } - return str; + return QString(text).remove(QLatin1Char('&')); } QString Q_GUI_EXPORT qt_accHotKey(const QString &text) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 3ccae3a..56b89f0 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -776,6 +776,7 @@ void QFileDialog::selectFile(const QString &filename) } QModelIndex index = d->model->index(filename); + QString file; if (!index.isValid()) { // save as dialog where we want to input a default value QString text = filename; @@ -790,13 +791,13 @@ void QFileDialog::selectFile(const QString &filename) ) text = text.remove(0,1); } - if (!isVisible() || !d->lineEdit()->hasFocus()) - d->lineEdit()->setText(text); + file = text; } else { - d->qFileDialogUi->listView->selectionModel()->clear(); - if (!isVisible() || !d->lineEdit()->hasFocus()) - d->lineEdit()->setText(index.data().toString()); + file = index.data().toString(); } + d->qFileDialogUi->listView->selectionModel()->clear(); + if (!isVisible() || !d->lineEdit()->hasFocus()) + d->lineEdit()->setText(file); } /** diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp index d8a2c7c..c7484e7 100644 --- a/src/gui/dialogs/qfontdialog.cpp +++ b/src/gui/dialogs/qfontdialog.cpp @@ -337,6 +337,14 @@ void QFontDialogPrivate::init() QFontDialog::~QFontDialog() { +#ifdef Q_WS_MAC + Q_D(QFontDialog); + if (d->delegate) { + QFontDialogPrivate::closeCocoaFontPanel(d->delegate); + QFontDialogPrivate::sharedFontPanelAvailable = true; + return; + } +#endif } /*! diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 50917a1..3be53db 100644 --- a/src/gui/dialogs/qfontdialog_mac.mm +++ b/src/gui/dialogs/qfontdialog_mac.mm @@ -47,6 +47,7 @@ #include <private/qapplication_p.h> #include <private/qfont_p.h> #include <private/qfontengine_p.h> +#include <private/qt_cocoa_helpers_mac_p.h> #include <private/qt_mac_p.h> #include <qdebug.h> #import <AppKit/AppKit.h> @@ -123,16 +124,16 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) QFont newFont; if (cocoaFont) { int pSize = qRound([cocoaFont pointSize]); - QString family(QCFString::toQString(reinterpret_cast<CFStringRef>([cocoaFont familyName]))); - QString typeface(QCFString::toQString(reinterpret_cast<CFStringRef>([cocoaFont fontName]))); -// qDebug() << "original family" << family << "typeface" << typeface << "psize" << pSize; + QString family(qt_mac_NSStringToQString([cocoaFont familyName])); + QString typeface(qt_mac_NSStringToQString([cocoaFont fontName])); + int hyphenPos = typeface.indexOf(QLatin1Char('-')); if (hyphenPos != -1) { typeface.remove(0, hyphenPos + 1); } else { typeface = QLatin1String("Normal"); } -// qDebug() << " massaged family" << family << "typeface" << typeface << "psize" << pSize; + newFont = QFontDatabase().font(family, typeface, pSize); newFont.setUnderline(resolveFont.underline()); newFont.setStrikeOut(resolveFont.strikeOut()); @@ -566,6 +567,7 @@ void *QFontDialogPrivate::openCocoaFontPanel(const QFont &initial, void QFontDialogPrivate::closeCocoaFontPanel(void *delegate) { + QMacCocoaAutoReleasePool pool; QCocoaFontPanelDelegate *theDelegate = static_cast<QCocoaFontPanelDelegate *>(delegate); NSWindow *ourPanel = [theDelegate actualPanel]; [ourPanel close]; @@ -597,15 +599,37 @@ QFont QFontDialogPrivate::execCocoaFontPanel(bool *ok, const QFont &initial, } } -void QFontDialogPrivate::setFont(void * delegate, const QFont &font) +void QFontDialogPrivate::setFont(void *delegate, const QFont &font) { + QMacCocoaAutoReleasePool pool; QFontEngine *fe = font.d->engineForScript(QUnicodeTables::Common); + NSFontManager *mgr = [NSFontManager sharedFontManager]; + NSFont *nsFont = 0; + #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (qstrcmp(fe->name(), "CoreText") == 0) { - const NSFont *nsFont = reinterpret_cast<const NSFont *>(static_cast<QCoreTextFontEngineMulti *>(fe)->ctfont); - [[NSFontManager sharedFontManager] setSelectedFont:nsFont isMultiple:NO]; - } + nsFont = reinterpret_cast<const NSFont *>(static_cast<QCoreTextFontEngineMulti *>(fe)->ctfont); + } else #endif + { + int weight = 5; + NSFontTraitMask mask = 0; + if (font.style() == QFont::StyleItalic) { + mask |= NSItalicFontMask; + } + if (font.weight() == QFont::Bold) { + weight = 9; + mask |= NSBoldFontMask; + } + + NSFontManager *mgr = [NSFontManager sharedFontManager]; + nsFont = [mgr fontWithFamily:qt_mac_QStringToNSString(font.family()) + traits:mask + weight:weight + size:font.pointSize()]; + } + + [mgr setSelectedFont:nsFont isMultiple:NO]; [static_cast<QCocoaFontPanelDelegate *>(delegate) setQtFont:font]; } diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 78d99e3..8608334 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -307,8 +307,7 @@ void QInputDialogPrivate::ensureEnabledConnection(QAbstractSpinBox *spinBox) { if (spinBox) { QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok); - QObject::disconnect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool))); - QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool))); + QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)), Qt::UniqueConnection); } } diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index ae5b4a3..1734e85 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -1684,10 +1684,13 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) } #endif - QString translatedTextAboutQt; - translatedTextAboutQt = QMessageBox::tr( + QString translatedTextAboutQtCaption; + translatedTextAboutQtCaption = QMessageBox::tr( "<h3>About Qt</h3>" "<p>This program uses Qt version %1.</p>" + ).arg(QLatin1String(QT_VERSION_STR)); + QString translatedTextAboutQtText; + translatedTextAboutQtText = QMessageBox::tr( "<p>Qt is a C++ toolkit for cross-platform application " "development.</p>" "<p>Qt provides single-source portability across MS Windows, " @@ -1715,12 +1718,12 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) "<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>" - ).arg(QLatin1String(QT_VERSION_STR)); - + ); QMessageBox *msgBox = new QMessageBox(parent); msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setWindowTitle(title.isEmpty() ? tr("About Qt") : title); - msgBox->setText(translatedTextAboutQt); + msgBox->setText(translatedTextAboutQtCaption); + msgBox->setInformativeText(translatedTextAboutQtText); QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png")); if (!pm.isNull()) diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 87a4e65..8456d13 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -669,7 +669,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p) for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); widget.printers->addItem(printerName); if (cupsPrinters[i].is_default) @@ -813,7 +813,7 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index) optionsPane->selectPrinter(0); #endif if (lprPrinters.count() > 0) { - QString type = lprPrinters.at(index).name + QLatin1String("@") + lprPrinters.at(index).host; + QString type = lprPrinters.at(index).name + QLatin1Char('@') + lprPrinters.at(index).host; if (!lprPrinters.at(index).comment.isEmpty()) type += QLatin1String(", ") + lprPrinters.at(index).comment; widget.type->setText(type); @@ -1194,9 +1194,9 @@ QVariant QPPDOptionsModel::headerData(int section, Qt::Orientation, int role) co switch(section){ case 0: - return QVariant(QApplication::translate("QPPDOptionsModel","Name")); + return QVariant(QApplication::translate("QPPDOptionsModel", "Name")); case 1: - return QVariant(QApplication::translate("QPPDOptionsModel","Value")); + return QVariant(QApplication::translate("QPPDOptionsModel", "Value")); default: return QVariant(); } diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 29a2738..a696160 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -460,7 +460,7 @@ void QPrintPreviewDialogPrivate::updatePageNumLabel() int numPages = preview->numPages(); int maxChars = QString::number(numPages).length(); - pageNumLabel->setText(QString(QLatin1String("/ %1")).arg(numPages)); + pageNumLabel->setText(QString::fromLatin1("/ %1").arg(numPages)); int cyphersWidth = q->fontMetrics().width(QString().fill(QLatin1Char('8'), maxChars)); int maxWidth = pageNumEdit->minimumSizeHint().width() + cyphersWidth; pageNumEdit->setMinimumWidth(maxWidth); @@ -611,7 +611,7 @@ void QPrintPreviewDialogPrivate::_q_zoomFactorChanged() factor = qMax(qreal(1.0), qMin(qreal(1000.0), factor)); if (ok) { preview->setZoomFactor(factor/100.0); - zoomFactor->setEditText(QString(QLatin1String("%1%")).arg(factor)); + zoomFactor->setEditText(QString::fromLatin1("%1%").arg(factor)); setFitting(false); } } diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp index 5c0dec8..7f10e14 100644 --- a/src/gui/embedded/qkbdtty_qws.cpp +++ b/src/gui/embedded/qkbdtty_qws.cpp @@ -89,6 +89,7 @@ private: struct termios m_tty_attr; char m_last_keycode; int m_vt_qws; + int m_originalKbdMode; }; @@ -150,6 +151,9 @@ QWSTtyKbPrivate::QWSTtyKbPrivate(QWSTtyKeyboardHandler *h, const QString &device tcgetattr(m_tty_fd, &termdata); #if defined(Q_OS_LINUX) + // record the original mode so we can restore it again in the constructor + ::ioctl(m_tty_fd, KDGKBMODE, m_originalKbdMode); + // PLEASE NOTE: // The tty keycode interface can only report keycodes 0x01 .. 0x7f // KEY_MAX is however defined to 0x1ff. In practice this is sufficient @@ -206,7 +210,7 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate() { if (m_tty_fd >= 0) { #if defined(Q_OS_LINUX) - ::ioctl(m_tty_fd, KDSKBMODE, K_XLATE); + ::ioctl(m_tty_fd, KDSKBMODE, m_originalKbdMode); #endif tcsetattr(m_tty_fd, TCSANOW, &m_tty_attr); } diff --git a/src/gui/embedded/qmouse_qws.cpp b/src/gui/embedded/qmouse_qws.cpp index 044a574..b5eda0c 100644 --- a/src/gui/embedded/qmouse_qws.cpp +++ b/src/gui/embedded/qmouse_qws.cpp @@ -413,8 +413,8 @@ void QWSCalibratedMouseHandler::writeCalibration() QFile file(calFile); if (file.open(QIODevice::WriteOnly)) { QTextStream t(&file); - t << a << " " << b << " " << c << " "; - t << d << " " << e << " " << f << " " << s << endl; + t << a << ' ' << b << ' ' << c << ' '; + t << d << ' ' << e << ' ' << f << ' ' << s << endl; } else #endif { diff --git a/src/gui/embedded/qscreenmulti_qws.cpp b/src/gui/embedded/qscreenmulti_qws.cpp index 1914b44..a639e01 100644 --- a/src/gui/embedded/qscreenmulti_qws.cpp +++ b/src/gui/embedded/qscreenmulti_qws.cpp @@ -221,9 +221,9 @@ bool QMultiScreen::connect(const QString &displaySpec) { QString dSpec = displaySpec; if (dSpec.startsWith(QLatin1String("Multi:"), Qt::CaseInsensitive)) - dSpec = dSpec.mid(QString(QLatin1String("Multi:")).size()); + dSpec = dSpec.mid(QString::fromLatin1("Multi:").size()); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dSpec.endsWith(displayIdSpec)) dSpec = dSpec.left(dSpec.size() - displayIdSpec.size()); diff --git a/src/gui/embedded/qscreentransformed_qws.cpp b/src/gui/embedded/qscreentransformed_qws.cpp index e22ea1f..01a18b3 100644 --- a/src/gui/embedded/qscreentransformed_qws.cpp +++ b/src/gui/embedded/qscreentransformed_qws.cpp @@ -206,11 +206,11 @@ bool QTransformedScreen::connect(const QString &displaySpec) { QString dspec = displaySpec.trimmed(); if (dspec.startsWith(QLatin1String("Transformed:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("Transformed:")).size()); + dspec = dspec.mid(QString::fromLatin1("Transformed:").size()); else if (!dspec.compare(QLatin1String("Transformed"), Qt::CaseInsensitive)) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); @@ -223,7 +223,7 @@ bool QTransformedScreen::connect(const QString &displaySpec) if (!QScreenDriverFactory::keys().contains(driver, Qt::CaseInsensitive)) if (!dspec.isEmpty()) - dspec.prepend(QLatin1String(":")); + dspec.prepend(QLatin1Char(':')); const int id = getDisplayId(dspec); QScreen *s = qt_get_screen(id, dspec.toLatin1().constData()); diff --git a/src/gui/embedded/qscreenvfb_qws.cpp b/src/gui/embedded/qscreenvfb_qws.cpp index accfe1f..ec393e3 100644 --- a/src/gui/embedded/qscreenvfb_qws.cpp +++ b/src/gui/embedded/qscreenvfb_qws.cpp @@ -330,7 +330,7 @@ void QVFbScreen::disconnect() bool QVFbScreen::initDevice() { #ifndef QT_NO_QWS_MOUSE_QVFB - const QString mouseDev = QString(QLatin1String(QT_VFB_MOUSE_PIPE)) + const QString mouseDev = QString::fromLatin1(QT_VFB_MOUSE_PIPE) .arg(displayId); d_ptr->mouse = new QVFbMouseHandler(QLatin1String("QVFbMouse"), mouseDev); qwsServer->setDefaultMouse("None"); @@ -339,7 +339,7 @@ bool QVFbScreen::initDevice() #endif #if !defined(QT_NO_QWS_KBD_QVFB) && !defined(QT_NO_QWS_KEYBOARD) - const QString keyboardDev = QString(QLatin1String(QT_VFB_KEYBOARD_PIPE)) + const QString keyboardDev = QString::fromLatin1(QT_VFB_KEYBOARD_PIPE) .arg(displayId); d_ptr->keyboard = new QVFbKeyboardHandler(keyboardDev); qwsServer->setDefaultKeyboard("None"); diff --git a/src/gui/embedded/qtransportauth_qws.cpp b/src/gui/embedded/qtransportauth_qws.cpp index 97ba5b8..6677482 100644 --- a/src/gui/embedded/qtransportauth_qws.cpp +++ b/src/gui/embedded/qtransportauth_qws.cpp @@ -834,12 +834,12 @@ QString RequestAnalyzer::analyze( QByteArray *msgQueue ) if ( command_type == QWSCommand::QCopSend ) { QWSQCopSendCommand *sendCommand = static_cast<QWSQCopSendCommand*>(command); - request += QString( QLatin1String("/QCop/%1/%2") ).arg( sendCommand->channel ).arg( sendCommand->message ); + request += QString::fromLatin1("/QCop/%1/%2").arg( sendCommand->channel ).arg( sendCommand->message ); } if ( command_type == QWSCommand::QCopRegisterChannel ) { QWSQCopRegisterChannelCommand *registerCommand = static_cast<QWSQCopRegisterChannelCommand*>(command); - request += QString( QLatin1String("/QCop/RegisterChannel/%1") ).arg( registerCommand->channel ); + request += QString::fromLatin1("/QCop/RegisterChannel/%1").arg( registerCommand->channel ); } #endif dataSize = QWS_PROTOCOL_ITEM_SIZE( *command ); diff --git a/src/gui/embedded/qunixsocket.cpp b/src/gui/embedded/qunixsocket.cpp index 16f2cae..1600505 100644 --- a/src/gui/embedded/qunixsocket.cpp +++ b/src/gui/embedded/qunixsocket.cpp @@ -135,7 +135,7 @@ struct QUnixSocketRightsPrivate : public QSharedData #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocketRightsPrivate: Unable to close managed" - " file descriptor (" << ::strerror(errno) << ")"; + " file descriptor (" << ::strerror(errno) << ')'; } #endif } @@ -166,7 +166,7 @@ QUnixSocketRights::QUnixSocketRights(int fd) #ifdef QUNIXSOCKET_DEBUG if(-1 == d->fd) { qDebug() << "QUnixSocketRights: Unable to duplicate fd " - << fd << " (" << ::strerror(errno) << ")"; + << fd << " (" << ::strerror(errno) << ')'; } #endif } @@ -237,7 +237,7 @@ int QUnixSocketRights::dupFd() const #ifdef QUNIXSOCKET_DEBUG if(-1 == rv) qDebug() << "QUnixSocketRights: Unable to duplicate managed file " - "descriptor (" << ::strerror(errno) << ")"; + "descriptor (" << ::strerror(errno) << ')'; #endif return rv; @@ -927,7 +927,7 @@ bool QUnixSocket::connect(const QByteArray & path) int crv; #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Connect requested to '" - << path << "'"; + << path << '\''; #endif abort(); // Reset any existing connection @@ -949,7 +949,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == d->fd) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to create socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif d->error = ResourceError; goto connect_error; @@ -962,7 +962,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to configure socket (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif d->error = ResourceError; @@ -981,7 +981,7 @@ bool QUnixSocket::connect(const QByteArray & path) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to connect (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif if(ECONNREFUSED == errno) d->error = ConnectionRefused; @@ -1021,7 +1021,7 @@ connect_error: // Cleanup failed connection #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocket: Unable to close file descriptor after " - "failed connect (" << ::strerror(errno) << ")"; + "failed connect (" << ::strerror(errno) << ')'; } #endif } @@ -1065,7 +1065,7 @@ bool QUnixSocket::setSocketDescriptor(int socketDescriptor) if(-1 == crv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to configure client provided socket (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif d->error = ResourceError; @@ -1136,7 +1136,7 @@ void QUnixSocket::abort() #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocket: Unable to close socket during abort (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; } #endif @@ -1686,11 +1686,11 @@ qint64 QUnixSocketPrivate::writeActivated() } #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Transmitting message (length" << m.d->size() << ")"; + qDebug() << "QUnixSocket: Transmitting message (length" << m.d->size() << ')'; #endif ::ssize_t s = ::sendmsg(fd, &sendmessage, MSG_DONTWAIT | MSG_NOSIGNAL); #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Transmitted message (" << s << ")"; + qDebug() << "QUnixSocket: Transmitted message (" << s << ')'; #endif if(-1 == s) { @@ -1699,13 +1699,13 @@ qint64 QUnixSocketPrivate::writeActivated() } else if(EPIPE == errno) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Remote side disconnected during transmit " - "(" << ::strerror(errno) << ")"; + "(" << ::strerror(errno) << ')'; #endif me->abort(); } else { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to transmit data (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif error = (QUnixSocket::SocketError)(QUnixSocket::WriteFailure | CausedAbort); @@ -1764,12 +1764,12 @@ void QUnixSocketPrivate::readActivated() int recvrv = ::recvmsg(fd, &message, 0); #ifdef QUNIXSOCKET_DEBUG - qDebug() << "QUnixSocket: Received message (" << recvrv << ")"; + qDebug() << "QUnixSocket: Received message (" << recvrv << ')'; #endif if(-1 == recvrv) { #ifdef QUNIXSOCKET_DEBUG qDebug() << "QUnixSocket: Unable to receive data (" - << ::strerror(errno) << ")"; + << ::strerror(errno) << ')'; #endif error = (QUnixSocket::SocketError)(QUnixSocket::ReadFailure | CausedAbort); diff --git a/src/gui/embedded/qunixsocketserver.cpp b/src/gui/embedded/qunixsocketserver.cpp index 6e9347b..489c40a 100644 --- a/src/gui/embedded/qunixsocketserver.cpp +++ b/src/gui/embedded/qunixsocketserver.cpp @@ -172,7 +172,7 @@ void QUnixSocketServer::close() #ifdef QUNIXSOCKET_DEBUG if(0 != closerv) { qDebug() << "QUnixSocketServer: Unable to close socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; } #endif } @@ -245,7 +245,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == d->fd) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to create socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = ResourceError; @@ -263,7 +263,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == ::bind(d->fd, (sockaddr *)&addr, sizeof(sockaddr_un))) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to bind socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = BindError; @@ -274,7 +274,7 @@ bool QUnixSocketServer::listen(const QByteArray & path) if(-1 == ::listen(d->fd, d->maxConns)) { #ifdef QUNIXSOCKETSERVER_DEBUG qDebug() << "QUnixSocketServer: Unable to listen socket (" - << strerror(errno) << ")"; + << strerror(errno) << ')'; #endif close(); d->error = ListenError; diff --git a/src/gui/embedded/qwindowsystem_qws.cpp b/src/gui/embedded/qwindowsystem_qws.cpp index fdcd193..a15decd 100644 --- a/src/gui/embedded/qwindowsystem_qws.cpp +++ b/src/gui/embedded/qwindowsystem_qws.cpp @@ -2210,7 +2210,7 @@ void QWSServer::sendMouseEvent(const QPoint& pos, int state, int wheel) { bool block = qwsServerPrivate->screensaverblockevent(MOUSE, qwsServerPrivate->screensaverinterval, state); #ifdef EVENT_BLOCK_DEBUG - qDebug() << "sendMouseEvent" << pos.x() << pos.y() << state << (block?"block":"pass"); + qDebug() << "sendMouseEvent" << pos.x() << pos.y() << state << (block ? "block" : "pass"); #endif if (state || wheel) @@ -4110,7 +4110,7 @@ void QWSServer::processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers block = qwsServerPrivate->screensaverblockevent(KEY, qwsServerPrivate->screensaverinterval, isPress); #ifdef EVENT_BLOCK_DEBUG - qDebug() << "processKeyEvent" << unicode << keycode << modifiers << isPress << autoRepeat << (block?"block":"pass"); + qDebug() << "processKeyEvent" << unicode << keycode << modifiers << isPress << autoRepeat << (block ? "block" : "pass"); #endif // If we press a key and it's going to be blocked, wake up the screen diff --git a/src/gui/embedded/qwscommand_qws.cpp b/src/gui/embedded/qwscommand_qws.cpp index b0fd78b..26d3435 100644 --- a/src/gui/embedded/qwscommand_qws.cpp +++ b/src/gui/embedded/qwscommand_qws.cpp @@ -133,7 +133,7 @@ void QWSHexDump::init() void QWSHexDump::hexDump() { - *outstrm << "(" << dataSize << " bytes):\n" << prefix; + *outstrm << '(' << dataSize << " bytes):\n" << prefix; sprintf(sideviewLayout, " [%%-%us]", wrap); dataWidth = (2 * wrap) + (wrap / clustering); @@ -144,7 +144,7 @@ void QWSHexDump::hexDump() sideview[wrapIndex = i%wrap] = isprint(c) ? c : '.'; if (wrapIndex && (wrapIndex % clustering == 0)) - *outstrm << " "; + *outstrm << ' '; outstrm->setFieldWidth(2); outstrm->setPadChar('0'); @@ -172,14 +172,14 @@ void QWSHexDump::sideviewDump(int at) int currentWidth = (2 * at) + (at / clustering) - (at%clustering?0:1); int missing = qMax(dataWidth - currentWidth, 0); while (missing--) - *outstrm << " "; + *outstrm << ' '; *outstrm << " ["; outstrm->setPadChar(' '); outstrm->setFieldWidth(wrap); outstrm->setFieldAlignment( QTextStream::AlignLeft ); *outstrm << sideview; - *outstrm << "]"; + *outstrm << ']'; } } diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 7096dab..00f1aed 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -130,7 +130,7 @@ \img graphicsview-parentchild.png - \section Transformation + \section1 Transformation QGraphicsItem supports affine transformations in addition to its base position, pos(). To change the item's transformation, you can either pass @@ -166,7 +166,7 @@ .shear(horizontalShear, verticalShear).scale(xScale, yScale).translate(-xOrigin, -yOrigin); \endcode - \section Painting + \section1 Painting The paint() function is called by QGraphicsView to paint the item's contents. The item has no background or default fill of its own; whatever @@ -183,7 +183,7 @@ high z-values. Stacking order applies to sibling items; parents are always drawn before their children. - \section Events + \section1 Events QGraphicsItem receives events from QGraphicsScene through the virtual function sceneEvent(). This function distributes the most common events @@ -210,7 +210,7 @@ by the virtual function sceneEventFilter(). You can remove item event filters by calling removeSceneEventFilter(). - \section Custom Data + \section1 Custom Data Sometimes it's useful to register custom data with an item, be it a custom item, or a standard item. You can call setData() on any item to store data @@ -1644,6 +1644,10 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo if (visible == quint32(newVisible)) return; + // Don't show child if parent is not visible + if (parent && newVisible && !parent->d_ptr->visible) + return; + // Modify the property. const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange, quint32(newVisible))); @@ -2643,24 +2647,32 @@ QTransform QGraphicsItem::transform() const } /*! - \property QGraphicsItem::xRotation - \since 4.6 - This property holds the rotation angle in degrees around the X axis + Returns the rotation around the X axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setXRotation(), {Transformations} */ qreal QGraphicsItem::xRotation() const { return d_ptr->decomposedTransform()->xRotation; } +/*! + \since 4.6 + + Sets the rotation around the X axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa xRotation(), {Transformations} +*/ void QGraphicsItem::setXRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2676,24 +2688,32 @@ void QGraphicsItem::setXRotation(qreal angle) } /*! - \property QGraphicsItem::yRotation - \since 4.6 - This property holds the rotation angle in degrees around the Y axis + Returns the rotation around the Y axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setYRotation(), {Transformations} */ qreal QGraphicsItem::yRotation() const { return d_ptr->decomposedTransform()->yRotation; } +/*! + \since 4.6 + + Sets the rotation around the Y axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa yRotation(), {Transformations} +*/ void QGraphicsItem::setYRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2709,24 +2729,32 @@ void QGraphicsItem::setYRotation(qreal angle) } /*! - \property QGraphicsItem::zRotation - \since 4.6 - This property holds the rotation angle in degrees around the Z axis + Returns the rotation around the Z axis. The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setZRotation(), {Transformations} */ qreal QGraphicsItem::zRotation() const { return d_ptr->decomposedTransform()->zRotation; } +/*! + \since 4.6 + + Sets the rotation around the Z axis to \a angle degrees. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa zRotation(), {Transformations} +*/ void QGraphicsItem::setZRotation(qreal angle) { if (!d_ptr->dirtyTransform) { @@ -2741,6 +2769,14 @@ void QGraphicsItem::setZRotation(qreal angle) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function set the rotation angles around the 3 axes + to \a x, \a y and \a z. + + \sa setXRotation(), setYRotation(), setZRotation() +*/ void QGraphicsItem::setRotation(qreal x, qreal y, qreal z) { setXRotation(x); @@ -2749,24 +2785,32 @@ void QGraphicsItem::setRotation(qreal x, qreal y, qreal z) } /*! - \property QGraphicsItem::xScale - \since 4.6 - This property holds the scale factor on the X axis. + Returns the scale factor on the X axis. The default is 1 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setXScale(), {Transformations} */ qreal QGraphicsItem::xScale() const { return d_ptr->decomposedTransform()->xScale; } +/*! + \since 4.6 + + Sets the scale factor on the X axis to \a factor. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa xScale(), {Transformations} +*/ void QGraphicsItem::setXScale(qreal factor) { if (!d_ptr->dirtyTransform) { @@ -2782,24 +2826,32 @@ void QGraphicsItem::setXScale(qreal factor) } /*! - \property QGraphicsItem::yScale - \since 4.6 - This property holds the scale factor on the Y axis. + Returns the scale factor on the Y axis. The default is 1 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setYScale(), {Transformations} */ qreal QGraphicsItem::yScale() const { return d_ptr->decomposedTransform()->yScale; } +/*! + \since 4.6 + + Sets the scale factor on the Y axis to \a factor. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa yScale(), {Transformations} +*/ void QGraphicsItem::setYScale(qreal factor) { if (!d_ptr->dirtyTransform) { @@ -2814,6 +2866,13 @@ void QGraphicsItem::setYScale(qreal factor) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function set the scaling factors on X and Y axis to \a sx and \a sy. + + \sa setXScale(), setYScale() +*/ void QGraphicsItem::setScale(qreal sx, qreal sy) { setXScale(sx); @@ -2821,24 +2880,32 @@ void QGraphicsItem::setScale(qreal sx, qreal sy) } /*! - \property QGraphicsItem::horizontalShear - \since 4.6 - This property holds the horizontal shear. + Returns the horizontal shear. - The default is 0. + The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setHorizontalShear(), {Transformations} */ qreal QGraphicsItem::horizontalShear() const { return d_ptr->decomposedTransform()->horizontalShear; } +/*! + \since 4.6 + + Sets the horizontal shear to \a shear. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa horizontalShear(), {Transformations} +*/ void QGraphicsItem::setHorizontalShear(qreal shear) { if (!d_ptr->dirtyTransform) { @@ -2854,24 +2921,32 @@ void QGraphicsItem::setHorizontalShear(qreal shear) } /*! - \property QGraphicsItem::verticalShear - \since 4.6 - This property holds the vertical shear. + Returns the vertical shear. - The default is 0. + The default is 0 \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setHorizontalShear(), {Transformations} */ qreal QGraphicsItem::verticalShear() const { return d_ptr->decomposedTransform()->verticalShear; } +/*! + \since 4.6 + + Sets the vertical shear to \a shear. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa verticalShear(), {Transformations} +*/ void QGraphicsItem::setVerticalShear(qreal shear) { if (!d_ptr->dirtyTransform) { @@ -2886,6 +2961,13 @@ void QGraphicsItem::setVerticalShear(qreal shear) d_ptr->hasTransform = 1; } +/*! + \since 4.6 + + This convenience function sets the horizontal shear to \a sh and the vertical shear to \a sv. + + \sa setHorizontalShear(), setVerticalShear() +*/ void QGraphicsItem::setShear(qreal sh, qreal sv) { setHorizontalShear(sh); @@ -2893,19 +2975,16 @@ void QGraphicsItem::setShear(qreal sh, qreal sv) } /*! - \property QGraphicsItem::transformOrigin - \since 4.6 - This property holds the transformation origin for the transformation properties. - This does not apply to the transformation set by setTransform. + Returns the transformation origin for the transformation properties. The default is QPointF(0,0). \warning setting this property is conflicting with calling setTransform. If a transform has been set, this function return the default value. - \sa {Transformations} + \sa setTransformOrigin(), {Transformations} */ QPointF QGraphicsItem::transformOrigin() const { @@ -2913,6 +2992,29 @@ QPointF QGraphicsItem::transformOrigin() const return QPointF(decomposed->xOrigin, decomposed->yOrigin); } +/*! + \fn inline void setTransformOrigin(qreal x, qreal y) + + \since 4.6 + + This is an overloaded member function, provided for convenience. + Sets the transformation origin for the transformation + properties to the point(\a x, \a y). + + \sa setTransformOrigin(), {Transformations} +*/ + +/*! + \since 4.6 + + Sets the transformation origin for the transformation properties to \a origin. + This does not apply to the transformation set by setTransform. + + \warning setting this property is conflicting with calling setTransform. + If a transform has been set, it will be overwritten. + + \sa transformOrigin(), {Transformations} +*/ void QGraphicsItem::setTransformOrigin(const QPointF &origin) { if (!d_ptr->dirtyTransform) { diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index c0ab9e1..bedcf20 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -459,10 +459,10 @@ public: QGraphicsItem *q_ptr; }; -Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QGraphicsItemPrivate::DecomposedTransform *) + #endif // QT_NO_GRAPHICSVIEW #endif diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 1cd51d6..c0b371f 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4900,6 +4900,12 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte // Redraw any newly exposed areas. if (itemCache->allExposed || !itemCache->exposed.isEmpty()) { + + //We know that we will modify the pixmap, removing it from the cache + //will detach the one we have and avoid a deep copy + if (pixmapFound) + QPixmapCache::remove(pixmapKey); + // Fit the item's bounding rect into the pixmap's coordinates. QTransform itemToPixmap; if (fixedCacheSize) { @@ -4928,12 +4934,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte _q_paintIntoCache(&pix, item, pixmapExposed, itemToPixmap, painter->renderHints(), &cacheOption, painterStateProtection); - if (!pixmapFound) { - // insert this pixmap into the cache. - itemCache->key = QPixmapCache::insert(pix); - } else { - QPixmapCache::replace(pixmapKey, pix); - } + // insert this pixmap into the cache. + itemCache->key = QPixmapCache::insert(pix); // Reset expose data. itemCache->allExposed = false; @@ -5060,6 +5062,11 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte // Check for newly invalidated areas. if (itemCache->allExposed || !itemCache->exposed.isEmpty() || !scrollExposure.isEmpty()) { + //We know that we will modify the pixmap, removing it from the cache + //will detach the one we have and avoid a deep copy + if (pixmapFound) + QPixmapCache::remove(pixmapKey); + // Construct an item-to-pixmap transform. QPointF p = deviceRect.topLeft(); QTransform itemToPixmap = painter->worldTransform(); @@ -5100,13 +5107,8 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte } if (pixModified) { - if (!pixmapFound) { - // Insert this pixmap into the cache. - deviceData->key = QPixmapCache::insert(pix); - } else { - //otherwise we replace the pixmap in the cache - QPixmapCache::replace(pixmapKey, pix); - } + // Insert this pixmap into the cache. + deviceData->key = QPixmapCache::insert(pix); } // Redraw the exposed area using an untransformed painter. This diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index a96eabf..c50b4a1 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -200,16 +200,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime < Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms. - \value DontClipPainter QGraphicsView sometimes clips the painter when - rendering the scene contents. This can generally improve performance - (e.g., rendering only small parts of a large pixmap), and protects against - rendering mistakes (e.g., drawing outside bounding rectangles, or outside - the exposed area). In some situations, however, the painter clip can slow - down rendering; especially when all painting is restricted to inside - exposed areas. By enabling this flag, QGraphicsView will completely - disable its implicit clipping. Note that rendering artifacts from using a - semi-transparent foreground or background brush can occur if clipping is - disabled. + \value DontClipPainter This value is obsolete and has no effect. \value DontSavePainterState When rendering, QGraphicsView protects the painter state (see QPainter::save()) when rendering the background or diff --git a/src/gui/graphicsview/qgraphicsview.h b/src/gui/graphicsview/qgraphicsview.h index e77e45c..c3ea6e5 100644 --- a/src/gui/graphicsview/qgraphicsview.h +++ b/src/gui/graphicsview/qgraphicsview.h @@ -110,7 +110,7 @@ public: }; enum OptimizationFlag { - DontClipPainter = 0x1, + DontClipPainter = 0x1, // obsolete DontSavePainterState = 0x2, DontAdjustForAntialiasing = 0x4 }; diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index a2e55e1..341f9a2 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -200,7 +200,55 @@ QT_BEGIN_NAMESPACE /*! \property QGraphicsWidget::pos \brief the position of the widget -*/ +*/ + +/*! + \property QGraphicsWidget::xRotation + \since 4.6 + \brief the rotation angle in degrees around the X axis +*/ + +/*! + \property QGraphicsWidget::yRotation + \since 4.6 + \brief the rotation angle in degrees around the Y axis +*/ + +/*! + \property QGraphicsWidget::zRotation + \since 4.6 + \brief the rotation angle in degrees around the Z axis +*/ + +/*! + \property QGraphicsWidget::xScale + \since 4.6 + \brief the scale factor on the X axis. +*/ + +/*! + \property QGraphicsWidget::yScale + \since 4.6 + \brief the scale factor on the Y axis. +*/ + +/*! + \property QGraphicsWidget::horizontalShear + \since 4.6 + \brief the horizontal shear. +*/ + +/*! + \property QGraphicsWidget::verticalShear + \since 4.6 + \brief the vertical shear. +*/ + +/*! + \property QGraphicsWidget::transformOrigin + \since 4.6 + \brief the transformation origin for the transformation properties. +*/ /*! Constructs a QGraphicsWidget instance. The optional \a parent argument is diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 25c68bc..c1c5631 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4853,8 +4853,6 @@ bool QImage::operator==(const QImage & i) const return false; if (d->format != Format_RGB32) { - if (d->colortable != i.d->colortable) - return false; if (d->format >= Format_ARGB32) { // all bits defined const int n = d->width * d->depth / 8; if (n == d->bytes_per_line && n == i.d->bytes_per_line) { @@ -4867,11 +4865,13 @@ bool QImage::operator==(const QImage & i) const } } } else { - int w = width(); - int h = height(); + const int w = width(); + const int h = height(); + const QVector<QRgb> &colortable = d->colortable; + const QVector<QRgb> &icolortable = i.d->colortable; for (int y=0; y<h; ++y) { for (int x=0; x<w; ++x) { - if (pixelIndex(x, y) != i.pixelIndex(x, y)) + if (colortable[pixelIndex(x, y)] != icolortable[i.pixelIndex(x, y)]) return false; } } diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 3ca685c..8ed9e93 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -2050,4 +2050,99 @@ QPixmapData* QPixmap::pixmapData() const return data; } +/*! + \enum QPixmap::HBitmapFormat + + \bold{Win32 only:} This enum defines how the conversion between \c + HBITMAP and QPixmap is performed. + + \warning This enum is only available on Windows. + + \value NoAlpha The alpha channel is ignored and always treated as + being set to fully opaque. This is preferred if the \c HBITMAP is + used with standard GDI calls, such as \c BitBlt(). + + \value PremultipliedAlpha The \c HBITMAP is treated as having an + alpha channel and premultiplied colors. This is preferred if the + \c HBITMAP is accessed through the \c AlphaBlend() GDI function. + + \value Alpha The \c HBITMAP is treated as having a plain alpha + channel. This is the preferred format if the \c HBITMAP is going + to be used as an application icon or systray icon. + + \sa fromWinHBITMAP(), toWinHBITMAP() +*/ + +/*! \fn HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const + \bold{Win32 only:} Creates a \c HBITMAP equivalent to the QPixmap, + based on the given \a format. Returns the \c HBITMAP handle. + + It is the caller's responsibility to free the \c HBITMAP data + after use. + + \warning This function is only available on Windows. + + \sa fromWinHBITMAP() +*/ + +/*! \fn QPixmap QPixmap::fromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format) + \bold{Win32 only:} Returns a QPixmap that is equivalent to the + given \a bitmap. The conversion is based on the specified \a + format. + + \warning This function is only available on Windows. + + \sa toWinHBITMAP(), {QPixmap#Pixmap Conversion}{Pixmap Conversion} + +*/ + +/*! \fn const QX11Info &QPixmap::x11Info() const + \bold{X11 only:} Returns information about the configuration of + the X display used to display the widget. + + \warning This function is only available on X11. + + \sa {QPixmap#Pixmap Information}{Pixmap Information} +*/ + +/*! \fn Qt::HANDLE QPixmap::x11PictureHandle() const + \bold{X11 only:} Returns the X11 Picture handle of the pixmap for + XRender support. + + This function will return 0 if XRender support is not compiled + into Qt, if the XRender extension is not supported on the X11 + display, or if the handle could not be created. Use of this + function is not portable. + + \warning This function is only available on X11. + + \sa {QPixmap#Pixmap Information}{Pixmap Information} +*/ + +/*! \fn int QPixmap::x11SetDefaultScreen(int screen) + \internal +*/ + +/*! \fn void QPixmap::x11SetScreen(int screen) + \internal +*/ + +/*! \fn QRgb* QPixmap::clut() const + \internal +*/ + +/*! \fn int QPixmap::numCols() const + \internal +*/ + +/*! \fn const uchar* QPixmap::qwsBits() const + \internal + \since 4.1 +*/ + +/*! \fn int QPixmap::qwsBytesPerLine() const + \internal + \since 4.1 +*/ + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp index 6cc7981..7e383ab 100644 --- a/src/gui/image/qpixmap_qws.cpp +++ b/src/gui/image/qpixmap_qws.cpp @@ -109,9 +109,6 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) return QPixmap::fromImage(img); } -/*! - \internal -*/ QRgb* QPixmap::clut() const { if (data->classId() == QPixmapData::RasterClass) { @@ -122,9 +119,6 @@ QRgb* QPixmap::clut() const return 0; } -/*! - \internal -*/ int QPixmap::numCols() const { if (data->classId() == QPixmapData::RasterClass) { @@ -135,10 +129,6 @@ int QPixmap::numCols() const return 0; } -/*! - \internal - \since 4.1 -*/ const uchar* QPixmap::qwsBits() const { if (data->classId() == QPixmapData::RasterClass) { @@ -149,10 +139,6 @@ const uchar* QPixmap::qwsBits() const return 0; } -/*! - \internal - \since 4.1 -*/ int QPixmap::qwsBytesPerLine() const { if (data->classId() == QPixmapData::RasterClass) { diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index b5556cd..29e4f3f 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -322,25 +322,36 @@ extern int qt_defaultDpiY(); int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { + QImageData *d = image.d; + if (!d) + return 0; + // override the image dpi with the screen dpi when rendering to a pixmap - const int dpmX = qRound(qt_defaultDpiX() * 100 / qreal(2.54)); - const int dpmY = qRound(qt_defaultDpiY() * 100 / qreal(2.54)); switch (metric) { + case QPaintDevice::PdmWidth: + return d->width; + case QPaintDevice::PdmHeight: + return d->height; case QPaintDevice::PdmWidthMM: - return qRound(image.width() * 1000 / dpmX); + return qRound(d->width * 25.4 / qt_defaultDpiX()); case QPaintDevice::PdmHeightMM: - return qRound(image.height() * 1000 / dpmY); - case QPaintDevice::PdmDpiX: - return qRound(dpmX * qreal(0.0254)); - case QPaintDevice::PdmDpiY: - return qRound(dpmY * qreal(0.0254)); + return qRound(d->width * 25.4 / qt_defaultDpiY()); + case QPaintDevice::PdmNumColors: + return d->colortable.size(); + case QPaintDevice::PdmDepth: + return d->depth; + case QPaintDevice::PdmDpiX: // fall-through case QPaintDevice::PdmPhysicalDpiX: - return qRound(dpmX * qreal(0.0254)); + return qt_defaultDpiX(); + case QPaintDevice::PdmDpiY: // fall-through case QPaintDevice::PdmPhysicalDpiY: - return qRound(dpmY * qreal(0.0254)); + return qt_defaultDpiY(); default: - return image.metric(metric); + qWarning("QRasterPixmapData::metric(): Unhandled metric type %d", metric); + break; } + + return 0; } QImage* QRasterPixmapData::buffer() diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index d4ebef7..ac02f97 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -119,42 +119,6 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h ) return pixmap; } - - -/*! - \enum QPixmap::HBitmapFormat - - This enum defines how the conversion between \c HBITMAP - and QPixmap is performed. - - \warning This enum is only available on Windows. - - \value NoAlpha The alpha channel is ignored and always treated as - being set to fully opaque. This is preferred if the \c HBITMAP is - used with standard GDI calls, such as \c BitBlt(). - - \value PremultipliedAlpha The \c HBITMAP is treated as having an - alpha channel and premultiplied colors. This is preferred if the - \c HBITMAP is accessed through the \c AlphaBlend() GDI function. - - \value Alpha The \c HBITMAP is treated as having a plain alpha - channel. This is the preferred format if the \c HBITMAP is going - to be used as an application icon or systray icon. - - \sa fromWinHBITMAP(), toWinHBITMAP() -*/ - -/*! - Creates a \c HBITMAP equivalent to the QPixmap, based on the given - \a format. Returns the \c HBITMAP handle. - - It is the caller's responsibility to free the \c HBITMAP data - after use. - - \warning This function is only available on Windows. - - \sa fromWinHBITMAP() -*/ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const { HBITMAP bitmap = 0; @@ -209,15 +173,6 @@ HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const return bitmap; } -/*! - Returns a QPixmap that is equivalent to the given \a bitmap. The - conversion is based on the specified \a format. - - \warning This function is only available on Windows. - - \sa toWinHBITMAP(), {QPixmap#Pixmap Conversion}{Pixmap Conversion} - -*/ QPixmap QPixmap::fromWinHBITMAP(HBITMAP bitmap, HBitmapFormat format) { // Verify size diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index d9c10db..a0ae01f 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1914,9 +1914,6 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform, } } -/*! - \internal -*/ int QPixmap::x11SetDefaultScreen(int screen) { int old = defaultScreen; @@ -1924,9 +1921,6 @@ int QPixmap::x11SetDefaultScreen(int screen) return old; } -/*! - \internal -*/ void QPixmap::x11SetScreen(int screen) { if (paintingActive()) { @@ -2034,14 +2028,6 @@ bool QX11PixmapData::hasAlphaChannel() const return d == 32; } -/*! - Returns information about the configuration of the X display used to display - the widget. - - \warning This function is only available on X11. - - \sa {QPixmap#Pixmap Information}{Pixmap Information} -*/ const QX11Info &QPixmap::x11Info() const { if (data->classId() == QPixmapData::X11Class) @@ -2098,20 +2084,6 @@ QPaintEngine* QX11PixmapData::paintEngine() const return that->pengine; } -/*! - Returns the X11 Picture handle of the pixmap for XRender - support. - - This function will return 0 if XRender support is not compiled - into Qt, if the XRender extension is not supported on the X11 - display, or if the handle could not be created. Use of this - function is not portable. - - \warning This function is only available on X11. - - \sa {QPixmap#Pixmap Information}{Pixmap Information} -*/ - Qt::HANDLE QPixmap::x11PictureHandle() const { #ifndef QT_NO_XRENDER diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 3cfc191..82b42b4 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -342,8 +342,10 @@ bool QPMCache::remove(const QString &key) bool QPMCache::remove(const QPixmapCache::Key &key) { + bool result = QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key); + //We release the key after we removed it from the cache releaseKey(key); - return QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key); + return result; } void QPMCache::resizeKeyArray(int size) diff --git a/src/gui/image/qpixmapdatafactory_p.h b/src/gui/image/qpixmapdatafactory_p.h index 65e3f11..9604346 100644 --- a/src/gui/image/qpixmapdatafactory_p.h +++ b/src/gui/image/qpixmapdatafactory_p.h @@ -65,7 +65,7 @@ QT_MODULE(Gui) class QPixmapData; -class Q_GUI_EXPORT QPixmapDataFactory +class QPixmapDataFactory { public: static QPixmapDataFactory* instance(int screen = 0); diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 8631c8c..4e6adc0 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -401,6 +401,7 @@ static void convolute( } yk++; } + delete[] fixedKernel; } /*! diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 6238df5..ad93922 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -1267,8 +1267,10 @@ void QHeaderView::setSortIndicator(int logicalIndex, Qt::SortOrder order) d->sortIndicatorSection = logicalIndex; d->sortIndicatorOrder = order; - if (logicalIndex >= d->sectionCount) + if (logicalIndex >= d->sectionCount) { + emit sortIndicatorChanged(logicalIndex, order); return; // nothing to do + } if (old != logicalIndex && ((logicalIndex >= 0 && resizeMode(logicalIndex) == ResizeToContents) diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 1071c1d..8b50d0e 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -1973,10 +1973,16 @@ void QListViewPrivate::prepareItemsLayout() int frameAroundContents = 0; if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) frameAroundContents = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2; - int verticalMargin = vbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : - q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents; - int horizontalMargin = hbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : - q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents; + + // maximumViewportSize() already takes scrollbar into account if policy is + // Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy + // is Qt::ScrollBarAsNeeded + int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded + ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents + : 0; + int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded + ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents + : 0; layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin); diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index 56925b8..96eb6f0 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -1539,7 +1539,8 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel) d->clear_mapping(); reset(); - d->update_source_sort_column(); + if (d->update_source_sort_column() && d->dynamic_sortfilter) + d->sort(); } /*! diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index d742698..7837700 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -246,7 +246,7 @@ void QTreeView::setModel(QAbstractItemModel *model) connect(d->model, SIGNAL(modelAboutToBeReset()), SLOT(_q_modelAboutToBeReset())); if (d->sortingEnabled) - sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); + d->_q_sortIndicatorChanged(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); } /*! @@ -844,17 +844,19 @@ void QTreeView::setExpanded(const QModelIndex &index, bool expanded) void QTreeView::setSortingEnabled(bool enable) { Q_D(QTreeView); - d->sortingEnabled = enable; header()->setSortIndicatorShown(enable); header()->setClickable(enable); if (enable) { - connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); + //sortByColumn has to be called before we connect or set the sortingEnabled flag + // because otherwise it will not call sort on the model. sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); + connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), + this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder)), Qt::UniqueConnection); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); } + d->sortingEnabled = enable; } bool QTreeView::isSortingEnabled() const diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index a366ed6..e89011f 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -194,7 +194,7 @@ QString qws_dataDir() static QString result; if (!result.isEmpty()) return result; - QByteArray dataDir = QString(QLatin1String("/tmp/qtembedded-%1")).arg(qws_display_id).toLocal8Bit(); + QByteArray dataDir = QString::fromLatin1("/tmp/qtembedded-%1").arg(qws_display_id).toLocal8Bit(); if (QT_MKDIR(dataDir, 0700)) { if (errno != EEXIST) { qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData()); @@ -215,7 +215,7 @@ QString qws_dataDir() if ((buf.st_mode & 0677) != 0600) qFatal("Qt for Embedded Linux data directory has incorrect permissions: %s", dataDir.constData()); #endif - dataDir += "/"; + dataDir += '/'; result = QString::fromLocal8Bit(dataDir); return result; @@ -224,7 +224,7 @@ QString qws_dataDir() // Get the filename of the pipe Qt for Embedded Linux uses for server/client comms Q_GUI_EXPORT QString qws_qtePipeFilename() { - return (qws_dataDir() + QString(QLatin1String(QTE_PIPE)).arg(qws_display_id)); + return (qws_dataDir() + QString::fromLatin1(QTE_PIPE).arg(qws_display_id)); } static void setMaxWindowRect(const QRect &rect) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 6f9abdb..72a9294 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -989,8 +989,8 @@ const QString qt_reg_winclass(QWidget *w) // register window class wchar_t uniqueAppID[256]; GetModuleFileNameW(0, uniqueAppID, 255); cname = QString::number(RegisterWindowMessageW( - (const wchar_t *) QString::fromUtf16((const ushort *)uniqueAppID).toLower().replace(QString(QString::fromLatin1("\\")), - QString(QString::fromLatin1("_"))).utf16())); + (const wchar_t *) QString::fromUtf16((const ushort *)uniqueAppID).toLower().replace(QLatin1Char('\\'), + QLatin1Char('_')).utf16())); #endif // since multiple Qt versions can be used in one process @@ -1140,7 +1140,7 @@ void qWinRequestConfig(WId id, int req, int x, int y, int w, int h) configRequests->append(r); // store request in queue } -Q_GUI_EXPORT void qWinProcessConfigRequests() // perform requests in queue +static void qWinProcessConfigRequests() // perform requests in queue { if (!configRequests) return; @@ -1686,20 +1686,23 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam // send the context menu event is a different one if (!alienWidget->testAttribute(Qt::WA_NativeWindow) && !alienWidget->testAttribute(Qt::WA_PaintOnScreen)) { alienWidget = QApplication::widgetAt(globalPos); - pos = alienWidget->mapFromGlobal(globalPos); + if (alienWidget) + pos = alienWidget->mapFromGlobal(globalPos); } - SHRGINFO shrg; - shrg.cbSize = sizeof(shrg); - shrg.hwndClient = hwnd; - shrg.ptDown.x = GET_X_LPARAM(lParam); - shrg.ptDown.y = GET_Y_LPARAM(lParam); - shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; - resolveAygLibs(); - if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { - if (qApp->activePopupWidget()) - qApp->activePopupWidget()->close(); - QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); - result = qt_sendSpontaneousEvent(alienWidget, &e); + if (alienWidget) { + SHRGINFO shrg; + shrg.cbSize = sizeof(shrg); + shrg.hwndClient = hwnd; + shrg.ptDown.x = GET_X_LPARAM(lParam); + shrg.ptDown.y = GET_Y_LPARAM(lParam); + shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION; + resolveAygLibs(); + if (ptrRecognizeGesture && (ptrRecognizeGesture(&shrg) == GN_CONTEXTMENU)) { + if (qApp->activePopupWidget()) + qApp->activePopupWidget()->close(); + QContextMenuEvent e(QContextMenuEvent::Mouse, pos, globalPos); + result = qt_sendSpontaneousEvent(alienWidget, &e); + } } } } diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 9a24645..2ca6a3d 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -90,6 +90,7 @@ QT_BEGIN_NAMESPACE extern void onApplicationChangedActivation(bool); // qapplication_mac.mm +extern void qt_release_apple_event_handler(); //qapplication_mac.mm QT_END_NAMESPACE QT_FORWARD_DECLARE_CLASS(QDesktopWidgetImplementation) @@ -207,7 +208,6 @@ static void cleanupCocoaApplicationDelegate() { Q_UNUSED(aNotification); inLaunch = false; - extern void qt_release_apple_event_handler(); //qapplication_mac.mm qt_release_apple_event_handler(); } diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 1cbc960..838f751 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -791,10 +791,22 @@ extern "C" { bool wheelOK = false; Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); + QWidget *widgetToGetMouse = qwidget; + if (widgetToGetMouse->testAttribute(Qt::WA_TransparentForMouseEvents)) { + // Simulate passing the event through since Cocoa doesn't do that for us. + // Start by building a tree up. + NSView *candidateView = [self viewUnderTransparentForMouseView:self + widget:widgetToGetMouse + withWindowPoint:windowPoint]; + if (candidateView != nil) { + widgetToGetMouse = QWidget::find(WId(candidateView)); + } + } + // Mouse wheel deltas seem to tick in at increments of 0.1. Qt widgets - // expect the delta to be a multiple of 120. + // expect the delta to be a multiple of 120. const int ScrollFactor = 10 * 120; - // The qMax(...) factor reduces the + // The qMax(...) factor reduces the // acceleration for large wheel deltas. int deltaX = [theEvent deltaX] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaX])); int deltaY = [theEvent deltaY] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaY])); @@ -802,10 +814,10 @@ extern "C" { if (deltaX != 0) { QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaX, buttons, keyMods, Qt::Horizontal); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); @@ -815,10 +827,10 @@ extern "C" { if (deltaY) { QWheelEvent qwe(qlocal, qglobal, deltaY, buttons, keyMods, Qt::Vertical); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaY, buttons, keyMods, Qt::Vertical); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); @@ -830,10 +842,10 @@ extern "C" { // Qt doesn't explicitly support wheels with a Z component. In a misguided attempt to // try to be ahead of the pack, I'm adding this extra value. QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); - qt_sendSpontaneousEvent(qwidget, &qwe); + qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); wheelOK = qwe.isAccepted(); if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != qwidget) { + && QApplicationPrivate::focus_widget != widgetToGetMouse) { QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 1d4e3e4..be4501f3 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -59,6 +59,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate); QT_FORWARD_DECLARE_CLASS(QWidget); QT_FORWARD_DECLARE_CLASS(QEvent); QT_FORWARD_DECLARE_CLASS(QCocoaDropData); +QT_FORWARD_DECLARE_CLASS(QStringList); QT_BEGIN_NAMESPACE struct DnDParams diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index ed7e020..598f4ba 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -375,7 +375,9 @@ void QCursorData::cleanup() return; for (int shape = 0; shape <= Qt::LastCursor; ++shape) { - delete qt_cursorTable[shape]; + // In case someone has a static QCursor defined with this shape + if (!qt_cursorTable[shape]->ref.deref()) + delete qt_cursorTable[shape]; qt_cursorTable[shape] = 0; } QCursorData::initialized = false; diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h index 7a0cb7a..9871658 100644 --- a/src/gui/kernel/qdnd_p.h +++ b/src/gui/kernel/qdnd_p.h @@ -202,7 +202,7 @@ public: #endif }; -class Q_GUI_EXPORT QDragManager: public QObject { +class QDragManager: public QObject { Q_OBJECT QDragManager(); diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index d1cb572..ee45969 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -145,7 +145,7 @@ static int qtkeyForMacSymbol(const QChar ch) #else static bool qt_sequence_no_mnemonics = false; #endif -void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; } +void Q_AUTOTEST_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemonics = !b; } /*! \class QKeySequence @@ -652,8 +652,6 @@ const uint QKeySequencePrivate::numberOfKeyBindings = sizeof(QKeySequencePrivate This enum represent standard key bindings. They can be used to assign platform dependent keyboard shortcuts to a QAction. - QKeyEvent also provides the function QKeyEvent::standardKey() to - query if it matches an existing key binding. Note that the key bindings are platform dependent. The currently bound shortcuts can be queried using keyBindings(). diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp index b2eeb5c..9cb8b61 100644 --- a/src/gui/kernel/qmime_mac.cpp +++ b/src/gui/kernel/qmime_mac.cpp @@ -218,7 +218,7 @@ QString QMacPasteboardMimeAny::flavorFor(const QString &mime) if(mime == QLatin1String("application/x-qt-mime-type-name")) return QString(); QString ret = QLatin1String("com.trolltech.anymime.") + mime; - return ret.replace(QLatin1String("/"), QLatin1String("--")); + return ret.replace(QLatin1Char('/'), QLatin1String("--")); } QString QMacPasteboardMimeAny::mimeFor(QString flav) @@ -394,7 +394,7 @@ QString QMacPasteboardMimeUnicodeText::flavorFor(const QString &mime) int i = mime.indexOf(QLatin1String("charset=")); if (i >= 0) { QString cs(mime.mid(i+8).toLower()); - i = cs.indexOf(QLatin1String(";")); + i = cs.indexOf(QLatin1Char(';')); if (i>=0) cs = cs.left(i); if (cs == QLatin1String("system")) diff --git a/src/gui/kernel/qmime_win.cpp b/src/gui/kernel/qmime_win.cpp index 109ce20..ad2dec1 100644 --- a/src/gui/kernel/qmime_win.cpp +++ b/src/gui/kernel/qmime_win.cpp @@ -1262,16 +1262,16 @@ QVector<FORMATETC> QLastResortMimes::formatsForMime(const QString &mimeType, con } return formatetcs; } -static const char *x_qt_windows_mime = "application/x-qt-windows-mime;value=\""; +static const char x_qt_windows_mime[] = "application/x-qt-windows-mime;value=\""; -bool isCustomMimeType(const QString &mimeType) +static bool isCustomMimeType(const QString &mimeType) { return mimeType.startsWith(QLatin1String(x_qt_windows_mime), Qt::CaseInsensitive); } -QString customMimeType(const QString &mimeType) +static QString customMimeType(const QString &mimeType) { - int len = QString(QLatin1String(x_qt_windows_mime)).length(); + int len = sizeof(x_qt_windows_mime) - 1; int n = mimeType.lastIndexOf(QLatin1Char('\"'))-len; return mimeType.mid(len, n); } diff --git a/src/gui/kernel/qsound_qws.cpp b/src/gui/kernel/qsound_qws.cpp index e83935f..661544f 100644 --- a/src/gui/kernel/qsound_qws.cpp +++ b/src/gui/kernel/qsound_qws.cpp @@ -279,7 +279,7 @@ QAuBucketQWS::QAuBucketQWS( QAuServerQWS *server, QSound *sound, QObject* parent sound->setObjectName( m_id.toString() ); - m_channel = new QCopChannel(QString( QLatin1String("QPE/QSound/") ).append( m_id ), this ); + m_channel = new QCopChannel(QLatin1String("QPE/QSound/") + m_id ), this ); connect( m_channel, SIGNAL(received(QString,QByteArray)), this, SLOT(processMessage(QString,QByteArray)) ); diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9165836..554e9d5 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -88,6 +88,52 @@ QT_BEGIN_NAMESPACE +Q_GLOBAL_STATIC(QMacWindowFader, macwindowFader); + +QMacWindowFader::QMacWindowFader() + : m_duration(0.250) +{ +} + +QMacWindowFader *QMacWindowFader::currentFader() +{ + return macwindowFader(); +} + +void QMacWindowFader::registerWindowToFade(QWidget *window) +{ + m_windowsToFade.append(window); +} + +void QMacWindowFader::performFade() +{ + const QWidgetList myWidgetsToFade = m_windowsToFade; + const int widgetCount = myWidgetsToFade.count(); +#if QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + [NSAnimationContext beginGrouping]; + [[NSAnimationContext currentContext] setDuration:NSTimeInterval(m_duration)]; +#endif + + for (int i = 0; i < widgetCount; ++i) { + QWidget *widget = m_windowsToFade.at(i); + OSWindowRef window = qt_mac_window_for(widget); +#if QT_MAC_USE_COCOA + [[window animator] setAlphaValue:0.0]; + QTimer::singleShot(qRound(m_duration * 1000), widget, SLOT(hide())); +#else + TransitionWindowOptions options = {0, m_duration, 0, 0}; + TransitionWindowWithOptions(window, kWindowFadeTransitionEffect, kWindowHideTransitionAction, + 0, 1, &options); +#endif + } +#if QT_MAC_USE_COCOA + [NSAnimationContext endGrouping]; +#endif + m_duration = 0.250; + m_windowsToFade.clear(); +} + extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QWidget * mac_mouse_grabber; @@ -95,29 +141,26 @@ extern QWidget * mac_mouse_grabber; void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { OSWindowRef wnd = static_cast<OSWindowRef>(window); - if( wnd ) { + if (wnd) { + QWidget *widget; #if QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - [NSAnimationContext beginGrouping]; - [[wnd animator] setAlphaValue:0.0]; - if (durationSeconds > 0) { - [[NSAnimationContext currentContext] setDuration:NSTimeInterval(durationSeconds)]; - } else { - durationSeconds = [[NSAnimationContext currentContext] duration]; - } - [NSAnimationContext endGrouping]; - QTimer::singleShot(qRound(durationSeconds * 1000), [wnd QT_MANGLE_NAMESPACE(qt_qwidget)], SLOT(hide())); + widget = [wnd QT_MANGLE_NAMESPACE(qt_qwidget)]; #else - if (durationSeconds <= 0) - durationSeconds = 0.15; - TransitionWindowOptions options = {0, durationSeconds, 0, 0}; - TransitionWindowWithOptions(wnd, kWindowFadeTransitionEffect, kWindowHideTransitionAction, 0, 1, &options); + const UInt32 kWidgetCreatorQt = kEventClassQt; + enum { + kWidgetPropertyQWidget = 'QWId' //QWidget * + }; + if (GetWindowProperty(static_cast<WindowRef>(window), kWidgetCreatorQt, kWidgetPropertyQWidget, sizeof(widget), 0, &widget) != noErr) + widget = 0; #endif - } + if (widget) { + QMacWindowFader::currentFader()->setFadeDuration(durationSeconds); + QMacWindowFader::currentFader()->registerWindowToFade(widget); + QMacWindowFader::currentFader()->performFade(); + } + } } - - bool macWindowIsTextured( void * /*OSWindowRef*/ window ) { OSWindowRef wnd = static_cast<OSWindowRef>(window); diff --git a/src/gui/kernel/qt_mac_p.h b/src/gui/kernel/qt_mac_p.h index ca995dc..3b0f546 100644 --- a/src/gui/kernel/qt_mac_p.h +++ b/src/gui/kernel/qt_mac_p.h @@ -120,6 +120,21 @@ public: } }; +// Class for chaining to gether a bunch of fades. It pretty much is only used for qmenu fading. +class QMacWindowFader +{ + QWidgetList m_windowsToFade; + float m_duration; + Q_DISABLE_COPY(QMacWindowFader) +public: + QMacWindowFader(); // PLEASE DON'T CALL THIS. + static QMacWindowFader *currentFader(); + void registerWindowToFade(QWidget *window); + void setFadeDuration(float durationInSecs) { m_duration = durationInSecs; } + float fadeDuration() const { return m_duration; } + void performFade(); +}; + class Q_GUI_EXPORT QMacCocoaAutoReleasePool { private: diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 486e145..59bb600 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -9213,11 +9213,12 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) d->resolveLayoutDirection(); d->resolveLocale(); - // Note: GL widgets under Windows will always need a ParentChange - // event to handle recreation/rebinding of the GL context, hence - // the (f & Qt::MSWindowsOwnDC) clause + // Note: GL widgets under WGL or EGL will always need a ParentChange + // event to handle recreation/rebinding of the GL context, hence the + // (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all + // platforms). if (newParent -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) || defined(QT_OPENGL_ES) || (f & Qt::MSWindowsOwnDC) #endif ) { diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index b35740a..7e41ea1 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -893,15 +893,28 @@ void QWidgetPrivate::x11UpdateIsOpaque() int screen = xinfo.screen(); if (topLevel && X11->use_xrender && X11->argbVisuals[screen] && xinfo.depth() != 32) { - // recreate widget - QPoint pos = q->pos(); - bool visible = q->isVisible(); - if (visible) - q->hide(); - q->setParent(q->parentWidget(), q->windowFlags()); - q->move(pos); - if (visible) - q->show(); + + if (q->inherits("QGLWidget")) { + // We send QGLWidgets a ParentChange event which causes them to + // recreate their GL context, which in turn causes them to choose + // their visual again. Now that WA_TranslucentBackground is set, + // QGLContext::chooseVisual will select an ARGB visual. + QEvent e(QEvent::ParentChange); + QApplication::sendEvent(q, &e); + } + else { + // For regular widgets, reparent them with their parent which + // also triggers a recreation of the native window + QPoint pos = q->pos(); + bool visible = q->isVisible(); + if (visible) + q->hide(); + + q->setParent(q->parentWidget(), q->windowFlags()); + q->move(pos); + if (visible) + q->show(); + } } #endif } diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index 7ed521e..6a206ee 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -673,10 +673,10 @@ static int IntersectBB(const QBezier &a, const QBezier &b) #ifdef QDEBUG_BEZIER static QDebug operator<<(QDebug dbg, const QBezier &bz) { - dbg <<"["<<bz.x1<<", "<<bz.y1<<"], " - <<"["<<bz.x2<<", "<<bz.y2<<"], " - <<"["<<bz.x3<<", "<<bz.y3<<"], " - <<"["<<bz.x4<<", "<<bz.y4<<"]"; + dbg << '[' << bz.x1<< ", " << bz.y1 << "], " + << '[' << bz.x2 <<", " << bz.y2 << "], " + << '[' << bz.x3 <<", " << bz.y3 << "], " + << '[' << bz.x4 <<", " << bz.y4 << ']'; return dbg; } #endif diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 8f4a2bf..4bdaf0b 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -104,6 +104,37 @@ struct Blend_RGB16_on_RGB16_ConstAlpha { quint32 m_ialpha; }; +struct Blend_ARGB24_on_RGB16_SourceAlpha { + inline void write(quint16 *dst, const qargb8565 &src) { + const uint alpha = src.alpha(); + if (alpha) { + quint16 s = src.rawValue16(); + if (alpha < 255) + s += BYTE_MUL_RGB16(*dst, 255 - alpha); + *dst = s; + } + } +}; + +struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha { + inline Blend_ARGB24_on_RGB16_SourceAndConstAlpha(quint32 alpha) { + m_alpha = (alpha * 255) >> 8; + } + + inline void write(quint16 *dst, qargb8565 src) { + src = src.byte_mul(src.alpha(m_alpha)); + const uint alpha = src.alpha(); + if (alpha) { + quint16 s = src.rawValue16(); + if (alpha < 255) + s += BYTE_MUL_RGB16(*dst, 255 - alpha); + *dst = s; + } + } + + quint32 m_alpha; +}; + struct Blend_ARGB32_on_RGB16_SourceAlpha { inline void write(quint16 *dst, quint32 src) { const quint8 alpha = qAlpha(src); @@ -237,6 +268,32 @@ void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, } } +void qt_scale_image_argb24_on_rgb16(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + const QRectF &targetRect, + const QRectF &sourceRect, + const QRect &clip, + int const_alpha) +{ +#ifdef QT_DEBUG_DRAW + printf("qt_scale_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n", + destPixels, dbpl, srcPixels, sbpl, + targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), + sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(), + const_alpha); +#endif + if (const_alpha == 256) { + Blend_ARGB24_on_RGB16_SourceAlpha noAlpha; + qt_scale_image_16bit<qargb8565>(destPixels, dbpl, srcPixels, sbpl, + targetRect, sourceRect, clip, noAlpha); + } else { + Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha); + qt_scale_image_16bit<qargb8565>(destPixels, dbpl, srcPixels, sbpl, + targetRect, sourceRect, clip, constAlpha); + } +} + + void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, @@ -874,7 +931,7 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = 0, // Format_ARGB32, qt_scale_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied, qt_scale_image_rgb16_on_rgb16, // Format_RGB16, - 0, // Format_ARGB8565_Premultiplied, + qt_scale_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied, 0, // Format_RGB666, 0, // Format_ARGB6666_Premultiplied, 0, // Format_RGB555, diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 6b58f14..b1fe3aa 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -2241,4 +2241,12 @@ QDataStream &operator>>(QDataStream &stream, QColor &color) \sa QColor::rgb(), QColor::rgba() */ +/*! \fn void QColormap::initialize() + \internal +*/ + +/*! \fn void QColormap::cleanup() + \internal +*/ + QT_END_NAMESPACE diff --git a/src/gui/painting/qcolormap_x11.cpp b/src/gui/painting/qcolormap_x11.cpp index ccf6955..c9186b1 100644 --- a/src/gui/painting/qcolormap_x11.cpp +++ b/src/gui/painting/qcolormap_x11.cpp @@ -337,8 +337,6 @@ static void init_direct(QColormapPrivate *d, bool ownColormap) static QColormap **cmaps = 0; -/*! \internal -*/ void QColormap::initialize() { Display *display = QX11Info::display(); @@ -578,8 +576,6 @@ void QColormap::initialize() } } -/*! \internal -*/ void QColormap::cleanup() { Display *display = QX11Info::display(); diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 019402a..38fee8d 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -447,6 +447,7 @@ public: inline bool operator==(const qargb8565 &v) const; inline quint32 rawValue() const; + inline quint16 rawValue16() const; private: friend class qrgb565; @@ -463,7 +464,7 @@ public: inline explicit qrgb565(quint32p v); inline explicit qrgb565(quint32 v); - inline explicit qrgb565(qargb8565 v); + inline explicit qrgb565(const qargb8565 &v); inline operator quint32() const; inline operator quint16() const; @@ -569,6 +570,11 @@ quint32 qargb8565::rawValue() const return (data[2] << 16) | (data[1] << 8) | data[0]; } +quint16 qargb8565::rawValue16() const +{ + return (data[2] << 8) | data[1]; +} + qrgb565::qrgb565(quint32p v) { *this = qrgb565(quint32(v)); @@ -583,7 +589,7 @@ qrgb565::qrgb565(quint32 v) data = (r & 0xf800) | (g & 0x07e0)| (b & 0x001f); } -qrgb565::qrgb565(qargb8565 v) +qrgb565::qrgb565(const qargb8565 &v) { data = (v.data[2] << 8) | v.data[1]; } diff --git a/src/gui/painting/qgraphicssystemfactory_p.h b/src/gui/painting/qgraphicssystemfactory_p.h index 9e95324..523b908 100644 --- a/src/gui/painting/qgraphicssystemfactory_p.h +++ b/src/gui/painting/qgraphicssystemfactory_p.h @@ -63,7 +63,7 @@ QT_MODULE(Gui) class QGraphicsSystem; -class Q_GUI_EXPORT QGraphicsSystemFactory +class QGraphicsSystemFactory { public: static QStringList keys(); diff --git a/src/gui/painting/qgraphicssystemplugin_p.h b/src/gui/painting/qgraphicssystemplugin_p.h index 2e70333..ea7aa2d 100644 --- a/src/gui/painting/qgraphicssystemplugin_p.h +++ b/src/gui/painting/qgraphicssystemplugin_p.h @@ -64,7 +64,7 @@ QT_MODULE(Gui) class QGraphicsSystem; -struct Q_GUI_EXPORT QGraphicsSystemFactoryInterface : public QFactoryInterface +struct QGraphicsSystemFactoryInterface : public QFactoryInterface { virtual QGraphicsSystem *create(const QString &key) = 0; }; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 93e0db0..3f85095 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -6204,7 +6204,7 @@ void dumpClip(int width, int height, QClipData *clip) Q_ASSERT(x1 >= 0); fprintf(stderr,"clip %d: %d %d - %d %d\n", counter, x0, y0, x1, y1); - clipImg.save(QString(QLatin1String("clip-%0.png")).arg(counter++)); + clipImg.save(QString::fromLatin1("clip-%0.png").arg(counter++)); } #endif diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 262a033..bd91dfc 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2751,7 +2751,7 @@ qreal QPainterPath::length() const /*! Returns percentage of the whole path at the specified length \a len. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2868,7 +2868,7 @@ static inline QBezier bezierAtT(const QPainterPath &path, qreal t, qreal *starti Returns the point at at the percentage \a t of the current path. The argument \a t has to be between 0 and 1. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2899,7 +2899,7 @@ QPointF QPainterPath::pointAtPercent(qreal t) const Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position. - Note that similarly to the other percent methods, the percentage measurment + Note that similarly to the other percent methods, the percentage measurement is not linear with regards to the length if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. @@ -2931,7 +2931,7 @@ qreal QPainterPath::angleAtPercent(qreal t) const Returns the slope of the path at the percentage \a t. The argument \a t has to be between 0 and 1. - Note that similarly to other percent methods, the percentage measurment + Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations. diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp index 0f33ea7..5724173 100644 --- a/src/gui/painting/qprinterinfo_unix.cpp +++ b/src/gui/painting/qprinterinfo_unix.cpp @@ -822,7 +822,7 @@ QList<QPrinterInfo> QPrinterInfo::availablePrinters() for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); list.append(QPrinterInfo(printerName)); if (cupsPrinters[i].is_default) list[i].d_ptr->m_default = true; @@ -893,7 +893,7 @@ QPrinterInfo::QPrinterInfo(const QPrinter& printer) for (int i = 0; i < cupsPrinterCount; ++i) { QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name)); if (cupsPrinters[i].instance) - printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance); + printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance); if (printerName == printer.printerName()) { if (cupsPrinters[i].is_default) d->m_default = true; diff --git a/src/gui/painting/qtessellator.cpp b/src/gui/painting/qtessellator.cpp index b743940..9b5efee 100644 --- a/src/gui/painting/qtessellator.cpp +++ b/src/gui/painting/qtessellator.cpp @@ -1273,7 +1273,7 @@ QRectF QTessellator::tessellate(const QPointF *points, int nPoints) << "p0= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v0->x) << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v0->y) << ") p1= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v1->x) - << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ")" + << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ')' << "x=" << Q27Dot5ToDouble(d->scanline.edges[i]->positionAt(d->y)) << "isLeftOfNext=" << ((i < d->scanline.size - 1) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 3fd1ffb..89df869 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -92,8 +92,8 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti, int glyph_height = metrics.height.ceil().toInt(); if (glyph_height == 0 || glyph_width == 0) continue; - glyph_width += margin * 2 + 2; - glyph_height += margin * 2 + 2; + glyph_width += margin * 2 + 4; + glyph_height += margin * 2 + 4; // align to 8-bit boundary if (m_type == QFontEngineGlyphCache::Raster_Mono) glyph_width = (glyph_width+7)&~7; @@ -189,7 +189,11 @@ void QImageTextureGlyphCache::createTextureData(int width, int height) int QImageTextureGlyphCache::glyphMargin() const { +#ifdef Q_WS_MAC return 2; +#else + return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0; +#endif } void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g) diff --git a/src/gui/painting/qwindowsurface_x11.cpp b/src/gui/painting/qwindowsurface_x11.cpp index 9e8b498..f29d627 100644 --- a/src/gui/painting/qwindowsurface_x11.cpp +++ b/src/gui/painting/qwindowsurface_x11.cpp @@ -128,7 +128,7 @@ void QX11WindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint return; // qDebug() << "XSetClipRectangles"; // for (int i = 0; i < num; ++i) -// qDebug() << " " << i << rects[i].x << rects[i].x << rects[i].y << rects[i].width << rects[i].height; +// qDebug() << ' ' << i << rects[i].x << rects[i].x << rects[i].y << rects[i].width << rects[i].height; XSetClipRectangles(X11->display, gc, 0, 0, rects, num, YXBanded); XCopyArea(X11->display, d_ptr->device.handle(), widget->handle(), gc, br.x() + offset.x(), br.y() + offset.y(), br.width(), br.height(), wbr.x(), wbr.y()); diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index 07cec93..f92fd0e 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -374,8 +374,8 @@ static QString getThemeName() while(!in.atEnd()) { QString line = in.readLine(); if (line.contains(QLS("gtk-theme-name"))) { - line = line.right(line.length() - line.indexOf(QLS("=")) - 1); - line.remove(QLS("\"")); + line = line.right(line.length() - line.indexOf(QLatin1Char('=')) - 1); + line.remove(QLatin1Char('\"')); line = line.trimmed(); themeName = line; break; @@ -695,7 +695,7 @@ void QGtk::initGtkWidgets() QHashIterator<QString, GtkWidget*> it(oldMap); while (it.hasNext()) { it.next(); - if (!it.key().contains(QLS("."))) { + if (!it.key().contains(QLatin1Char('.'))) { add_all_sub_widgets(it.value()); } } diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 86653df..151dab0 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -940,10 +940,6 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_FrameLineEdit: { GtkWidget *gtkEntry = QGtk::gtkWidget(QLS("GtkEntry")); - if (option->state & State_HasFocus) - GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - else - GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); gboolean interior_focus; gint focus_line_width; @@ -957,6 +953,9 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, if (!interior_focus && option->state & State_HasFocus) rect.adjust(focus_line_width, focus_line_width, -focus_line_width, -focus_line_width); + + if (option->state & State_HasFocus) + GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); gtkPainter.paintShadow(gtkEntry, "entry", rect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, gtkEntry->style, @@ -965,6 +964,9 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, gtkPainter.paintShadow(gtkEntry, "entry", option->rect, option->state & State_Enabled ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, gtkEntry->style, QLS("GtkEntryShadowIn")); + + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); } break; @@ -1050,17 +1052,13 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, GTK_WIDGET_SET_FLAGS(gtkButton, GTK_HAS_DEFAULT); gtkPainter.paintBox(gtkButton, "buttondefault", buttonRect, state, GTK_SHADOW_IN, style, isDefault ? QLS("d") : QString()); - } else - GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_DEFAULT); + } bool hasFocus = option->state & State_HasFocus; if (hasFocus) { key += QLS("def"); GTK_WIDGET_SET_FLAGS(gtkButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_FOCUS); } if (!interiorFocus) @@ -1071,6 +1069,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, gtkPainter.paintBox(gtkButton, "button", buttonRect, state, shadow, style, key); + if (isDefault) + GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_DEFAULT); + if (hasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkButton, GTK_HAS_FOCUS); } break; @@ -1334,6 +1336,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GtkWidget *gtkToggleButton = QGtk::gtkWidget(buttonPath); QGtk::gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); if (gtkToggleButton && (appears_as_list || comboBox->editable)) { + if (focus) + GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); // Draw the combo box as a line edit with a button next to it if (comboBox->editable || appears_as_list) { GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state; @@ -1347,22 +1351,16 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else frameRect.setRight(arrowButtonRect.left()); - // Required for inner blue highlight with clearlooks - if (focus) { - GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); - GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - } - // Fill the line edit background // We could have used flat_box with "entry_bg" but that is probably not worth the overhead uint resolve_mask = option->palette.resolve(); int xt = gtkEntry->style->xthickness; int yt = gtkEntry->style->ythickness; QRect contentRect = frameRect.adjusted(xt, yt, -xt, -yt); + // Required for inner blue highlight with clearlooks + if (focus) + GTK_WIDGET_SET_FLAGS(gtkEntry, GTK_HAS_FOCUS); + if (widget && widget->testAttribute(Qt::WA_SetPalette) && resolve_mask & (1 << QPalette::Base)) // Palette overridden by user p->fillRect(contentRect, option->palette.base().color()); @@ -1376,6 +1374,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GTK_SHADOW_IN, gtkEntry->style, entryPath + QString::number(focus) + QString::number(comboBox->editable) + QString::number(option->direction)); + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkEntry, GTK_HAS_FOCUS); } GtkStateType buttonState = GTK_STATE_NORMAL; @@ -1394,22 +1394,21 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState, shadow, gtkToggleButton->style, buttonPath + QString::number(focus) + QString::number(option->direction)); - + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); } else { // Draw combo box as a button QRect buttonRect = option->rect; - if (focus) { // Clearlooks actually check the widget for the default state + if (focus) // Clearlooks actually check the widget for the default state GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - - } else { - GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - } - gtkCachedPainter.paintBox(gtkToggleButton, "button", buttonRect, state, shadow, gtkToggleButton->style, buttonPath + QString::number(focus)); + if (focus) + GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); + // Draw the separator between label and arrows QString vSeparatorPath = buttonPath + QLS(".GtkHBox.GtkVSeparator"); @@ -1775,15 +1774,13 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom shadow = GTK_SHADOW_IN; style = gtkPainter.getStyle(gtkSpinButton); - if (option->state & State_HasFocus) - GTK_WIDGET_SET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); - else - GTK_WIDGET_UNSET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); QString key; - if (option->state & State_HasFocus) - key = QLS("f"); + if (option->state & State_HasFocus) { + key += QLatin1Char('f'); + GTK_WIDGET_SET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); + } uint resolve_mask = option->palette.resolve(); @@ -1816,6 +1813,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkPainter.paintBox( gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, style, key); else gtkPainter.paintBox( gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, style, key); + + if (option->state & State_HasFocus) + GTK_WIDGET_UNSET_FLAGS(gtkSpinButton, GTK_HAS_FOCUS); } if (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) { @@ -2344,7 +2344,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_SizeGrip: { GtkWidget *gtkStatusbar = QGtk::gtkWidget(QLS("GtkStatusbar.GtkFrame")); QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbar->style->xthickness, -gtkStatusbar->style->ythickness); - gtkPainter.paintResizeGrip( gtkStatusbar, "window", gripRect, GTK_STATE_NORMAL, + gtkPainter.paintResizeGrip( gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, QApplication::isRightToLeft() ? GDK_WINDOW_EDGE_SOUTH_WEST : GDK_WINDOW_EDGE_SOUTH_EAST, gtkStatusbar->style); diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 1231561..9a8f97e 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -2702,14 +2702,10 @@ void QStyleSheetStyle::polish(QWidget *w) QRenderRule rule = renderRule(sa, PseudoElement_None, PseudoClass_Enabled); if ((rule.hasBorder() && rule.border()->hasBorderImage()) || (rule.hasBackground() && !rule.background()->pixmap.isNull())) { - QObject::disconnect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); - QObject::disconnect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); QObject::connect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); QObject::connect(sa->verticalScrollBar(), SIGNAL(valueChanged(int)), - sa, SLOT(update())); + sa, SLOT(update()), Qt::UniqueConnection); } } #endif @@ -5082,9 +5078,12 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi #ifndef QT_NO_COMBOBOX if (qobject_cast<const QComboBox *>(w)) { QAbstractItemView *view = qFindChild<QAbstractItemView *>(w); - QRenderRule subRule = renderRule(view, PseudoElement_None); - if (subRule.hasBox() || !subRule.hasNativeBorder()) - return QFrame::NoFrame; + if (view) { + view->ensurePolished(); + QRenderRule subRule = renderRule(view, PseudoElement_None); + if (subRule.hasBox() || !subRule.hasNativeBorder()) + return QFrame::NoFrame; + } } #endif // QT_NO_COMBOBOX break; diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index f73ffb5..c5096bf 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1897,6 +1897,20 @@ void QFont::insertSubstitutions(const QString &familyName, } } +/*! \fn void QFont::initialize() + \internal + + Internal function that initializes the font system. The font cache + and font dict do not alloc the keys. The key is a QString which is + shared between QFontPrivate and QXFontName. +*/ + +/*! \fn void QFont::cleanup() + \internal + + Internal function that cleans up the font system. +*/ + // ### mark: should be called removeSubstitutions() /*! Removes all the substitutions for \a familyName. diff --git a/src/gui/text/qfont_x11.cpp b/src/gui/text/qfont_x11.cpp index 710792c..6b0e46c 100644 --- a/src/gui/text/qfont_x11.cpp +++ b/src/gui/text/qfont_x11.cpp @@ -129,13 +129,6 @@ Q_GUI_EXPORT void qt_x11_set_fallback_font_family(int script, const QString &fam int QFontPrivate::defaultEncodingID = -1; -/*! - Internal function that initializes the font system. - - \internal - The font cache and font dict do not alloc the keys. The key is a QString - which is shared between QFontPrivate and QXFontName. -*/ void QFont::initialize() { extern int qt_encoding_id_for_mib(int mib); // from qfontdatabase_x11.cpp @@ -184,10 +177,6 @@ void QFont::initialize() QFontPrivate::defaultEncodingID = qt_encoding_id_for_mib(mib); } -/*! \internal - - Internal function that cleans up the font system. -*/ void QFont::cleanup() { QFontCache::cleanup(); diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp index f62a6d1..9a29de2 100644 --- a/src/gui/text/qfontdatabase_qws.cpp +++ b/src/gui/text/qfontdatabase_qws.cpp @@ -767,8 +767,8 @@ QFontEngine *loadSingleEngine(int script, const QFontPrivate *fp, QString fn = qwsFontPath(); fn += QLatin1Char('/'); fn += family->name.toLower() - + QLatin1String("_") + QString::number(pixelSize*10) - + QLatin1String("_") + QString::number(style->key.weight) + + QLatin1Char('_') + QString::number(pixelSize*10) + + QLatin1Char('_') + QString::number(style->key.weight) + (style->key.style == QFont::StyleItalic ? QLatin1String("i.qpf") : QLatin1String(".qpf")); //###rotation ### diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index 70e1599..605a7dd 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -509,9 +509,9 @@ bool qt_fillFontDef(const QByteArray &xlfd, QFontDef *fd, int dpi, QtFontDesc *d fd->styleStrategy |= QFont::NoAntialias; fd->family = QString::fromLatin1(tokens[Family]); QString foundry = QString::fromLatin1(tokens[Foundry]); - if (! foundry.isEmpty() && foundry != QString::fromLatin1("*") && (!desc || desc->family->count > 1)) + if (! foundry.isEmpty() && foundry != QLatin1String("*") && (!desc || desc->family->count > 1)) fd->family += - QString::fromLatin1(" [") + foundry + QString::fromLatin1("]"); + QLatin1String(" [") + foundry + QLatin1Char(']'); if (qstrlen(tokens[AddStyle]) > 0) fd->addStyle = QString::fromLatin1(tokens[AddStyle]); @@ -1802,30 +1802,30 @@ QFontEngine *QFontDatabase::loadXlfd(int screen, int script, const QFontDef &req QByteArray xlfd("-"); xlfd += desc.foundry->name.isEmpty() ? QByteArray("*") : desc.foundry->name.toLatin1(); - xlfd += "-"; + xlfd += '-'; xlfd += desc.family->name.isEmpty() ? QByteArray("*") : desc.family->name.toLatin1(); - xlfd += "-"; + xlfd += '-'; xlfd += desc.style->weightName ? desc.style->weightName : "*"; - xlfd += "-"; + xlfd += '-'; xlfd += (desc.style->key.style == QFont::StyleItalic - ? "i" - : (desc.style->key.style == QFont::StyleOblique ? "o" : "r")); - xlfd += "-"; + ? 'i' + : (desc.style->key.style == QFont::StyleOblique ? 'o' : 'r')); + xlfd += '-'; xlfd += desc.style->setwidthName ? desc.style->setwidthName : "*"; // ### handle add-style xlfd += "-*-"; xlfd += QByteArray::number(px); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->xpoint); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->xres); - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->yres); - xlfd += "-"; + xlfd += '-'; xlfd += desc.encoding->pitch; - xlfd += "-"; + xlfd += '-'; xlfd += QByteArray::number(desc.encoding->avgwidth); - xlfd += "-"; + xlfd += '-'; xlfd += xlfd_for_id(desc.encoding->encoding); FM_DEBUG(" using XLFD: %s\n", xlfd.data()); diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 97cb1ed..6e8adcf 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1646,12 +1646,6 @@ bool QFontEngineMulti::canRender(const QChar *string, int len) return allExist; } -QFontEngine *QFontEngineMulti::engine(int at) const -{ - Q_ASSERT(at < engines.size()); - return engines.at(at); -} - QImage QFontEngineMulti::alphaMapForGlyph(glyph_t) { Q_ASSERT(false); diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 6f5ee1f..a93c391 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -54,8 +54,6 @@ #include <private/qpdf_p.h> #include <private/qharfbuzz_p.h> -#include <private/qpdf_p.h> - #include "qfontengine_ft_p.h" #include <ft2build.h> #include FT_FREETYPE_H diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 92efb6c..0f8d81c 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -353,7 +353,7 @@ private: int _size; }; -class Q_GUI_EXPORT QFontEngineMulti : public QFontEngine +class QFontEngineMulti : public QFontEngine { public: explicit QFontEngineMulti(int engineCount); @@ -389,7 +389,9 @@ public: inline virtual const char *name() const { return "Multi"; } - QFontEngine *engine(int at) const; + QFontEngine *engine(int at) const + {Q_ASSERT(at < engines.size()); return engines.at(at); } + protected: friend class QPSPrintEnginePrivate; diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index b7d1c59..8222b7f 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -308,7 +308,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng readOnly = true; #if defined(DEBUG_FONTENGINE) - qDebug() << "QFontEngineQPF::QFontEngineQPF( fd =" << fd << ", renderingFontEngine =" << renderingFontEngine << ")"; + qDebug() << "QFontEngineQPF::QFontEngineQPF( fd =" << fd << ", renderingFontEngine =" << renderingFontEngine << ')'; #endif #ifndef QT_FONTS_ARE_RESOURCES @@ -316,9 +316,9 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng if (!renderingFontEngine) return; - fileName = fontDef.family.toLower() + QLatin1String("_") + fileName = fontDef.family.toLower() + QLatin1Char('_') + QString::number(fontDef.pixelSize) - + QLatin1String("_") + QString::number(fontDef.weight) + + QLatin1Char('_') + QString::number(fontDef.weight) + (fontDef.style != QFont::StyleNormal ? QLatin1String("_italic") : QLatin1String("")) + QLatin1String(".qsf"); @@ -550,7 +550,7 @@ bool QFontEngineQPF::stringToCMap(const QChar *str, int len, QGlyphLayout *glyph #if 0 && defined(DEBUG_FONTENGINE) QChar c(uc); if (!findGlyph(glyphs[glyph_pos].glyph) && !seenGlyphs.contains(c)) - qDebug() << "glyph for character" << c << "/" << hex << uc << "is" << dec << glyphs[glyph_pos].glyph; + qDebug() << "glyph for character" << c << '/' << hex << uc << "is" << dec << glyphs[glyph_pos].glyph; seenGlyphs.insert(c); #endif diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index feea1f2..002e670 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -1406,8 +1406,8 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin #endif #endif - QNativeImage *ni = new QNativeImage(iw + 2 * margin + 2, - ih + 2 * margin + 2, + QNativeImage *ni = new QNativeImage(iw + 2 * margin + 4, + ih + 2 * margin + 4, QNativeImage::systemFormat(), true); ni->image.fill(0xffffffff); @@ -1449,7 +1449,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform) font = CreateFontIndirectW(&lf); } - QNativeImage *mask = drawGDIGlyph(font, glyph, 2, xform); + QNativeImage *mask = drawGDIGlyph(font, glyph, 0, xform); if (mask == 0) return QImage(); diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp index 0972b2b..bafc99d 100644 --- a/src/gui/text/qfontengine_x11.cpp +++ b/src/gui/text/qfontengine_x11.cpp @@ -227,7 +227,7 @@ static QFontEngine::FaceId fontFile(const QByteArray &_xname, QFreetypeFace **fr QByteArray best_mapping; for (QStringList::ConstIterator it = fontpath.constBegin(); it != fontpath.constEnd(); ++it) { - if ((*it).left(1) != QLatin1String("/")) + if (!(*it).startsWith(QLatin1Char('/'))) continue; // not a path name, a font server QString fontmapname; int num = 0; @@ -693,9 +693,8 @@ QFontEngine::FaceId QFontEngineXLFD::faceId() const if (freetype) { const_cast<QFontEngineXLFD *>(this)->fsType = freetype->fsType(); } else { - QFontEngine::Properties properties = QFontEngine::properties(); face_id.index = 0; - face_id.filename = "-" + properties.postscriptName; + face_id.filename = '-' + QFontEngine::properties().postscriptName; } } #endif diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index 88d0610..87da628 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -670,8 +670,8 @@ QRect QFontMetrics::boundingRect(const QString &text) const Returns the rectangle that is covered by ink if character \a ch were to be drawn at the origin of the coordinate system. - Note that the bounding rectangle may extend to the left of (0, 0), - e.g. for italicized fonts, and that the text output may cover \e + Note that the bounding rectangle may extend to the left of (0, 0) + (e.g., for italicized fonts), and that the text output may cover \e all pixels in the bounding rectangle. For a space character the rectangle will usually be empty. @@ -724,7 +724,7 @@ QRect QFontMetrics::boundingRect(QChar ch) const \o Qt::AlignCenter (== \c{Qt::AlignHCenter | Qt::AlignVCenter}) \o Qt::TextSingleLine ignores newline characters in the text. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordWrap breaks the text to fit the rectangle. \endlist @@ -781,7 +781,7 @@ QRect QFontMetrics::boundingRect(const QRect &rect, int flags, const QString &te \list \o Qt::TextSingleLine ignores newline characters. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordBreak breaks the text to fit the rectangle. \endlist @@ -1500,7 +1500,7 @@ QRectF QFontMetricsF::boundingRect(QChar ch) const \o Qt::AlignCenter (== \c{Qt::AlignHCenter | Qt::AlignVCenter}) \o Qt::TextSingleLine ignores newline characters in the text. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordWrap breaks the text to fit the rectangle. \endlist @@ -1559,7 +1559,7 @@ QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString& \list \o Qt::TextSingleLine ignores newline characters. \o Qt::TextExpandTabs expands tabs (see below) - \o Qt::TextShowMnemonic interprets "&x" as \underline{x}, i.e. underlined. + \o Qt::TextShowMnemonic interprets "&x" as \underline{x}; i.e., underlined. \o Qt::TextWordBreak breaks the text to fit the rectangle. \endlist diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h index e50540a..4dac4f7 100644 --- a/src/gui/text/qtextcontrol_p.h +++ b/src/gui/text/qtextcontrol_p.h @@ -83,7 +83,7 @@ class QAbstractScrollArea; class QEvent; class QTimerEvent; -class Q_GUI_EXPORT QTextControl : public QObject +class Q_AUTOTEST_EXPORT QTextControl : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QTextControl) diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index d12e3fe..b9e1c89 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1361,12 +1361,15 @@ void QTextCursor::deleteChar() if (!d || !d->priv) return; - if (d->position == d->anchor) { - if (!d->canDelete(d->position)) - return; - d->adjusted_anchor = d->anchor = - d->priv->nextCursorPosition(d->anchor, QTextLayout::SkipCharacters); + if (d->position != d->anchor) { + removeSelectedText(); + return; } + + if (!d->canDelete(d->position)) + return; + d->adjusted_anchor = d->anchor = + d->priv->nextCursorPosition(d->anchor, QTextLayout::SkipCharacters); d->remove(); d->setX(); } @@ -1381,27 +1384,29 @@ void QTextCursor::deletePreviousChar() { if (!d || !d->priv) return; - - if (d->position == d->anchor) { - if (d->anchor < 1 || !d->canDelete(d->anchor-1)) - return; - d->anchor--; - - QTextDocumentPrivate::FragmentIterator fragIt = d->priv->find(d->anchor); - const QTextFragmentData * const frag = fragIt.value(); - int fpos = fragIt.position(); - QChar uc = d->priv->buffer().at(d->anchor - fpos + frag->stringPosition); - if (d->anchor > fpos && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { - // second half of a surrogate, check if we have the first half as well, - // if yes delete both at once - uc = d->priv->buffer().at(d->anchor - 1 - fpos + frag->stringPosition); - if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) - --d->anchor; - } - - d->adjusted_anchor = d->anchor; + + if (d->position != d->anchor) { + removeSelectedText(); + return; } - + + if (d->anchor < 1 || !d->canDelete(d->anchor-1)) + return; + d->anchor--; + + QTextDocumentPrivate::FragmentIterator fragIt = d->priv->find(d->anchor); + const QTextFragmentData * const frag = fragIt.value(); + int fpos = fragIt.position(); + QChar uc = d->priv->buffer().at(d->anchor - fpos + frag->stringPosition); + if (d->anchor > fpos && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { + // second half of a surrogate, check if we have the first half as well, + // if yes delete both at once + uc = d->priv->buffer().at(d->anchor - 1 - fpos + frag->stringPosition); + if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) + --d->anchor; + } + + d->adjusted_anchor = d->anchor; d->remove(); d->setX(); } @@ -1517,7 +1522,9 @@ void QTextCursor::removeSelectedText() if (!d || !d->priv || d->position == d->anchor) return; + d->priv->beginEditBlock(); d->remove(); + d->priv->endEditBlock(); d->setX(); } diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index c66d0c1..fa032e6 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2500,7 +2500,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi LDEBUG << "layoutBlock from=" << layoutFrom << "to=" << layoutTo; -// qDebug() << "layoutBlock; width" << layoutStruct->x_right - layoutStruct->x_left << "(maxWidth is btw" << tl->maximumWidth() << ")"; +// qDebug() << "layoutBlock; width" << layoutStruct->x_right - layoutStruct->x_left << "(maxWidth is btw" << tl->maximumWidth() << ')'; if (previousBlockFormat) { qreal margin = qMax(blockFormat.topMargin(), previousBlockFormat->bottomMargin()); diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index b1f1b75..ee743dc 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -499,7 +499,7 @@ void QTextHtmlParser::dumpHtml() { for (int i = 0; i < count(); ++i) { qDebug().nospace() << qPrintable(QString(depth(i)*4, QLatin1Char(' '))) - << qPrintable(at(i).tag) << ":" + << qPrintable(at(i).tag) << ':' << quoteNewline(at(i).text); ; } diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h index f5426b5..1f29642 100644 --- a/src/gui/text/qtextimagehandler_p.h +++ b/src/gui/text/qtextimagehandler_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE class QTextImageFormat; -class Q_GUI_EXPORT QTextImageHandler : public QObject, +class QTextImageHandler : public QObject, public QTextObjectInterface { Q_OBJECT @@ -72,7 +72,7 @@ public: virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format); typedef QImage (*ExternalImageLoaderFunction)(const QString &name, const QString &context); - static ExternalImageLoaderFunction externalLoader; + static Q_GUI_EXPORT ExternalImageLoaderFunction externalLoader; //this is needed by Qt3Support }; QT_END_NAMESPACE diff --git a/src/gui/util/qdesktopservices_mac.cpp b/src/gui/util/qdesktopservices_mac.cpp index fdafa1e..fb1e193 100644 --- a/src/gui/util/qdesktopservices_mac.cpp +++ b/src/gui/util/qdesktopservices_mac.cpp @@ -154,7 +154,7 @@ QString QDesktopServices::storageLocation(StandardLocation type) QString appName = QCoreApplication::applicationName(); if (!appName.isEmpty() && (QDesktopServices::DataLocation == type || QDesktopServices::CacheLocation == type)) - path += QLatin1String("/") + appName; + path += QLatin1Char('/') + appName; return path; } diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp index b3486e8..8c4a597 100644 --- a/src/gui/util/qdesktopservices_x11.cpp +++ b/src/gui/util/qdesktopservices_x11.cpp @@ -164,8 +164,8 @@ QString QDesktopServices::storageLocation(StandardLocation type) QString key = lst.at(1); QString value = lst.at(2); if (value.length() > 2 - && value.startsWith(QLatin1String("\"")) - && value.endsWith(QLatin1String("\""))) + && value.startsWith(QLatin1Char('\"')) + && value.endsWith(QLatin1Char('\"'))) value = value.mid(1, value.length() - 2); // Store the key and value: "DESKTOP", "$HOME/Desktop" lines[key] = value; diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index b91e3dd..79ca11d 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -1266,6 +1266,12 @@ QSize QAbstractScrollArea::minimumSizeHint() const int hsbExt = d->hbar->sizeHint().height(); int vsbExt = d->vbar->sizeHint().width(); int extra = 2 * d->frameWidth; + QStyleOption opt; + opt.initFrom(this); + if ((d->frameStyle != QFrame::NoFrame) + && style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &opt, this)) { + extra += style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &opt, this); + } return QSize(d->scrollBarContainers[Qt::Horizontal]->sizeHint().width() + vsbExt + extra, d->scrollBarContainers[Qt::Vertical]->sizeHint().height() + hsbExt + extra); } diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h index ee0da62..0998e52 100644 --- a/src/gui/widgets/qcombobox_p.h +++ b/src/gui/widgets/qcombobox_p.h @@ -290,7 +290,7 @@ public: QComboBoxDelegate(QObject *parent, QComboBox *cmb) : QItemDelegate(parent), mCombo(cmb) {} static bool isSeparator(const QModelIndex &index) { - return index.data(Qt::AccessibleDescriptionRole).toString() == QString::fromLatin1("separator"); + return index.data(Qt::AccessibleDescriptionRole).toString() == QLatin1String("separator"); } static void setSeparator(QAbstractItemModel *model, const QModelIndex &index) { model->setData(index, QString::fromLatin1("separator"), Qt::AccessibleDescriptionRole); diff --git a/src/gui/widgets/qframe.cpp b/src/gui/widgets/qframe.cpp index 6f81331..22a990b 100644 --- a/src/gui/widgets/qframe.cpp +++ b/src/gui/widgets/qframe.cpp @@ -59,8 +59,7 @@ QFramePrivate::QFramePrivate() midLineWidth(0), frameWidth(0), leftFrameWidth(0), rightFrameWidth(0), - topFrameWidth(0), bottomFrameWidth(0), - oldFrameStyle(QFrame::NoFrame | QFrame::Plain) + topFrameWidth(0), bottomFrameWidth(0) { } @@ -333,7 +332,6 @@ void QFrame::setFrameStyle(int style) d->frameStyle = (short)style; update(); d->updateFrameWidth(); - d->oldFrameStyle = (short)style; } /*! diff --git a/src/gui/widgets/qframe_p.h b/src/gui/widgets/qframe_p.h index 3ea0c8b..537f5bf 100644 --- a/src/gui/widgets/qframe_p.h +++ b/src/gui/widgets/qframe_p.h @@ -74,7 +74,6 @@ public: short frameWidth; short leftFrameWidth, rightFrameWidth; short topFrameWidth, bottomFrameWidth; - short oldFrameStyle; inline void init(); diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 3004841..50100af 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -398,9 +398,12 @@ QRect QMenuPrivate::actionRect(QAction *act) const return ret; } +static const float MenuFadeTimeInSec = 0.150; + void QMenuPrivate::hideUpToMenuBar() { Q_Q(QMenu); + bool fadeMenus = q->style()->styleHint(QStyle::SH_Menu_FadeOutOnHide); if (!tornoff) { QWidget *caused = causedPopup.widget; hideMenu(q); //hide after getting causedPopup @@ -415,8 +418,9 @@ void QMenuPrivate::hideUpToMenuBar() if (QMenu *m = qobject_cast<QMenu*>(caused)) { caused = m->d_func()->causedPopup.widget; if (!m->d_func()->tornoff) - hideMenu(m); - m->d_func()->setCurrentAction(0); + hideMenu(m, fadeMenus); + if (!fadeMenus) // Mac doesn't clear the action until after hidden. + m->d_func()->setCurrentAction(0); } else { #ifndef QT_NO_TOOLBUTTON if (qobject_cast<QToolButton*>(caused) == 0) @@ -425,26 +429,32 @@ void QMenuPrivate::hideUpToMenuBar() caused = 0; } } +#if defined(Q_WS_MAC) + if (fadeMenus) { + QEventLoop eventLoop; + QTimer::singleShot(int(MenuFadeTimeInSec * 1000), &eventLoop, SLOT(quit())); + QMacWindowFader::currentFader()->performFade(); + eventLoop.exec(); + } +#endif } setCurrentAction(0); } -void QMenuPrivate::hideMenu(QMenu *menu) +void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister) { if (!menu) return; - #if !defined(QT_NO_EFFECTS) menu->blockSignals(true); aboutToHide = true; // Flash item which is about to trigger (if any). if (menu->style()->styleHint(QStyle::SH_Menu_FlashTriggeredItem) - && currentAction && currentAction == actionAboutToTrigger) { - + && currentAction && currentAction == actionAboutToTrigger + && menu->actions().contains(currentAction)) { QEventLoop eventLoop; QAction *activeAction = currentAction; - // Deselect and wait 60 ms. menu->setActiveAction(0); QTimer::singleShot(60, &eventLoop, SLOT(quit())); eventLoop.exec(); @@ -458,22 +468,24 @@ void QMenuPrivate::hideMenu(QMenu *menu) // Fade out. if (menu->style()->styleHint(QStyle::SH_Menu_FadeOutOnHide)) { // ### Qt 4.4: - // Should be something like: q->transitionWindow(Qt::FadeOutTransition, 150); + // Should be something like: q->transitionWindow(Qt::FadeOutTransition, MenuFadeTimeInSec); // Hopefully we'll integrate qt/research/windowtransitions into main before 4.4. // Talk to Richard, Trenton or Bjoern. #if defined(Q_WS_MAC) - macWindowFade(qt_mac_window_for(menu)); // FIXME - what is the default duration for view animations + if (justRegister) { + QMacWindowFader::currentFader()->setFadeDuration(MenuFadeTimeInSec); + QMacWindowFader::currentFader()->registerWindowToFade(menu); + } else { + macWindowFade(qt_mac_window_for(menu), MenuFadeTimeInSec); + } - // Wait for the transition to complete. - QEventLoop eventLoop; - QTimer::singleShot(150, &eventLoop, SLOT(quit())); - eventLoop.exec(); #endif // Q_WS_MAC } aboutToHide = false; menu->blockSignals(false); #endif // QT_NO_EFFECTS - menu->hide(); + if (!justRegister) + menu->hide(); } void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index cce083f..87c886c 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1829,6 +1829,9 @@ OSMenuRef QMenuBar::macMenu() { return d_func()->macMenu(); } */ static bool qt_mac_is_ancestor(QWidget* possibleAncestor, QWidget *child) { + if (!possibleAncestor) + return false; + QWidget * current = child->parentWidget(); while (current != 0) { if (current == possibleAncestor) @@ -1847,22 +1850,19 @@ static bool qt_mac_should_disable_menu(QMenuBar *menuBar, QWidget *modalWidget) { if (modalWidget == 0 || menuBar == 0) return false; - const Qt::WindowModality modality = modalWidget->windowModality(); - if (modality == Qt::ApplicationModal) { - return true; - } else if (modality == Qt::WindowModal) { - QWidget * parent = menuBar->parentWidget(); - - // Special case for the global menu bar: It's not associated - // with a window so don't disable it. - if (parent == 0) - return false; - // Disable menu entries in menu bars that belong to ancestors of - // the modal widget, leave entries in unrelated menu bars enabled. - return qt_mac_is_ancestor(parent, modalWidget); + // If there is an application modal window on + // screen, the entries of the menubar should be disabled: + QWidget *w = modalWidget; + while (w) { + if (w->isVisible() && w->windowModality() == Qt::ApplicationModal) + return true; + w = w->parentWidget(); } - return false; // modality == NonModal + + // INVARIANT: modalWidget is window modal. Disable menu entries + // if the menu bar belongs to an ancestor of modalWidget: + return qt_mac_is_ancestor(menuBar->parentWidget(), modalWidget); } static void cancelAllMenuTracking() diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index edfeee7..9654126 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -220,7 +220,7 @@ public: virtual QList<QPointer<QWidget> > calcCausedStack() const; QMenuCaused causedPopup; void hideUpToMenuBar(); - void hideMenu(QMenu *menu); + void hideMenu(QMenu *menu, bool delay = true); //index mappings inline QAction *actionAt(int i) const { return q_func()->actions().at(i); } diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp index cdb3836..804220d 100644 --- a/src/gui/widgets/qprogressbar.cpp +++ b/src/gui/widgets/qprogressbar.cpp @@ -448,19 +448,19 @@ QString QProgressBar::text() const qint64 totalSteps = qint64(d->maximum) - qint64(d->minimum); QString result = d->format; - result.replace(QLatin1String("%m"), QString::fromLatin1("%1").arg(totalSteps)); - result.replace(QLatin1String("%v"), QString::fromLatin1("%1").arg(d->value)); + result.replace(QLatin1String("%m"), QString::number(totalSteps)); + result.replace(QLatin1String("%v"), QString::number(d->value)); // If max and min are equal and we get this far, it means that the // progress bar has one step and that we are on that step. Return // 100% here in order to avoid division by zero further down. if (totalSteps == 0) { - result.replace(QLatin1String("%p"), QString::fromLatin1("%1").arg(100)); + result.replace(QLatin1String("%p"), QString::number(100)); return result; } int progress = int(((qreal(d->value) - qreal(d->minimum)) * 100.0) / totalSteps); - result.replace(QLatin1String("%p"), QString::fromLatin1("%1").arg(progress)); + result.replace(QLatin1String("%p"), QString::number(progress)); return result; } diff --git a/src/gui/widgets/qpushbutton.cpp b/src/gui/widgets/qpushbutton.cpp index 03ca751..ca58f87 100644 --- a/src/gui/widgets/qpushbutton.cpp +++ b/src/gui/widgets/qpushbutton.cpp @@ -527,8 +527,7 @@ void QPushButton::setMenu(QMenu* menu) return; if (menu && !d->menu) { - disconnect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed())); - connect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed())); + connect(this, SIGNAL(pressed()), this, SLOT(_q_popupPressed()), Qt::UniqueConnection); } if (d->menu) removeAction(d->menu->menuAction()); diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp index b7426f0..f12946c 100644 --- a/src/gui/widgets/qspinbox.cpp +++ b/src/gui/widgets/qspinbox.cpp @@ -1254,9 +1254,7 @@ QVariant QDoubleSpinBoxPrivate::valueFromText(const QString &f) const double QDoubleSpinBoxPrivate::round(double value) const { - Q_Q(const QDoubleSpinBox); - const QString strDbl = q->locale().toString(value, 'f', decimals); - return q->locale().toDouble(strDbl); + return QString::number(value, 'f', decimals).toDouble(); } diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 0b4ce9d..bd8a1b0 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1535,9 +1535,10 @@ void QTabBar::paintEvent(QPaintEvent *) } if (!d->dragInProgress) p.drawControl(QStyle::CE_TabBarTab, tab); - else - d->movingTab->setGeometry(tab.rect); - + else { + int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0, this); + d->movingTab->setGeometry(tab.rect.adjusted(-taboverlap, 0, taboverlap, 0)); + } } // Only draw the tear indicator if necessary. Most of the time we don't need too. @@ -1804,7 +1805,9 @@ void QTabBarPrivate::setupMovableTab() if (!movingTab) movingTab = new QWidget(q); + int taboverlap = q->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 ,q); QRect grabRect = q->tabRect(pressedIndex); + grabRect.adjust(-taboverlap, 0, taboverlap, 0); QPixmap grabImage(grabRect.size()); grabImage.fill(Qt::transparent); @@ -1812,7 +1815,7 @@ void QTabBarPrivate::setupMovableTab() QStyleOptionTabV3 tab; q->initStyleOption(&tab, pressedIndex); - tab.rect.moveTopLeft(QPoint(0, 0)); + tab.rect.moveTopLeft(QPoint(taboverlap, 0)); p.drawControl(QStyle::CE_TabBarTab, tab); p.end(); diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index 7df68fc..b9b9d84 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -127,11 +127,11 @@ QByteArray QHttpNetworkRequestPrivate::header(const QHttpNetworkRequest &request { QByteArray ba = request.d->methodName(); QByteArray uri = request.d->uri(throughProxy); - ba += " " + uri; + ba += ' ' + uri; QString majorVersion = QString::number(request.majorVersion()); QString minorVersion = QString::number(request.minorVersion()); - ba += " HTTP/" + majorVersion.toLatin1() + "." + minorVersion.toLatin1() + "\r\n"; + ba += " HTTP/" + majorVersion.toLatin1() + '.' + minorVersion.toLatin1() + "\r\n"; QList<QPair<QByteArray, QByteArray> > fields = request.header(); QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin(); diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index 6374fde..d905b70 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -109,7 +109,7 @@ void QNetworkAccessFileBackend::open() QString fileName = url.toLocalFile(); if (fileName.isEmpty()) { if (url.scheme() == QLatin1String("qrc")) - fileName = QLatin1String(":") + url.path(); + fileName = QLatin1Char(':') + url.path(); else fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); } diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 67df526..29bf042 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -1026,7 +1026,7 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug s, const QNetworkCookie &cookie) { - s.nospace() << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ")"; + s.nospace() << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ')'; return s.space(); } #endif diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 749a462..a146358 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -414,7 +414,8 @@ void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data) { Q_Q(QNetworkReplyImpl); - Q_ASSERT(q->isOpen()); + if (!q->isOpen()) + return; // read until EOF from data if (copyDevice) { diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index a66672d..fa2b545 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -511,13 +511,13 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge, credentials += "uri=\"" + path + "\", "; if (!opaque.isEmpty()) credentials += "opaque=\"" + opaque + "\", "; - credentials += "response=\"" + response + "\""; + credentials += "response=\"" + response + '\"'; if (!options.value("algorithm").isEmpty()) credentials += ", algorithm=" + options.value("algorithm"); if (!options.value("qop").isEmpty()) { credentials += ", qop=" + qop + ", "; credentials += "nc=" + nonceCountString + ", "; - credentials += "cnonce=\"" + cnonce + "\""; + credentials += "cnonce=\"" + cnonce + '\"'; } return credentials; diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index b225c17..c2fb690 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -1078,7 +1078,7 @@ QPair<QHostAddress, int> QHostAddress::parseSubnet(const QString &subnet) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug d, const QHostAddress &address) { - d.maybeSpace() << "QHostAddress(" << address.toString() << ")"; + d.maybeSpace() << "QHostAddress(" << address.toString() << ')'; return d.space(); } #endif diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 960999e..f12b0c0 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -594,7 +594,7 @@ static inline QDebug operator<<(QDebug debug, const QNetworkAddressEntry &entry) debug.nospace() << ", netmask = " << entry.netmask(); if (!entry.broadcast().isNull()) debug.nospace() << ", broadcast = " << entry.broadcast(); - debug.nospace() << ")"; + debug.nospace() << ')'; return debug.space(); } diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 336a7e7..2d37e2e 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -99,7 +99,7 @@ the client has read the data). Note that Qt does not limit the write buffer size. You can monitor its size by listening to this signal. - + The readyRead() signal is emitted every time a new chunk of data has arrived. bytesAvailable() then returns the number of bytes that are available for reading. Typically, you would connect the @@ -199,9 +199,10 @@ parameter describes the type of error that occurred. QAbstractSocket::SocketError is not a registered metatype, so for queued - connections, you will have to register it with Q_REGISTER_METATYPE. + connections, you will have to register it with Q_DECLARE_METATYPE() and + qRegisterMetaType(). - \sa error(), errorString() + \sa error(), errorString(), {Creating Custom Qt Types} */ /*! @@ -211,9 +212,10 @@ The \a socketState parameter is the new state. QAbstractSocket::SocketState is not a registered metatype, so for queued - connections, you will have to register it with Q_REGISTER_METATYPE. + connections, you will have to register it with Q_REGISTER_METATYPE() and + qRegisterMetaType(). - \sa state() + \sa state(), {Creating Custom Qt Types} */ /*! @@ -850,7 +852,7 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo) if (i != 0) s += ", "; s += addresses.at(i).toString(); } - s += "}"; + s += '}'; qDebug("QAbstractSocketPrivate::_q_startConnecting(hostInfo == %s)", s.toLatin1().constData()); #endif @@ -1864,9 +1866,9 @@ bool QAbstractSocket::waitForDisconnected(int msecs) } /*! - Aborts the current connection and resets the socket. Unlike - disconnectFromHost(), this function immediately closes the socket, discarding - any pending data in the write buffer. + Aborts the current connection and resets the socket. Unlike disconnectFromHost(), + this function immediately closes the socket, discarding any pending data in the + write buffer. \sa disconnectFromHost(), close() */ @@ -2163,7 +2165,12 @@ void QAbstractSocket::setPeerName(const QString &name) } /*! - Disconnects the socket's connection with the host. + Closes the I/O device for the socket, disconnects the socket's connection with the + host, closes the socket, and resets the name, address, port number and underlying + socket descriptor. + + See QIODevice::close() for a description of the actions that occur when an I/O + device is closed. \sa abort() */ @@ -2456,7 +2463,8 @@ QNetworkProxy QAbstractSocket::proxy() const #endif // QT_NO_NETWORKPROXY #ifdef QT3_SUPPORT -/*! \enum QAbstractSocket::Error +/*! + \enum QAbstractSocket::Error \compat Use QAbstractSocket::SocketError instead. @@ -2588,7 +2596,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketError er debug << "QAbstractSocket::ProxyProtocolError"; break; default: - debug << "QAbstractSocket::SocketError(" << int(error) << ")"; + debug << "QAbstractSocket::SocketError(" << int(error) << ')'; break; } return debug; @@ -2619,7 +2627,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketState st debug << "QAbstractSocket::ClosingState"; break; default: - debug << "QAbstractSocket::SocketState(" << int(state) << ")"; + debug << "QAbstractSocket::SocketState(" << int(state) << ')'; break; } return debug; diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index 327bfc6..9411130 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -468,7 +468,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketError error) debug << "QLocalSocket::UnknownSocketError"; break; default: - debug << "QLocalSocket::SocketError(" << int(error) << ")"; + debug << "QLocalSocket::SocketError(" << int(error) << ')'; break; } return debug; @@ -490,7 +490,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketState state) debug << "QLocalSocket::ClosingState"; break; default: - debug << "QLocalSocket::SocketState(" << int(state) << ")"; + debug << "QLocalSocket::SocketState(" << int(state) << ')'; break; } return debug; diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index c41e32d..40d86ac 100644 --- a/src/network/socket/qsocks5socketengine.cpp +++ b/src/network/socket/qsocks5socketengine.cpp @@ -153,7 +153,7 @@ static inline QString dump(const QByteArray &) { return QString(); } */ static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, quint16 port, QByteArray *pBuf) { - QSOCKS5_DEBUG << "setting [" << address << ":" << port << "]"; + QSOCKS5_DEBUG << "setting [" << address << ':' << port << ']'; union { quint16 port; @@ -186,7 +186,7 @@ static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, qui */ static bool qt_socks5_set_host_name_and_port(const QString &hostname, quint16 port, QByteArray *pBuf) { - QSOCKS5_DEBUG << "setting [" << hostname << ":" << port << "]"; + QSOCKS5_DEBUG << "setting [" << hostname << ':' << port << ']'; QByteArray encodedHostName = QUrl::toAce(hostname); QByteArray &buf = *pBuf; @@ -265,7 +265,7 @@ static bool qt_socks5_get_host_address_and_port(const QByteArray &buf, QHostAddr } if (ret) { - QSOCKS5_DEBUG << "got [" << address << ":" << port << "]"; + QSOCKS5_DEBUG << "got [" << address << ':' << port << ']'; *pAddress = address; *pPort = port; *pPos = pos; @@ -1124,7 +1124,7 @@ bool QSocks5SocketEngine::connectInternal() bool QSocks5SocketEngine::connectToHost(const QHostAddress &address, quint16 port) { Q_D(QSocks5SocketEngine); - QSOCKS5_DEBUG << "connectToHost" << address << ":" << port; + QSOCKS5_DEBUG << "connectToHost" << address << ':' << port; setPeerAddress(address); setPeerPort(port); @@ -1379,7 +1379,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &address, quint16 port) //### reset and error return false; } - QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ":" << d->localPort; + QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ':' << d->localPort; return true; #endif // QT_NO_UDPSOCKET } @@ -1478,7 +1478,7 @@ qint64 QSocks5SocketEngine::bytesAvailable() const qint64 QSocks5SocketEngine::read(char *data, qint64 maxlen) { Q_D(QSocks5SocketEngine); - QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ")"; + QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ')'; if (d->mode == QSocks5SocketEnginePrivate::ConnectMode) { if (d->connectData->readBuffer.size() == 0) { if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState) { @@ -1766,7 +1766,7 @@ void QSocks5SocketEngine::setReadNotificationEnabled(bool enable) { Q_D(QSocks5SocketEngine); - QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ")"; + QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ')'; bool emitSignal = false; if (!d->readNotificationEnabled diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index a2ba644..7ee0f07 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -267,7 +267,7 @@ QByteArray QSslCertificate::serialNumber() const /*! Returns a cryptographic digest of this certificate. By default, - and MD5 digest will be generated, but you can also specify a + an MD5 digest will be generated, but you can also specify a custom \a algorithm. */ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) const @@ -766,16 +766,16 @@ QDebug operator<<(QDebug debug, const QSslCertificate &certificate) { debug << "QSslCertificate(" << certificate.version() - << "," << certificate.serialNumber() - << "," << certificate.digest().toBase64() - << "," << certificate.issuerInfo(QSslCertificate::Organization) - << "," << certificate.subjectInfo(QSslCertificate::Organization) - << "," << certificate.alternateSubjectNames() + << ',' << certificate.serialNumber() + << ',' << certificate.digest().toBase64() + << ',' << certificate.issuerInfo(QSslCertificate::Organization) + << ',' << certificate.subjectInfo(QSslCertificate::Organization) + << ',' << certificate.alternateSubjectNames() #ifndef QT_NO_TEXTSTREAM - << "," << certificate.effectiveDate() - << "," << certificate.expiryDate() + << ',' << certificate.effectiveDate() + << ',' << certificate.expiryDate() #endif - << ")"; + << ')'; return debug; } QDebug operator<<(QDebug debug, QSslCertificate::SubjectInfo info) diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp index 7fec2df..696db1e 100644 --- a/src/network/ssl/qsslcipher.cpp +++ b/src/network/ssl/qsslcipher.cpp @@ -231,7 +231,7 @@ QDebug operator<<(QDebug debug, const QSslCipher &cipher) debug << "QSslCipher(name=" << qPrintable(cipher.name()) << ", bits=" << cipher.usedBits() << ", proto=" << qPrintable(cipher.protocolString()) - << ")"; + << ')'; return debug; } #endif diff --git a/src/network/ssl/qsslkey.cpp b/src/network/ssl/qsslkey.cpp index 8d550c0..6dbdc29 100644 --- a/src/network/ssl/qsslkey.cpp +++ b/src/network/ssl/qsslkey.cpp @@ -460,7 +460,7 @@ QDebug operator<<(QDebug debug, const QSslKey &key) << (key.type() == QSsl::PublicKey ? "PublicKey" : "PrivateKey") << ", " << (key.algorithm() == QSsl::Rsa ? "RSA" : "DSA") << ", " << key.length() - << ")"; + << ')'; return debug; } #endif diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 92054a4..16033b6 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -442,8 +442,8 @@ bool QSslSocket::setSocketDescriptor(int socketDescriptor, SocketState state, Op { Q_D(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::setSocketDescriptor(" << socketDescriptor << "," - << state << "," << openMode << ")"; + qDebug() << "QSslSocket::setSocketDescriptor(" << socketDescriptor << ',' + << state << ',' << openMode << ')'; #endif if (!d->plainSocket) d->createPlainSocket(openMode); @@ -1608,7 +1608,7 @@ void QSslSocket::connectToHostImplementation(const QString &hostName, quint16 po #ifdef QSSLSOCKET_DEBUG qDebug() << "QSslSocket::connectToHostImplementation(" - << hostName << "," << port << "," << openMode << ")"; + << hostName << ',' << port << ',' << openMode << ')'; #endif if (!d->plainSocket) { #ifdef QSSLSOCKET_DEBUG @@ -1682,7 +1682,7 @@ qint64 QSslSocket::readData(char *data, qint64 maxlen) } while (!d->readBuffer.isEmpty() && readBytes < maxlen); } #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::readData(" << (void *)data << "," << maxlen << ") ==" << readBytes; + qDebug() << "QSslSocket::readData(" << (void *)data << ',' << maxlen << ") ==" << readBytes; #endif return readBytes; } @@ -1694,7 +1694,7 @@ qint64 QSslSocket::writeData(const char *data, qint64 len) { Q_D(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::writeData(" << (void *)data << "," << len << ")"; + qDebug() << "QSslSocket::writeData(" << (void *)data << ',' << len << ')'; #endif if (d->mode == UnencryptedMode && !d->autoStartHandshake) return d->plainSocket->write(data, len); @@ -1999,7 +1999,7 @@ void QSslSocketPrivate::_q_stateChangedSlot(QAbstractSocket::SocketState state) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_stateChangedSlot(" << state << ")"; + qDebug() << "QSslSocket::_q_stateChangedSlot(" << state << ')'; #endif q->setSocketState(state); emit q->stateChanged(state); @@ -2012,7 +2012,7 @@ void QSslSocketPrivate::_q_errorSlot(QAbstractSocket::SocketError error) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_errorSlot(" << error << ")"; + qDebug() << "QSslSocket::_q_errorSlot(" << error << ')'; qDebug() << "\tstate =" << q->state(); qDebug() << "\terrorString =" << q->errorString(); #endif @@ -2047,7 +2047,7 @@ void QSslSocketPrivate::_q_bytesWrittenSlot(qint64 written) { Q_Q(QSslSocket); #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::_q_bytesWrittenSlot(" << written << ")"; + qDebug() << "QSslSocket::_q_bytesWrittenSlot(" << written << ')'; #endif if (mode == QSslSocket::UnencryptedMode) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 49798e0..4017c4d 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -276,7 +276,7 @@ init_context: if (first) first = false; else - cipherString.append(":"); + cipherString.append(':'); cipherString.append(cipher.name().toLatin1()); } @@ -482,30 +482,7 @@ void QSslSocketPrivate::resetDefaultCiphers() QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates() { -#ifdef QQ_OS_UNIX - // Check known locations for the system's default bundle. ### On Windows, - // we should use CAPI to find the bundle, and not rely on default unix - // locations. - const char *standardLocations[] = {"/etc/ssl/certs/", -#if 0 - // KDE uses KConfig for its SSL store, - // but it also stores the bundle at - // this location - "$HOME/.kde/share/apps/kssl/ca-bundle.crt", -#endif - 0}; - const char **it = standardLocations; - QStringList nameFilter; - nameFilter << QLatin1String("*.pem") << QLatin1String("*.crt"); - while (*it) { - if (QDirIterator(QLatin1String(*it), nameFilter).hasNext()) - return certificatesFromPath(QLatin1String(*it)); - ++it; - } -#endif - - // Qt provides a default bundle when we cannot detect the system's default - // bundle. + // Qt provides a default bundle of certificates QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) return QSslCertificate::fromDevice(&caBundle); diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index f237847..560ad3a 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -43,6 +43,8 @@ #include <private/qbezier_p.h> +QT_BEGIN_NAMESPACE + void QGL2PEXVertexArray::clear() { vertexArray.reset(); @@ -160,3 +162,5 @@ void QGL2PEXVertexArray::curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, } } } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index a83f13e..d7a9f73 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -50,12 +50,17 @@ // We mean it. // +#ifndef QGL2PEXVERTEXARRAY_P_H +#define QGL2PEXVERTEXARRAY_P_H + #include <QRectF> #include <private/qdatabuffer_p.h> #include <private/qvectorpath_p.h> #include <private/qgl_p.h> +QT_BEGIN_NAMESPACE + class QGLPoint { public: @@ -120,3 +125,7 @@ private: inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); }; + +QT_END_NAMESPACE + +#endif diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 514aac0..f64af85 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -47,6 +47,8 @@ #endif +QT_BEGIN_NAMESPACE + const char* QGLEngineShaderManager::qglEngineShaderSourceCode[] = { 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, @@ -462,4 +464,4 @@ void QGLEngineShaderManager::compileNamedShader(QGLEngineShaderManager::ShaderNa compiledShaders[name] = newShader; } - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp index 2239c2f..f1a8850 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache.cpp +++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp @@ -44,6 +44,8 @@ #include "qglgradientcache_p.h" +QT_BEGIN_NAMESPACE + void QGL2GradientCache::cleanCache() { QGLGradientColorTableHash::const_iterator it = cache.constBegin(); for (; it != cache.constEnd(); ++it) { @@ -180,3 +182,5 @@ void QGL2GradientCache::generateGradientColorTable(const QGradient& gradient, ui // Make sure the last color stop is represented at the end of the table colorTable[size-1] = last_color; } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglgradientcache_p.h b/src/opengl/gl2paintengineex/qglgradientcache_p.h index 6acaa00..9bf58c7 100644 --- a/src/opengl/gl2paintengineex/qglgradientcache_p.h +++ b/src/opengl/gl2paintengineex/qglgradientcache_p.h @@ -54,6 +54,8 @@ #include <QObject> #include <QtOpenGL> +QT_BEGIN_NAMESPACE + class QGL2GradientCache : public QObject { Q_OBJECT @@ -104,5 +106,5 @@ public slots: } }; - +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index f174306..e7b6ee4 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -62,7 +62,6 @@ and use the correct program when we really need it. */ - #include "qpaintengineex_opengl2_p.h" #include <string.h> //for memcpy @@ -81,105 +80,17 @@ #include "qgl2pexvertexarray_p.h" -extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp - - #include <QDebug> -enum EngineMode { - ImageDrawingMode, - TextDrawingMode, - BrushDrawingMode -}; +QT_BEGIN_NAMESPACE + +extern QImage qt_imageForBrush(int brushStyle, bool invert); static const GLuint QT_BRUSH_TEXTURE_UNIT = 0; static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush texture unit static const GLuint QT_MASK_TEXTURE_UNIT = 1; static const GLuint QT_BACKGROUND_TEXTURE_UNIT = 2; -class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate -{ - Q_DECLARE_PUBLIC(QGL2PaintEngineEx) -public: - QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) : - q(q_ptr), - width(0), height(0), - ctx(0), - currentBrush( &(q->state()->brush) ), - inverseScale(1), - shaderManager(0) - { } - - ~QGL2PaintEngineExPrivate(); - - void updateBrushTexture(); - void updateBrushUniforms(); - void updateMatrix(); - void updateCompositionMode(); - void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform); - - void setBrush(const QBrush* brush); - - void transferMode(EngineMode newMode); - - // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: - void fill(const QVectorPath &path); - void drawOutline(const QVectorPath& path); - void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize); - void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti); - - void drawVertexArrays(QGL2PEXVertexArray& vertexArray, GLenum primitive); - // ^ draws whatever is in the vertex array - void composite(const QGLRect& boundingRect); - // ^ Composites the bounding rect onto dest buffer - void fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill); - // ^ Calls drawVertexArrays to render into stencil buffer - void cleanStencilBuffer(const QGLRect& area); - - void prepareForDraw(bool srcPixelsAreOpaque); - - inline void useSimpleShader(); - inline QColor premultiplyColor(QColor c, GLfloat opacity); - - QGL2PaintEngineEx* q; - QGLDrawable drawable; - int width, height; - QGLContext *ctx; - - EngineMode mode; - - // Dirty flags - bool matrixDirty; // Implies matrix uniforms are also dirty - bool compositionModeDirty; - bool brushTextureDirty; - bool brushUniformsDirty; - bool simpleShaderMatrixUniformDirty; - bool shaderMatrixUniformDirty; - bool stencilBuferDirty; - - const QBrush* currentBrush; // May not be the state's brush! - - GLfloat inverseScale; - - QGL2PEXVertexArray vertexCoordinateArray; - QGL2PEXVertexArray textureCoordinateArray; - - GLfloat staticVertexCoordinateArray[8]; - GLfloat staticTextureCoordinateArray[8]; - - GLfloat pmvMatrix[4][4]; - - QGLEngineShaderManager* shaderManager; - - // Clipping & state stuff stolen from QOpenGLPaintEngine: - void updateDepthClip(); - void systemStateChanged(); - uint use_system_clip : 1; - - QPaintEngine *last_engine; -}; - - ////////////////////////////////// Private Methods ////////////////////////////////////////// QGL2PaintEngineExPrivate::~QGL2PaintEngineExPrivate() @@ -514,7 +425,7 @@ static inline void setCoords(GLfloat *coords, const QGLRect &rect) coords[7] = rect.bottom; } -void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize) +void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque) { transferMode(ImageDrawingMode); @@ -523,7 +434,7 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s // Setup for texture drawing shaderManager->setSrcPixelType(QGLEngineShaderManager::ImageSrc); shaderManager->setTextureCoordsEnabled(true); - prepareForDraw(false); // ### + prepareForDraw(opaque); shaderManager->currentProgram()->setUniformValue("imageTexture", QT_IMAGE_TEXTURE_UNIT); @@ -723,11 +634,12 @@ void QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque) updateMatrix(); const bool stateHasOpacity = q->state()->opacity < 0.99f; - if ( (!srcPixelsAreOpaque || stateHasOpacity) && - q->state()->compositionMode() != QPainter::CompositionMode_Source) - glEnable(GL_BLEND); - else + if (q->state()->compositionMode() == QPainter::CompositionMode_Source + || (q->state()->compositionMode() == QPainter::CompositionMode_SourceOver + && srcPixelsAreOpaque && !stateHasOpacity)) glDisable(GL_BLEND); + else + glEnable(GL_BLEND); bool useGlobalOpacityUniform = stateHasOpacity; if (stateHasOpacity && (mode != ImageDrawingMode)) { @@ -830,10 +742,11 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) { Q_D(QGL2PaintEngineEx); - ensureActive(); if (pen.style() == Qt::NoPen) return; + ensureActive(); + if ( (pen.isCosmetic() && (pen.style() == Qt::SolidLine)) && (pen.widthF() < 2.5f) ) { // We only handle solid, cosmetic pens with a width of 1 pixel @@ -910,12 +823,7 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA, true); //FIXME: we should use hasAlpha() instead, but that's SLOW at the moment - if ((state()->opacity < 0.99f) || pixmap.hasAlphaChannel()) - glEnable(GL_BLEND); - else - glDisable(GL_BLEND); - - d->drawTexture(dest, src, pixmap.size()); + d->drawTexture(dest, src, pixmap.size(), !pixmap.hasAlphaChannel()); } void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const QRectF& src, @@ -929,12 +837,7 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true); - if ((state()->opacity < 0.99f) || image.hasAlphaChannel()) - glEnable(GL_BLEND); - else - glDisable(GL_BLEND); - - d->drawTexture(dest, src, image.size()); + d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel()); } void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem) @@ -1051,10 +954,19 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) Q_D(QGL2PaintEngineEx); // qDebug("QGL2PaintEngineEx::begin()"); - d->drawable.setDevice(pdev); - d->drawable.makeCurrent(); d->ctx = d->drawable.context(); + + if (d->ctx->d_ptr->active_engine) { + QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(d->ctx->d_ptr->active_engine); + QGL2PaintEngineExPrivate *p = static_cast<QGL2PaintEngineExPrivate *>(engine->d_ptr); + p->transferMode(BrushDrawingMode); + p->drawable.doneCurrent(); + } + + d->ctx->d_ptr->active_engine = this; + + d->drawable.makeCurrent(); QSize sz = d->drawable.size(); d->width = sz.width(); d->height = sz.height(); @@ -1064,14 +976,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) qt_resolve_version_2_0_functions(d->ctx); #endif - d->last_engine = d->ctx->d_ptr->active_engine; - d->ctx->d_ptr->active_engine = this; - - if (d->last_engine) { - QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(d->last_engine); - static_cast<QGL2PaintEngineExPrivate *>(engine->d_ptr)->transferMode(BrushDrawingMode); - } - if (!d->shaderManager) d->shaderManager = new QGLEngineShaderManager(d->ctx); @@ -1095,15 +999,25 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) glDisable(GL_SCISSOR_TEST); QGLPixmapData *source = d->drawable.copyOnBegin(); - if (source) { + if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { + if (d->drawable.hasTransparentBackground()) + glClearColor(0.0, 0.0, 0.0, 0.0); + else { + const QColor &c = d->drawable.backgroundColor(); + float alpha = c.alphaF(); + glClearColor(c.redF() * alpha, c.greenF() * alpha, c.blueF() * alpha, alpha); + } + glClear(GL_COLOR_BUFFER_BIT); + } else if (source) { + QGLContext *ctx = d->ctx; + d->transferMode(ImageDrawingMode); + glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); source->bind(false); - glDisable(GL_BLEND); - QRect rect(0, 0, source->width(), source->height()); - d->drawTexture(QRectF(rect), QRectF(rect), rect.size()); + d->drawTexture(QRectF(rect), QRectF(rect), rect.size(), true); } updateClipRegion(QRegion(), Qt::NoClip); @@ -1115,8 +1029,8 @@ bool QGL2PaintEngineEx::end() Q_D(QGL2PaintEngineEx); QGLContext *ctx = d->ctx; if (ctx->d_ptr->active_engine != this) { - QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(d->last_engine); - if (engine) { + QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(ctx->d_ptr->active_engine); + if (engine && engine->isActive()) { QGL2PaintEngineExPrivate *p = static_cast<QGL2PaintEngineExPrivate *>(engine->d_ptr); p->transferMode(BrushDrawingMode); p->drawable.doneCurrent(); @@ -1128,19 +1042,7 @@ bool QGL2PaintEngineEx::end() d->transferMode(BrushDrawingMode); d->drawable.swapBuffers(); d->drawable.doneCurrent(); - d->ctx->d_ptr->active_engine = d->last_engine; - - if (d->last_engine) { - QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(d->last_engine); - QGL2PaintEngineExPrivate *p = static_cast<QGL2PaintEngineExPrivate *>(engine->d_ptr); - - glDisable(GL_DEPTH_TEST); - glDisable(GL_SCISSOR_TEST); - - glViewport(0, 0, p->width, p->height); - engine->setState(engine->state()); - p->updateDepthClip(); - } + d->ctx->d_ptr->active_engine = 0; return false; } @@ -1152,7 +1054,7 @@ void QGL2PaintEngineEx::ensureActive() if (isActive() && ctx->d_ptr->active_engine != this) { QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(ctx->d_ptr->active_engine); - if (engine) { + if (engine && engine->isActive()) { QGL2PaintEngineExPrivate *p = static_cast<QGL2PaintEngineExPrivate *>(engine->d_ptr); p->transferMode(BrushDrawingMode); p->drawable.doneCurrent(); @@ -1422,3 +1324,4 @@ QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() { } +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ccf89f0..dececa3 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -53,7 +53,19 @@ // We mean it. // +#include <QDebug> + #include <private/qpaintengineex_p.h> +#include <private/qglengineshadermanager_p.h> +#include <private/qgl2pexvertexarray_p.h> + +enum EngineMode { + ImageDrawingMode, + TextDrawingMode, + BrushDrawingMode +}; + +QT_BEGIN_NAMESPACE class QGL2PaintEngineExPrivate; @@ -119,4 +131,86 @@ private: Q_DISABLE_COPY(QGL2PaintEngineEx) }; +class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate +{ + Q_DECLARE_PUBLIC(QGL2PaintEngineEx) +public: + QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) : + q(q_ptr), + width(0), height(0), + ctx(0), + currentBrush( &(q->state()->brush) ), + inverseScale(1), + shaderManager(0) + { } + + ~QGL2PaintEngineExPrivate(); + + void updateBrushTexture(); + void updateBrushUniforms(); + void updateMatrix(); + void updateCompositionMode(); + void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform); + + void setBrush(const QBrush* brush); + + void transferMode(EngineMode newMode); + + // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: + void fill(const QVectorPath &path); + void drawOutline(const QVectorPath& path); + void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque); + void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti); + + void drawVertexArrays(QGL2PEXVertexArray& vertexArray, GLenum primitive); + // ^ draws whatever is in the vertex array + void composite(const QGLRect& boundingRect); + // ^ Composites the bounding rect onto dest buffer + void fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill); + // ^ Calls drawVertexArrays to render into stencil buffer + void cleanStencilBuffer(const QGLRect& area); + + void prepareForDraw(bool srcPixelsAreOpaque); + + inline void useSimpleShader(); + inline QColor premultiplyColor(QColor c, GLfloat opacity); + + QGL2PaintEngineEx* q; + QGLDrawable drawable; + int width, height; + QGLContext *ctx; + + EngineMode mode; + + // Dirty flags + bool matrixDirty; // Implies matrix uniforms are also dirty + bool compositionModeDirty; + bool brushTextureDirty; + bool brushUniformsDirty; + bool simpleShaderMatrixUniformDirty; + bool shaderMatrixUniformDirty; + bool stencilBuferDirty; + + const QBrush* currentBrush; // May not be the state's brush! + + GLfloat inverseScale; + + QGL2PEXVertexArray vertexCoordinateArray; + QGL2PEXVertexArray textureCoordinateArray; + + GLfloat staticVertexCoordinateArray[8]; + GLfloat staticTextureCoordinateArray[8]; + + GLfloat pmvMatrix[4][4]; + + QGLEngineShaderManager* shaderManager; + + // Clipping & state stuff stolen from QOpenGLPaintEngine: + void updateDepthClip(); + void systemStateChanged(); + uint use_system_clip : 1; +}; + +QT_END_NAMESPACE + #endif diff --git a/src/opengl/qegl.cpp b/src/opengl/qegl.cpp index c6c258b..f1ae4ed 100644 --- a/src/opengl/qegl.cpp +++ b/src/opengl/qegl.cpp @@ -582,7 +582,7 @@ QString QEglProperties::toString() const if (val != EGL_DONT_CARE) { str += QLatin1String("id="); str += QString::number(val); - str += QLatin1String(" "); + str += QLatin1Char(' '); } #ifdef EGL_RENDERABLE_TYPE @@ -617,11 +617,11 @@ QString QEglProperties::toString() const bufferSize = EGL_DONT_CARE; str += QLatin1String(" rgba="); str += QString::number(red); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(green); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(blue); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(alpha); if (bufferSize != EGL_DONT_CARE) { // Only report buffer size if different than r+g+b+a. @@ -708,7 +708,7 @@ QString QEglProperties::toString() const if (height != EGL_DONT_CARE || width != EGL_DONT_CARE) { addTag(str, QLatin1String(" max-pbuffer-size=")); str += QString::number(width); - str += QLatin1String("x"); + str += QLatin1Char('x'); str += QString::number(height); if (pixels != (width * height)) { addTag(str, QLatin1String(" max-pbuffer-pixels=")); @@ -762,9 +762,9 @@ QString QEglProperties::toString() const if (val == EGL_TRANSPARENT_RGB) { addTag(str, QLatin1String(" transparent-rgb=")); str += QString::number(value(EGL_TRANSPARENT_RED_VALUE)); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(value(EGL_TRANSPARENT_GREEN_VALUE)); - str += QLatin1String(","); + str += QLatin1Char(','); str += QString::number(value(EGL_TRANSPARENT_BLUE_VALUE)); } diff --git a/src/opengl/qegl_x11egl.cpp b/src/opengl/qegl_x11egl.cpp index 8efe7e7..c703900 100644 --- a/src/opengl/qegl_x11egl.cpp +++ b/src/opengl/qegl_x11egl.cpp @@ -42,6 +42,7 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> +#include <QtCore/qdebug.h> #include "qegl_p.h" #if defined(QT_OPENGL_ES) || defined(QT_OPENVG) @@ -80,8 +81,10 @@ bool QEglContext::createSurface(QPaintDevice *device) surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, 0); else surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, 0); + if (surf == EGL_NO_SURFACE) { - qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); + qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:" + << errorString(eglGetError()); return false; } return true; diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 0a2a196..60039eb 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2608,6 +2608,42 @@ const QGLContext* QGLContext::currentContext() visual. On other platforms it may work differently. */ +/*! \fn int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc) + + \bold{Win32 only:} This virtual function chooses a pixel format + that matches the OpenGL \link setFormat() format\endlink. + Reimplement this function in a subclass if you need a custom + context. + + \warning The \a dummyPfd pointer and \a pdc are used as a \c + PIXELFORMATDESCRIPTOR*. We use \c void to avoid using + Windows-specific types in our header files. + + \sa chooseContext() +*/ + +/*! \fn void *QGLContext::chooseVisual() + + \bold{X11 only:} This virtual function tries to find a visual that + matches the format, reducing the demands if the original request + cannot be met. + + The algorithm for reducing the demands of the format is quite + simple-minded, so override this method in your subclass if your + application has spcific requirements on visual selection. + + \sa chooseContext() +*/ + +/*! \fn void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) + \internal + + \bold{X11 only:} This virtual function chooses a visual that matches + the OpenGL \link format() format\endlink. Reimplement this function + in a subclass if you need a custom visual. + + \sa chooseContext() +*/ /*! \fn void QGLContext::reset() @@ -3124,11 +3160,10 @@ void QGLWidget::setFormat(const QGLFormat &format) */ /* - \obsolete - \fn void QGLWidget::setContext(QGLContext *context, - const QGLContext* shareContext, - bool deleteOldContext) + const QGLContext* shareContext, + bool deleteOldContext) + \obsolete Sets a new context for this widget. The QGLContext \a context must be created using \e new. QGLWidget will delete \a context when @@ -3278,9 +3313,10 @@ void QGLWidget::resizeOverlayGL(int, int) { } - +/*! \fn bool QGLWidget::event(QEvent *e) + \reimp +*/ #if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS) -/*! \reimp */ bool QGLWidget::event(QEvent *e) { Q_D(QGLWidget); @@ -3306,7 +3342,7 @@ bool QGLWidget::event(QEvent *e) glFinish(); doneCurrent(); } else if (e->type() == QEvent::ParentChange) { - if (d->glcx->d_func()->screen != d->xinfo.screen()) { + if (d->glcx->d_func()->screen != d->xinfo.screen() || testAttribute(Qt::WA_TranslucentBackground)) { setContext(new QGLContext(d->glcx->requestedFormat(), this)); // ### recreating the overlay isn't supported atm } @@ -4329,7 +4365,7 @@ Q_OPENGL_EXPORT const QString qt_gl_library_name() { if (qt_gl_lib_name()->isNull()) { #if defined(Q_WS_X11) || defined(Q_WS_QWS) - return QString(QLatin1String("GL")); + return QLatin1String("GL"); #else // Q_WS_MAC return QLatin1String("/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"); #endif @@ -4391,6 +4427,15 @@ void QGLDrawable::swapBuffers() void QGLDrawable::makeCurrent() { + previous_fbo = 0; + if (!pixmapData && !fbo) { + QGLContext *ctx = context(); + previous_fbo = ctx->d_ptr->current_fbo; + ctx->d_ptr->current_fbo = 0; + if (previous_fbo) + glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); + } + if (widget) widget->makeCurrent(); #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) @@ -4428,6 +4473,12 @@ void QGLDrawable::doneCurrent() } #endif + if (previous_fbo) { + QGLContext *ctx = context(); + ctx->d_ptr->current_fbo = previous_fbo; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, previous_fbo); + } + if (fbo && !wasBound) fbo->release(); } @@ -4510,9 +4561,16 @@ QColor QGLDrawable::backgroundColor() const { if (widget) return widget->palette().brush(widget->backgroundRole()).color(); + else if (pixmapData) + return pixmapData->fillColor(); return QApplication::palette().brush(QPalette::Background).color(); } +bool QGLDrawable::hasTransparentBackground() const +{ + return widget && widget->testAttribute(Qt::WA_TranslucentBackground); +} + QGLContext *QGLDrawable::context() const { if (widget) @@ -4532,6 +4590,8 @@ bool QGLDrawable::autoFillBackground() const { if (widget) return widget->autoFillBackground(); + else if (pixmapData) + return pixmapData->needsFill(); else return false; } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index b421eee..b1a63b5 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -314,6 +314,7 @@ public: QColor backgroundColor() const; QGLContext *context() const; bool autoFillBackground() const; + bool hasTransparentBackground() const; #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) QGLPixmapData *copyOnBegin() const; @@ -333,6 +334,7 @@ private: #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) QGLPixmapData *pixmapData; #endif + int previous_fbo; }; // GL extension definitions diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp index bd8569a..217b0fc 100644 --- a/src/opengl/qgl_win.cpp +++ b/src/opengl/qgl_win.cpp @@ -884,19 +884,9 @@ static bool qLogEq(bool a, bool b) return (((!a) && (!b)) || (a && b)); } -/*! - \bold{Win32 only:} This virtual function chooses a pixel - format that matches the OpenGL \link setFormat() format\endlink. - Reimplement this function in a subclass if you need a custom - context. - - \warning The \a dummyPfd pointer and \a pdc are used as a \c - PIXELFORMATDESCRIPTOR*. We use \c void to avoid using - Windows-specific types in our header files. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc) { Q_D(QGLContext); diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index cb51598..7429071 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -552,9 +552,6 @@ void QGLWidgetPrivate::updateColormap() ReleaseDC(q->winId(), hdc); } -/*! - \reimp -\*/ bool QGLWidget::event(QEvent *e) { Q_D(QGLWidget); diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 28c34de..28a50bd 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -433,7 +433,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) if (!d->gpm) return false; } - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { if (d->glFormat.swapInterval() == -1) d->glFormat.setSwapInterval(0); @@ -443,19 +443,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) return true; } - -/*! - \bold{X11 only:} This virtual function tries to find a - visual that matches the format, reducing the demands if the original - request cannot be met. - - The algorithm for reducing the demands of the format is quite - simple-minded, so override this method in your subclass if your - application has spcific requirements on visual selection. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ void *QGLContext::chooseVisual() { Q_D(QGLContext); @@ -519,25 +509,28 @@ void *QGLContext::chooseVisual() return vis; } - -/*! - \internal - - \bold{X11 only:} This virtual function chooses a visual - that matches the OpenGL \link format() format\endlink. Reimplement this - function in a subclass if you need a custom visual. - - \sa chooseContext() -*/ - +/* + See qgl.cpp for qdoc comment. + */ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) { Q_D(QGLContext); - int spec[40]; + int spec[45]; int i = 0; spec[i++] = GLX_LEVEL; spec[i++] = f.plane(); const QX11Info *xinfo = qt_x11Info(d->paintDevice); + bool useFBConfig = false; + +#if defined(GLX_VERSION_1_3) && !defined(QT_NO_XRENDER) + QWidget* widget = 0; + if (d->paintDevice->devType() == QInternal::Widget) + widget = static_cast<QWidget*>(d->paintDevice); + + // Only use glXChooseFBConfig for widgets if we're trying to get an ARGB visual + if (widget && widget->testAttribute(Qt::WA_TranslucentBackground) && X11->use_xrender) + useFBConfig = true; +#endif #if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info) static bool useTranspExt = false; @@ -565,28 +558,41 @@ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) useTranspExtChecked = true; } - if (f.plane() && useTranspExt) { + if (f.plane() && useTranspExt && !useFBConfig) { // Required to avoid non-transparent overlay visual(!) on some systems spec[i++] = GLX_TRANSPARENT_TYPE_EXT; spec[i++] = f.rgba() ? GLX_TRANSPARENT_RGB_EXT : GLX_TRANSPARENT_INDEX_EXT; } #endif +#if defined(GLX_VERSION_1_3) + // GLX_RENDER_TYPE is only in glx >=1.3 + if (useFBConfig) { + spec[i++] = GLX_RENDER_TYPE; + spec[i++] = f.rgba() ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; + } +#endif + if (f.doubleBuffer()) spec[i++] = GLX_DOUBLEBUFFER; + if (useFBConfig) + spec[i++] = True; if (f.depth()) { spec[i++] = GLX_DEPTH_SIZE; spec[i++] = f.depthBufferSize() == -1 ? 1 : f.depthBufferSize(); } if (f.stereo()) { spec[i++] = GLX_STEREO; + if (useFBConfig) + spec[i++] = True; } if (f.stencil()) { spec[i++] = GLX_STENCIL_SIZE; spec[i++] = f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize(); } if (f.rgba()) { - spec[i++] = GLX_RGBA; + if (!useFBConfig) + spec[i++] = GLX_RGBA; spec[i++] = GLX_RED_SIZE; spec[i++] = f.redBufferSize() == -1 ? 1 : f.redBufferSize(); spec[i++] = GLX_GREEN_SIZE; @@ -621,8 +627,86 @@ void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) spec[i++] = f.samples() == -1 ? 4 : f.samples(); } +#if defined(GLX_VERSION_1_3) + if (useFBConfig) { + spec[i++] = GLX_DRAWABLE_TYPE; + switch(d->paintDevice->devType()) { + case QInternal::Pixmap: + spec[i++] = GLX_PIXMAP_BIT; + break; + case QInternal::Pbuffer: + spec[i++] = GLX_PBUFFER_BIT; + break; + default: + qWarning("QGLContext: Unknown paint device type %d", d->paintDevice->devType()); + // Fall-through & assume it's a window + case QInternal::Widget: + spec[i++] = GLX_WINDOW_BIT; + break; + }; + } +#endif + spec[i] = XNone; - return glXChooseVisual(xinfo->display(), xinfo->screen(), spec); + + + XVisualInfo* chosenVisualInfo = 0; + +#if defined(GLX_VERSION_1_3) + while (useFBConfig) { + GLXFBConfig *configs; + int configCount = 0; + configs = glXChooseFBConfig(xinfo->display(), xinfo->screen(), spec, &configCount); + + if (!configs) + break; // fallback to trying glXChooseVisual + + for (i = 0; i < configCount; ++i) { + XVisualInfo* vi; + vi = glXGetVisualFromFBConfig(xinfo->display(), configs[i]); + if (!vi) + continue; + +#if !defined(QT_NO_XRENDER) + QWidget* w = 0; + if (d->paintDevice->devType() == QInternal::Widget) + w = static_cast<QWidget*>(d->paintDevice); + + if (w && w->testAttribute(Qt::WA_TranslucentBackground) && f.alpha()) { + // Attempt to find a config who's visual has a proper alpha channel + XRenderPictFormat *pictFormat; + pictFormat = XRenderFindVisualFormat(xinfo->display(), vi->visual); + + if (pictFormat && (pictFormat->type == PictTypeDirect) && pictFormat->direct.alphaMask) { + // The pict format for the visual matching the FBConfig indicates ARGB + if (chosenVisualInfo) + XFree(chosenVisualInfo); + chosenVisualInfo = vi; + break; + } + } else +#endif //QT_NO_XRENDER + if (chosenVisualInfo) { + // If we've got a visual we can use and we're not trying to find one with a + // real alpha channel, we might as well just use the one we've got + break; + } + + if (!chosenVisualInfo) + chosenVisualInfo = vi; // Have something to fall back to + else + XFree(vi); + } + + XFree(configs); + break; + } +#endif // defined(GLX_VERSION_1_3) + + if (!chosenVisualInfo) + chosenVisualInfo = glXChooseVisual(xinfo->display(), xinfo->screen(), spec); + + return chosenVisualInfo; } @@ -703,7 +787,7 @@ void QGLContext::swapBuffers() const static qt_glXWaitVideoSyncSGI glXWaitVideoSyncSGI = 0; static bool resolved = false; if (!resolved) { - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); @@ -948,7 +1032,7 @@ void *QGLContext::getProcAddress(const QString &proc) const if (resolved && !glXGetProcAddressARB) return 0; if (!glXGetProcAddressARB) { - QString glxExt = QString(QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS))); + QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_ARB_get_proc_address"))) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); @@ -1191,6 +1275,12 @@ void QGLWidget::setContext(QGLContext *context, d_func()->xinfo = parentWidget()->d_func()->xinfo; } + // If the application has set WA_TranslucentBackground and not explicitly set + // the alpha buffer size to zero, modify the format so it have an alpha channel + QGLFormat& fmt = d->glcx->d_func()->glFormat; + if (testAttribute(Qt::WA_TranslucentBackground) && fmt.alphaBufferSize() == -1) + fmt.setAlphaBufferSize(1); + bool createFailed = false; if (!d->glcx->isValid()) { if (!d->glcx->create(shareContext ? shareContext : oldcx)) diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 514e763..3c745b8 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -243,13 +243,24 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, return; } - - // Create the EGL Context (which will also choose the config for us) if (d->glcx) d->glcx->doneCurrent(); QGLContext* oldcx = d->glcx; d->glcx = context; + if (parentWidget()) { + // force creation of delay-created widgets + parentWidget()->winId(); + if (parentWidget()->x11Info().screen() != x11Info().screen()) + d_func()->xinfo = parentWidget()->d_func()->xinfo; + } + + // If the application has set WA_TranslucentBackground and not explicitly set + // the alpha buffer size to zero, modify the format so it have an alpha channel + QGLFormat& fmt = d->glcx->d_func()->glFormat; + if (testAttribute(Qt::WA_TranslucentBackground) && fmt.alphaBufferSize() == -1) + fmt.setAlphaBufferSize(1); + bool createFailed = false; if (!d->glcx->isValid()) { if (!d->glcx->create(shareContext ? shareContext : oldcx)) @@ -267,15 +278,6 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, return; } - - - // Make sure native winIds are avaliable - if (parentWidget()) { - parentWidget()->winId(); - if (parentWidget()->x11Info().screen() != x11Info().screen()) - d_func()->xinfo = parentWidget()->d_func()->xinfo; - } - bool visible = isVisible(); if (visible) hide(); @@ -384,6 +386,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, a.colormap = XCreateColormap(x11Info().display(), p, vi.visual, AllocNone); valueMask |= CWColormap; } + Window w = XCreateWindow(x11Info().display(), p, x(), y(), width(), height(), 0, vi.depth, InputOutput, vi.visual, valueMask, &a); @@ -406,6 +409,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, if (visible) show(); + XFlush(X11->display); d->glcx->setWindowCreated(true); } diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 2b7ad4f..3e7ca0a 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -395,7 +395,7 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At GLint maxSamples; glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSamples); - samples = qBound(1, samples, int(maxSamples)); + samples = qBound(1, int(samples), int(maxSamples)); glGenRenderbuffers(1, &color_buffer); glBindRenderbuffer(GL_RENDERBUFFER_EXT, color_buffer); @@ -804,8 +804,10 @@ bool QGLFramebufferObject::bind() const QGLContext *context = QGLContext::currentContext(); if (d->valid && context) { // Save the previous setting to automatically restore in release(). - d->previous_fbo = context->d_ptr->current_fbo; - context->d_ptr->current_fbo = d->fbo; + if (context->d_ptr->current_fbo != d->fbo) { + d->previous_fbo = context->d_ptr->current_fbo; + context->d_ptr->current_fbo = d->fbo; + } } return d->valid; } @@ -834,8 +836,10 @@ bool QGLFramebufferObject::release() const QGLContext *context = QGLContext::currentContext(); if (context) { // Restore the previous setting for stacked framebuffer objects. - context->d_ptr->current_fbo = d->previous_fbo; - glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->previous_fbo); + if (d->previous_fbo != context->d_ptr->current_fbo) { + context->d_ptr->current_fbo = d->previous_fbo; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, d->previous_fbo); + } d->previous_fbo = 0; } diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index efc58f2..483856a 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -76,13 +76,12 @@ \sa {opengl/pbuffers}{Pbuffers Example} */ +#include <private/qpaintengineex_opengl2_p.h> #include <qglpixelbuffer.h> #include <private/qglpixelbuffer_p.h> #include <qimage.h> -#include <private/qpaintengineex_opengl2_p.h> - #ifndef QT_OPENGL_ES_2 #include <private/qpaintengine_opengl_p.h> #endif diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index eb3298b..275bbed 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -192,15 +192,15 @@ bool QGLPixmapColorizeFilter::processGL(QPainter *, const QPointF &pos, const QP // generates convolution filter code for arbitrary sized kernel QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const { QByteArray code; - code.append("uniform sampler2D texture;\n"); - code.append("uniform vec2 inv_texture_size;\n"); - code.append("uniform float matrix["); + code.append("uniform sampler2D texture;\n" + "uniform vec2 inv_texture_size;\n" + "uniform float matrix["); code.append(QByteArray::number(m_kernelWidth * m_kernelHeight)); - code.append("];\n"); - code.append("vec2 offset["); + code.append("];\n" + "vec2 offset["); code.append(QByteArray::number(m_kernelWidth*m_kernelHeight)); - code.append("];\n"); - code.append("void main(void) {\n"); + code.append("];\n" + "void main(void) {\n"); for(int y = 0; y < m_kernelHeight; y++) { for(int x = 0; x < m_kernelWidth; x++) { @@ -210,22 +210,21 @@ QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const { code.append(QByteArray::number(x-(int)(m_kernelWidth/2))); code.append(".0, inv_texture_size.y * "); code.append(QByteArray::number((int)(m_kernelHeight/2)-y)); - code.append(".0)"); - code.append(";\n"); + code.append(".0);\n"); } } - code.append(" int i = 0;\n"); - code.append(" vec2 coords = gl_TexCoord[0].st;\n"); - code.append(" vec4 sum = vec4(0.0);\n"); - code.append(" for (i = 0; i < "); + code.append(" int i = 0;\n" + " vec2 coords = gl_TexCoord[0].st;\n" + " vec4 sum = vec4(0.0);\n" + " for (i = 0; i < "); code.append(QByteArray::number(m_kernelWidth * m_kernelHeight)); - code.append("; i++) {\n"); - code.append(" vec4 tmp = texture2D(texture,coords+offset[i]);\n"); - code.append(" sum += matrix[i] * tmp;\n"); - code.append(" }\n"); - code.append(" gl_FragColor = sum;\n"); - code.append("}"); + code.append("; i++) {\n" + " vec4 tmp = texture2D(texture,coords+offset[i]);\n" + " sum += matrix[i] * tmp;\n" + " }\n" + " gl_FragColor = sum;\n" + "}"); return code; } diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 6f7078a..e3d8a1d 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include <private/qtextengine_p.h> #include <qdebug.h> #include <private/qfontengine_p.h> #include <qmath.h> @@ -1331,9 +1330,15 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev) d->offscreen.begin(); - const QColor &c = d->drawable.backgroundColor(); - glClearColor(c.redF(), c.greenF(), c.blueF(), 1.0); if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) { + + if (d->drawable.hasTransparentBackground()) + glClearColor(0.0, 0.0, 0.0, 0.0); + else { + const QColor &c = d->drawable.backgroundColor(); + glClearColor(c.redF(), c.greenF(), c.blueF(), 1.0); + } + GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; #ifndef QT_OPENGL_ES clearBits |= GL_ACCUM_BUFFER_BIT; diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index c89b99b..85bcda5 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -103,6 +103,7 @@ QGLPixmapData::QGLPixmapData(PixelType type) , m_engine(0) , m_ctx(0) , m_dirty(false) + , m_hasFillColor(false) { setSerialNumber(++qt_gl_pixmap_serial); } @@ -196,6 +197,13 @@ void QGLPixmapData::fromImage(const QImage &image, resize(image.width(), image.height()); m_source = image; m_dirty = true; + m_hasFillColor = false; + + if (m_textureId) { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + glDeleteTextures(1, &m_textureId); + m_textureId = 0; + } } bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect) @@ -222,7 +230,11 @@ void QGLPixmapData::fill(const QColor &color) if (!isValid()) return; - if (!m_source.isNull()) { + if (useFramebufferObjects()) { + m_source = QImage(); + m_hasFillColor = true; + m_fillColor = color; + } else if (!m_source.isNull()) { m_source.fill(PREMUL(color.rgba())); } else { // ## TODO: improve performance here @@ -243,14 +255,18 @@ QImage QGLPixmapData::toImage() const if (!isValid()) return QImage(); - if (m_renderFbo) + if (m_renderFbo) { copyBackFromRenderFbo(true); - else if (!m_source.isNull()) + } else if (!m_source.isNull()) { return m_source; - else if (m_dirty) - return QImage(m_width, m_height, QImage::Format_ARGB32_Premultiplied); - else + } else if (m_dirty || m_hasFillColor) { + QImage img(m_width, m_height, QImage::Format_ARGB32_Premultiplied); + if (m_hasFillColor) + img.fill(PREMUL(m_fillColor.rgba())); + return img; + } else { ensureCreated(); + } QGLShareContextScope ctx(qt_gl_share_widget()->context()); extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha); @@ -272,6 +288,8 @@ void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const if (!isValid()) return; + m_hasFillColor = false; + const QGLContext *share_ctx = qt_gl_share_widget()->context(); QGLShareContextScope ctx(share_ctx); @@ -356,9 +374,12 @@ QPaintEngine* QGLPixmapData::paintEngine() const return m_engine; else if (!useFramebufferObjects()) { m_dirty = true; - if (m_source.size() != size()) m_source = QImage(size(), QImage::Format_ARGB32_Premultiplied); + if (m_hasFillColor) { + m_source.fill(PREMUL(m_fillColor.rgba())); + m_hasFillColor = false; + } return m_source.paintEngine(); } @@ -394,10 +415,17 @@ QPaintEngine* QGLPixmapData::paintEngine() const GLuint QGLPixmapData::bind(bool copyBack) const { - if (m_renderFbo && copyBack) + if (m_renderFbo && copyBack) { copyBackFromRenderFbo(true); - else + } else { + if (m_hasFillColor) { + m_dirty = true; + m_source = QImage(m_width, m_height, QImage::Format_ARGB32_Premultiplied); + m_source.fill(PREMUL(m_fillColor.rgba())); + m_hasFillColor = false; + } ensureCreated(); + } GLuint id = m_textureId; glBindTexture(GL_TEXTURE_2D, id); diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 536f33d..1b6b7ae 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -91,6 +91,9 @@ public: bool isUninitialized() const { return m_dirty && m_source.isNull(); } + bool needsFill() const { return m_hasFillColor; } + QColor fillColor() const { return m_fillColor; } + QSize size() const { return QSize(m_width, m_height); } int width() const { return m_width; } int height() const { return m_height; } @@ -116,11 +119,18 @@ private: int m_height; mutable QGLFramebufferObject *m_renderFbo; - mutable uint m_textureId; + mutable GLuint m_textureId; mutable QPaintEngine *m_engine; mutable QGLContext *m_ctx; - mutable bool m_dirty; mutable QImage m_source; + + // the texture is not in sync with the source image + mutable bool m_dirty; + + // fill has been called and no painting has been done, so the pixmap is + // represented by a single fill color + mutable QColor m_fillColor; + mutable bool m_hasFillColor; }; QT_END_NAMESPACE diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index a3422b5..965c7a5 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -405,8 +405,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & drawTexture(rect, d_ptr->tex_id, window()->size(), rect); } } -#endif } +#endif d_ptr->paintedRegion = QRegion(); context()->swapBuffers(); diff --git a/src/opengl/util/generator.cpp b/src/opengl/util/generator.cpp index de2450d..dac5a2d 100644 --- a/src/opengl/util/generator.cpp +++ b/src/opengl/util/generator.cpp @@ -116,7 +116,7 @@ QList<QStringPair> readConf(const QString &confFile) lineStream >> enumerator; if (lineStream.atEnd()) { - qDebug() << "Error in file" << confFile << "(" << enumerator << ")"; + qDebug() << "Error in file" << confFile << '(' << enumerator << ')'; exit(0); } diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp index 9297d6e..6d8c184 100644 --- a/src/plugins/accessible/widgets/rangecontrols.cpp +++ b/src/plugins/accessible/widgets/rangecontrols.cpp @@ -799,7 +799,7 @@ int QAccessibleSlider::defaultAction(int /*child*/) const /*! \internal */ QString QAccessibleSlider::actionText(int /*action*/, Text /*t*/, int /*child*/) const { - return QString(QLatin1String("")); + return QLatin1String(""); } QAccessibleAbstractSlider::QAccessibleAbstractSlider(QWidget *w, Role r) diff --git a/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp b/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp index 3a40b4c..da61a22 100644 --- a/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp +++ b/src/plugins/gfxdrivers/hybrid/hybridscreen.cpp @@ -103,11 +103,11 @@ bool HybridScreen::connect(const QString &displaySpec) { QString dspec = displaySpec; if (dspec.startsWith(QLatin1String("hybrid:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("hybrid:")).size()); + dspec = dspec.mid(QString::fromLatin1("hybrid:").size()); else if (dspec.compare(QLatin1String("hybrid"), Qt::CaseInsensitive) == 0) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index b7f03ba..8be3672 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -2100,11 +2100,11 @@ bool QVNCScreen::connect(const QString &displaySpec) { QString dspec = displaySpec; if (dspec.startsWith(QLatin1String("vnc:"), Qt::CaseInsensitive)) - dspec = dspec.mid(QString(QLatin1String("vnc:")).size()); + dspec = dspec.mid(QString::fromLatin1("vnc:").size()); else if (dspec.compare(QLatin1String("vnc"), Qt::CaseInsensitive) == 0) dspec = QString(); - const QString displayIdSpec = QString(QLatin1String(" :%1")).arg(displayId); + const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId); if (dspec.endsWith(displayIdSpec)) dspec = dspec.left(dspec.size() - displayIdSpec.size()); diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro index 0835ce1..3de8ab2 100644 --- a/src/plugins/sqldrivers/odbc/odbc.pro +++ b/src/plugins/sqldrivers/odbc/odbc.pro @@ -4,15 +4,9 @@ HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h SOURCES = main.cpp \ ../../../sql/drivers/odbc/qsql_odbc.cpp -mac { - !contains( LIBS, .*odbc.* ) { - LIBS *= -liodbc - } -} - unix { !contains( LIBS, .*odbc.* ) { - LIBS *= -lodbc + LIBS *= $$QT_LFLAGS_ODBC } } diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index b9f8196..e41941b 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -3879,7 +3879,7 @@ void Q3FileDialog::detailViewSelectionChanged() d->moreFiles->setSelected(f->i, i->isSelected()); } if (i->isSelected() && !((Q3FileDialogPrivate::File *)i)->info.isDir()) - str += QString(QLatin1String("\"%1\" ")).arg(i->text(0)); + str += QString::fromLatin1("\"%1\" ").arg(i->text(0)); i = i->nextSibling(); } d->moreFiles->blockSignals(false); @@ -3931,7 +3931,7 @@ void Q3FileDialog::listBoxSelectionChanged() } if (d->moreFiles->isSelected(i) && !((Q3FileDialogPrivate::File*)(mcitem)->i)->info.isDir()) { - str += QString(QLatin1String("\"%1\" ")).arg(i->text()); + str += QString::fromLatin1("\"%1\" ").arg(i->text()); if (j == 0) j = i; } @@ -5757,8 +5757,8 @@ void Q3FileDialog::insertEntry(const Q3ValueList<QUrlInfo> &lst, Q3NetworkOperat if (!bShowHiddenFiles && inf.name() != QLatin1String("..")) { if (d->url.isLocalFile()) { QString file = d->url.path(); - if (!file.endsWith(QLatin1String("/"))) - file.append(QLatin1String("/")); + if (!file.endsWith(QLatin1Char('/'))) + file.append(QLatin1Char('/')); file += inf.name(); QT_WA({ if (GetFileAttributesW((TCHAR*)file.ucs2()) & FILE_ATTRIBUTE_HIDDEN) diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp index f1c749ec..18bebf1 100644 --- a/src/qt3support/dialogs/q3filedialog_mac.cpp +++ b/src/qt3support/dialogs/q3filedialog_mac.cpp @@ -554,7 +554,7 @@ QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &fi retstr = QString::fromUtf8((const char *)str_buffer); //now filename CFStringGetCString(ret.saveFileName, (char *)str_buffer, 1024, kCFStringEncodingUTF8); - retstr += QLatin1String("/") + QString::fromUtf8((const char *)str_buffer); + retstr += QLatin1Char('/') + QString::fromUtf8((const char *)str_buffer); } NavDisposeReply(&ret); if(selectedFilter) diff --git a/src/qt3support/dialogs/q3filedialog_win.cpp b/src/qt3support/dialogs/q3filedialog_win.cpp index 1be797a..a1c98f3 100644 --- a/src/qt3support/dialogs/q3filedialog_win.cpp +++ b/src/qt3support/dialogs/q3filedialog_win.cpp @@ -737,7 +737,7 @@ QString Q3FileDialog::winGetExistingDirectory(const QString& initialDirectory, QDir::setCurrent(currentDir); if (!result.isEmpty()) - result.replace(QLatin1String("\\"), QLatin1String("/")); + result.replace(QLatin1Char('\\'), QLatin1Char('/')); return result; #else return QString(); diff --git a/src/qt3support/itemviews/q3iconview.cpp b/src/qt3support/itemviews/q3iconview.cpp index d1a9c1e..a5664de 100644 --- a/src/qt3support/itemviews/q3iconview.cpp +++ b/src/qt3support/itemviews/q3iconview.cpp @@ -614,7 +614,7 @@ QByteArray Q3IconDrag::encodedData(const char* mime) const (*it).item.textRect().x()).arg((*it).item.textRect().y()). arg((*it).item.textRect().width()).arg( (*it).item.textRect().height()); - k += QString(QLatin1String((*it).data.data())) + QLatin1String("$@@$"); + k += QString::fromLatin1((*it).data.data()) + QLatin1String("$@@$"); s += k; } @@ -1820,8 +1820,8 @@ void Q3IconViewItem::calcRect(const QString &text_) tw = r.width(); th = r.height(); - if (tw < view->d->fm->width(QLatin1String("X"))) - tw = view->d->fm->width(QLatin1String("X")); + if (tw < view->d->fm->width(QLatin1Char('X'))) + tw = view->d->fm->width(QLatin1Char('X')); itemTextRect.setWidth(tw); itemTextRect.setHeight(th); diff --git a/src/qt3support/network/q3dns.cpp b/src/qt3support/network/q3dns.cpp index c53f2ff..3ca3977 100644 --- a/src/qt3support/network/q3dns.cpp +++ b/src/qt3support/network/q3dns.cpp @@ -1738,7 +1738,7 @@ void Q3Dns::setLabel( const QString & label ) const char * dom; while( (dom=it.current()) != 0 ) { ++it; - n.append( l.lower() + QLatin1String(".") + QLatin1String(dom) ); + n.append( l.lower() + QLatin1Char('.') + QLatin1String(dom) ); } } n.append( l.lower() ); @@ -1902,8 +1902,8 @@ QString Q3Dns::toInAddrArpaDomain( const QHostAddress &address ) s = QLatin1String("ip6.arpa"); uint b = 0; while( b < 16 ) { - s = QString::number( i.c[b]%16, 16 ) + QLatin1String(".") + - QString::number( i.c[b]/16, 16 ) + QLatin1String(".") + s; + s = QString::number( i.c[b]%16, 16 ) + QLatin1Char('.') + + QString::number( i.c[b]/16, 16 ) + QLatin1Char('.') + s; b++; } } @@ -2347,7 +2347,7 @@ void Q3Dns::doResInit() nameServer += QLatin1String(dnsServer->IpAddress.String); dnsServer = dnsServer->Next; if ( dnsServer != 0 ) - nameServer += QLatin1String(" "); + nameServer += QLatin1Char(' '); } searchList = QLatin1String(""); separator = ' '; @@ -2360,12 +2360,12 @@ void Q3Dns::doResInit() } if ( !gotNetworkParams ) { if ( getDnsParamsFromRegistry( - QString( QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters") ), + QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters"), &domainName, &nameServer, &searchList )) { // for NT separator = ' '; } else if ( getDnsParamsFromRegistry( - QString( QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP") ), + QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP"), &domainName, &nameServer, &searchList )) { // for Windows 98 separator = ','; @@ -2395,7 +2395,7 @@ void Q3Dns::doResInit() } while( first < (int)nameServer.length() ); } - searchList = searchList + QLatin1String(" ") + domainName; + searchList += QLatin1Char(' ') + domainName; searchList = searchList.simplifyWhiteSpace().lower(); first = 0; do { @@ -2488,7 +2488,7 @@ void Q3Dns::doResInit() while ( !stream.atEnd() ) { line = stream.readLine(); QStringList list = QStringList::split( QLatin1String(" "), line ); - if( line.startsWith( QLatin1String("#") ) || list.size() < 2 ) + if( line.startsWith( QLatin1Char('#') ) || list.size() < 2 ) continue; const QString type = list[0].lower(); diff --git a/src/qt3support/network/q3ftp.cpp b/src/qt3support/network/q3ftp.cpp index 5ab84cc..44c1f5c 100644 --- a/src/qt3support/network/q3ftp.cpp +++ b/src/qt3support/network/q3ftp.cpp @@ -485,7 +485,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf dateStr += lst[ 6 ]; dateStr += QLatin1Char(' '); - if ( lst[ 7 ].contains( QLatin1String(":") ) ) { + if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { time = QTime( lst[ 7 ].left( 2 ).toInt(), lst[ 7 ].right( 2 ).toInt() ); dateStr += QString::number( QDate::currentDate().year() ); } else { @@ -495,7 +495,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf QDate date = QDate::fromString( dateStr ); info->setLastModified( QDateTime( date, time ) ); - if ( lst[ 7 ].contains( QLatin1String(":") ) ) { + if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { const int futureTolerance = 600; if( info->lastModified().secsTo( QDateTime::currentDateTime() ) < -futureTolerance ) { QDateTime dt = info->lastModified(); @@ -512,7 +512,7 @@ bool Q3FtpDTP::parseDir( const QString &buffer, const QString &userName, QUrlInf else { QString n; for ( uint i = 8; i < (uint) lst.count(); ++i ) - n += lst[ i ] + QLatin1String(" "); + n += lst[ i ] + QLatin1Char(' '); n = n.stripWhiteSpace(); info->setName( n ); } @@ -897,7 +897,7 @@ bool Q3FtpPI::processReply() // ### error handling } else { QStringList lst = addrPortPattern.capturedTexts(); - QString host = lst[1] + QLatin1String(".") + lst[2] + QLatin1String(".") + lst[3] + QLatin1String(".") + lst[4]; + QString host = lst[1] + QLatin1Char('.') + lst[2] + QLatin1Char('.') + lst[3] + QLatin1Char('.') + lst[4]; Q_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt(); waitForDtpToConnect = true; dtp.connectToHost( host, port ); @@ -1435,8 +1435,8 @@ int Q3Ftp::connectToHost( const QString &host, Q_UINT16 port ) int Q3Ftp::login( const QString &user, const QString &password ) { QStringList cmds; - cmds << ( QString(QLatin1String("USER ")) + ( user.isNull() ? QString(QLatin1String("anonymous")) : user ) + QLatin1String("\r\n") ); - cmds << ( QString(QLatin1String("PASS ")) + ( password.isNull() ? QString(QLatin1String("anonymous@")) : password ) + QLatin1String("\r\n") ); + cmds << ( QString::fromLatin1("USER ") + ( user.isNull() ? QString::fromLatin1("anonymous") : user ) + QLatin1String("\r\n") ); + cmds << ( QString::fromLatin1("PASS ") + ( password.isNull() ? QString::fromLatin1("anonymous@") : password ) + QLatin1String("\r\n") ); return addCommand( new Q3FtpCommand( Login, cmds ) ); } @@ -2095,7 +2095,7 @@ void Q3Ftp::operationListChildren( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); list(); emit start( op ); } @@ -2115,7 +2115,7 @@ void Q3Ftp::operationRemove( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); remove( Q3Url( op->arg( 0 ) ).path() ); } @@ -2125,7 +2125,7 @@ void Q3Ftp::operationRename( Q3NetworkOperation *op ) { op->setState( StInProgress ); - cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) ); + cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); rename( op->arg( 0 ), op->arg( 1 )); } @@ -2179,8 +2179,8 @@ bool Q3Ftp::checkConnection( Q3NetworkOperation *op ) connectToHost( url()->host(), url()->port() != -1 ? url()->port() : 21 ); break; } - QString user = url()->user().isEmpty() ? QString( QLatin1String("anonymous") ) : url()->user(); - QString pass = url()->password().isEmpty() ? QString( QLatin1String("anonymous@") ) : url()->password(); + QString user = url()->user().isEmpty() ? QString::fromLatin1("anonymous") : url()->user(); + QString pass = url()->password().isEmpty() ? QString::fromLatin1("anonymous@") : url()->password(); login( user, pass ); } diff --git a/src/qt3support/network/q3http.cpp b/src/qt3support/network/q3http.cpp index 591b381..aabf4a3 100644 --- a/src/qt3support/network/q3http.cpp +++ b/src/qt3support/network/q3http.cpp @@ -468,7 +468,7 @@ bool Q3HttpHeader::parse( const QString& str ) if ( !(*it).isEmpty() ) { if ( (*it)[0].isSpace() ) { if ( !lines.isEmpty() ) { - lines.last() += QLatin1String(" "); + lines.last() += QLatin1Char(' '); lines.last() += (*it).stripWhiteSpace(); } } else { @@ -562,7 +562,7 @@ void Q3HttpHeader::removeValue( const QString& key ) */ bool Q3HttpHeader::parseLine( const QString& line, int ) { - int i = line.find( QLatin1String(":") ); + int i = line.find( QLatin1Char(':') ); if ( i == -1 ) return false; @@ -647,7 +647,7 @@ QString Q3HttpHeader::contentType() const if ( type.isEmpty() ) return QString(); - int pos = type.find( QLatin1String(";") ); + int pos = type.find( QLatin1Char(';') ); if ( pos == -1 ) return type; @@ -2210,7 +2210,7 @@ void Q3Http::clientReply( const Q3HttpResponseHeader &rep ) if ( rep.statusCode() >= 400 && rep.statusCode() < 600 ) { op->setState( StFailed ); op->setProtocolDetail( - QString(QLatin1String("%1 %2")).arg(rep.statusCode()).arg(rep.reasonPhrase()) + QString::fromLatin1("%1 %2").arg(rep.statusCode()).arg(rep.reasonPhrase()) ); switch ( rep.statusCode() ) { case 401: diff --git a/src/qt3support/network/q3url.cpp b/src/qt3support/network/q3url.cpp index fc2fdb2..68753b6 100644 --- a/src/qt3support/network/q3url.cpp +++ b/src/qt3support/network/q3url.cpp @@ -211,8 +211,8 @@ Q3Url::Q3Url( const Q3Url& url ) bool Q3Url::isRelativeUrl( const QString &url ) { - int colon = url.find( QLatin1String(":") ); - int slash = url.find( QLatin1String("/") ); + int colon = url.find( QLatin1Char(':') ); + int slash = url.find( QLatin1Char('/') ); return ( slash != 0 && ( colon == -1 || ( slash != -1 && colon > slash ) ) ); } @@ -280,8 +280,8 @@ Q3Url::Q3Url( const Q3Url& url, const QString& relUrl, bool checkSlash ) if ( !d->host.isEmpty() && !d->user.isEmpty() && !d->pass.isEmpty() ) p = QLatin1String("/"); } - if ( !p.isEmpty() && p.right(1)!=QLatin1String("/") ) - p += QLatin1String("/"); + if ( !p.isEmpty() && !p.endsWith(QLatin1Char('/')) ) + p += QLatin1Char('/'); p += rel; d->path = p; d->cleanPathDirty = true; @@ -678,7 +678,7 @@ bool Q3Url::parse( const QString& url ) ++cs; while ( url_[ cs ] == QLatin1Char('/') ) ++cs; - int slash = url_.find( QLatin1String("/"), cs ); + int slash = url_.find( QLatin1Char('/'), cs ); if ( slash == -1 ) slash = url_.length() - 1; QString tmp = url_.mid( cs, slash - cs + 1 ); @@ -686,7 +686,7 @@ bool Q3Url::parse( const QString& url ) if ( !tmp.isEmpty() ) { // if this part exists // look for the @ in this part - int at = tmp.find( QLatin1String("@") ); + int at = tmp.find( QLatin1Char('@') ); if ( at != -1 ) at += cs; // we have no @, which means host[:port], so directly @@ -793,7 +793,7 @@ bool Q3Url::parse( const QString& url ) // hack for windows if ( d->path.length() == 2 && d->path[ 1 ] == QLatin1Char(':') ) - d->path += QLatin1String("/"); + d->path += QLatin1Char('/'); // #### do some corrections, should be done nicer too if ( !d->pass.isEmpty() ) { @@ -808,7 +808,7 @@ bool Q3Url::parse( const QString& url ) if ( d->path[ 0 ] == QLatin1Char('@') || d->path[ 0 ] == QLatin1Char(':') ) d->path.remove( (uint)0, 1 ); if ( d->path[ 0 ] != QLatin1Char('/') && !relPath && d->path[ 1 ] != QLatin1Char(':') ) - d->path.prepend( QLatin1String("/") ); + d->path.prepend( QLatin1Char('/') ); } if ( !d->refEncoded.isEmpty() && d->refEncoded[ 0 ] == QLatin1Char('#') ) d->refEncoded.remove( (uint)0, 1 ); @@ -820,9 +820,9 @@ bool Q3Url::parse( const QString& url ) #if defined(Q_OS_WIN32) // hack for windows file://machine/path syntax if ( d->protocol == QLatin1String("file") ) { - if ( url.left( 7 ) == QLatin1String("file://") && + if ( url.startsWith(QLatin1String("file://")) && d->path.length() > 1 && d->path[ 1 ] != QLatin1Char(':') ) - d->path.prepend( QLatin1String("/") ); + d->path.prepend( QLatin1Char('/') ); } #endif @@ -942,7 +942,7 @@ void Q3Url::setFileName( const QString& name ) p += fn; if ( !d->queryEncoded.isEmpty() ) - p += QLatin1String("?") + d->queryEncoded; + p += QLatin1Char('?') + d->queryEncoded; setEncodedPathAndQuery( p ); } @@ -961,7 +961,7 @@ QString Q3Url::encodedPathAndQuery() encode( p ); if ( !d->queryEncoded.isEmpty() ) { - p += QLatin1String("?"); + p += QLatin1Char('?'); p += d->queryEncoded; } @@ -1011,7 +1011,7 @@ QString Q3Url::path( bool correct ) const } else if ( isLocalFile() ) { #if defined(Q_OS_WIN32) // hack for stuff like \\machine\path and //machine/path on windows - if ( ( d->path.left( 1 ) == QLatin1String("/") || d->path.left( 1 ) == QLatin1String("\\") ) && + if ( ( d->path.startsWith(QLatin1Char('/')) || d->path.startsWith(QLatin1Char('\\')) ) && d->path.length() > 1 ) { d->cleanPath = d->path; bool share = (d->cleanPath[0] == QLatin1Char('\\') && d->cleanPath[1] == QLatin1Char('\\')) || @@ -1021,7 +1021,7 @@ QString Q3Url::path( bool correct ) const if ( share ) { check = false; while (d->cleanPath.at(0) != QLatin1Char('/') || d->cleanPath.at(1) != QLatin1Char('/')) - d->cleanPath.prepend(QLatin1String("/")); + d->cleanPath.prepend(QLatin1Char('/')); } } #endif @@ -1036,7 +1036,7 @@ QString Q3Url::path( bool correct ) const dir = QDir::cleanDirPath( canPath ); else dir = QDir::cleanDirPath( QDir( d->path ).absPath() ); - dir += QLatin1String("/"); + dir += QLatin1Char('/'); if ( dir == QLatin1String("//") ) d->cleanPath = QLatin1String("/"); else @@ -1046,14 +1046,13 @@ QString Q3Url::path( bool correct ) const QDir::cleanDirPath( (qt_resolve_symlinks ? fi.dir().canonicalPath() : fi.dir().absPath()) ); - d->cleanPath = p + QLatin1String("/") + fi.fileName(); + d->cleanPath = p + QLatin1Char('/') + fi.fileName(); } } } else { - if ( d->path != QLatin1String("/") && d->path[ (int)d->path.length() - 1 ] == QLatin1Char('/') ) - d->cleanPath = QDir::cleanDirPath( d->path ) + QLatin1String("/"); - else d->cleanPath = QDir::cleanDirPath( d->path ); + if ( d->path.length() > 1 && d->path.endsWith(QLatin1Char('/')) ) + d->cleanPath += QLatin1Char('/'); } if ( check ) @@ -1084,9 +1083,9 @@ bool Q3Url::isLocalFile() const QString Q3Url::fileName() const { - if ( d->path.isEmpty() || d->path.endsWith( QLatin1String("/") ) + if ( d->path.isEmpty() || d->path.endsWith( QLatin1Char('/') ) #ifdef Q_WS_WIN - || d->path.endsWith( QLatin1String("\\") ) + || d->path.endsWith( QLatin1Char('\\') ) #endif ) return QString(); @@ -1110,12 +1109,12 @@ void Q3Url::addPath( const QString& pa ) if ( path().isEmpty() ) { if ( p[ 0 ] != QLatin1Char( '/' ) ) - d->path = QLatin1String("/") + p; + d->path = QLatin1Char('/') + p; else d->path = p; } else { if ( p[ 0 ] != QLatin1Char( '/' ) && d->path[ (int)d->path.length() - 1 ] != QLatin1Char('/') ) - d->path += QLatin1String("/") + p; + d->path += QLatin1Char('/') + p; else d->path += p; } @@ -1250,11 +1249,11 @@ QString Q3Url::toString( bool encodedPath, bool forcePrependProtocol ) const if ( isLocalFile() ) { if ( forcePrependProtocol ) - res = d->protocol + QLatin1String(":") + p; + res = d->protocol + QLatin1Char(':') + p; else res = p; } else if ( d->protocol == QLatin1String("mailto") ) { - res = d->protocol + QLatin1String(":") + p; + res = d->protocol + QLatin1Char(':') + p; } else { res = d->protocol + QLatin1String("://"); if ( !d->user.isEmpty() || !d->pass.isEmpty() ) { @@ -1267,24 +1266,24 @@ QString Q3Url::toString( bool encodedPath, bool forcePrependProtocol ) const if ( !d->pass.isEmpty() ) { tmp = d->pass; encode( tmp ); - res += QLatin1String(":") + tmp; + res += QLatin1Char(':') + tmp; } - res += QLatin1String("@"); + res += QLatin1Char('@'); } res += d->host; if ( d->port != -1 ) - res += QLatin1String(":") + QString( QLatin1String("%1") ).arg( d->port ); + res += QLatin1Char(':') + QString::number( d->port ); if ( !p.isEmpty() ) { if ( !d->host.isEmpty() && p[0]!= QLatin1Char( '/' ) ) - res += QLatin1String("/"); + res += QLatin1Char('/'); res += p; } } if ( !d->refEncoded.isEmpty() ) - res += QLatin1String("#") + d->refEncoded; + res += QLatin1Char('#') + d->refEncoded; if ( !d->queryEncoded.isEmpty() ) - res += QLatin1String("?") + d->queryEncoded; + res += QLatin1Char('?') + d->queryEncoded; return res; } diff --git a/src/qt3support/network/q3urloperator.cpp b/src/qt3support/network/q3urloperator.cpp index b415e12..6afd8ab 100644 --- a/src/qt3support/network/q3urloperator.cpp +++ b/src/qt3support/network/q3urloperator.cpp @@ -579,7 +579,7 @@ Q3PtrList<Q3NetworkOperation> Q3UrlOperator::copy( const QString &from, const QS if (frm == to + file) return ops; - file.prepend( QLatin1String("/") ); + file.prepend( QLatin1Char('/') ); // uFrom and uTo are deleted when the Q3NetworkProtocol deletes itself via // autodelete diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp index fb57220..89ffe24 100644 --- a/src/qt3support/other/q3dragobject.cpp +++ b/src/qt3support/other/q3dragobject.cpp @@ -93,7 +93,7 @@ public: Q3TextDragPrivate() { setSubType(QLatin1String("plain")); } void setSubType(const QString & st) { subtype = st; - fmt = QString(QLatin1String("text/")).toLatin1() + subtype.toLatin1(); + fmt = "text/" + subtype.toLatin1(); } QString txt; @@ -208,11 +208,6 @@ void Q3DragObject::setPixmap(QPixmap pm, const QPoint& hotspot) Q_D(Q3DragObject); d->pixmap = pm; d->hot = hotspot; -#if 0 - QDragManager *manager = QDragManager::self(); - if (manager && manager->object == d->data) - manager->updatePixmap(); -#endif } /*! @@ -1302,7 +1297,7 @@ QByteArray Q3UriDrag::localFileToUri(const QString& filename) r.prepend(QString::fromLatin1(hostname)); } #endif - return unicodeUriToUri(QString(QLatin1String("file://") + r)); + return unicodeUriToUri(QLatin1String("file://") + r); } /*! @@ -1357,7 +1352,7 @@ QString Q3UriDrag::uriToLocalFile(const char* uri) return file; if (0==qstrnicmp(uri,"file:/",6)) // It is a local file uri uri += 6; - else if (QString(QLatin1String(uri)).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri + else if (QString::fromLatin1(uri).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri return file; bool local = uri[0] != '/' || (uri[0] != '\0' && uri[1] == '/'); diff --git a/src/qt3support/other/q3process.cpp b/src/qt3support/other/q3process.cpp index 6eac812..9689de9 100644 --- a/src/qt3support/other/q3process.cpp +++ b/src/qt3support/other/q3process.cpp @@ -483,7 +483,7 @@ QString Q3Process::readLineStdout() return QString(); if ( !buf->scanNewline( &a ) ) - return QString( QLatin1String(buf->readAll()) ); + return QLatin1String(buf->readAll()); } uint size = a.size(); diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp index 098c581..2492bf2 100644 --- a/src/qt3support/other/q3process_unix.cpp +++ b/src/qt3support/other/q3process_unix.cpp @@ -828,7 +828,7 @@ bool Q3Process::start( QStringList *env ) #ifndef QT_NO_DIR QFileInfo fileInfo( dir, command ); #else - QFileInfo fileInfo( dir + "/" + command ); + QFileInfo fileInfo( dir + QLatin1Char('/') + command ); #endif if ( fileInfo.isExecutable() ) { #if defined(Q_OS_MACX) diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp index 3c862ee..7dc28cb 100644 --- a/src/qt3support/other/q3process_win.cpp +++ b/src/qt3support/other/q3process_win.cpp @@ -285,7 +285,7 @@ bool Q3Process::start( QStringList *env ) for ( ; it != _arguments.end(); ++it ) { QString tmp = *it; // escape a single " because the arguments will be parsed - tmp.replace( QLatin1String("\""), QLatin1String("\\\"") ); + tmp.replace( QLatin1Char('\"'), QLatin1String("\\\"") ); if ( tmp.isEmpty() || tmp.contains( QLatin1Char(' ') ) || tmp.contains( QLatin1Char('\t') ) ) { // The argument must not end with a \ since this would be interpreted // as escaping the quote -- rather put the \ behind the quote: e.g. @@ -294,9 +294,9 @@ bool Q3Process::start( QStringList *env ) int i = tmp.length(); while ( i>0 && tmp.at( i-1 ) == QLatin1Char('\\') ) { --i; - endQuote += QLatin1String("\\"); + endQuote += QLatin1Char('\\'); } - args += QString( QLatin1String(" \"") ) + tmp.left( i ) + endQuote; + args += QLatin1String(" \"") + tmp.left( i ) + endQuote; } else { args += QLatin1Char(' ') + tmp; } @@ -330,7 +330,7 @@ bool Q3Process::start( QStringList *env ) // add PATH if necessary (for DLL loading) QByteArray path = qgetenv( "PATH" ); if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) { - QString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData())); + QString tmp = QString::fromLatin1("PATH=%1").arg(QLatin1String(path.constData())); uint tmpSize = sizeof(TCHAR) * (tmp.length()+1); envlist.resize( envlist.size() + tmpSize ); memcpy( envlist.data()+pos, tmp.ucs2(), tmpSize ); @@ -378,7 +378,7 @@ bool Q3Process::start( QStringList *env ) // add PATH if necessary (for DLL loading) QByteArray path = qgetenv( "PATH" ); if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) { - Q3CString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData())).local8Bit(); + Q3CString tmp = QString::fromLatin1("PATH=%1").arg(QString::fromLatin1(path.constData())).local8Bit(); uint tmpSize = tmp.length() + 1; envlist.resize( envlist.size() + tmpSize ); memcpy( envlist.data()+pos, tmp.data(), tmpSize ); diff --git a/src/qt3support/painting/q3paintengine_svg.cpp b/src/qt3support/painting/q3paintengine_svg.cpp index 95528e8..22e0d49 100644 --- a/src/qt3support/painting/q3paintengine_svg.cpp +++ b/src/qt3support/painting/q3paintengine_svg.cpp @@ -263,7 +263,7 @@ void Q3SVGPaintEngine::updateClipPath(const QPainterPath &path, Qt::ClipOperatio QDomElement e; d->currentClip++; e = d->doc.createElement(QLatin1String("clipPath")); - e.setAttribute(QLatin1String("id"), QString(QLatin1String("clip%1")).arg(d->currentClip)); + e.setAttribute(QLatin1String("id"), QString::fromLatin1("clip%1").arg(d->currentClip)); QDomElement path_element = d->doc.createElement(QLatin1String("path")); path_element.setAttribute(QLatin1String("d"), qt_svg_compose_path(path)); @@ -509,14 +509,14 @@ bool Q3SVGPaintEngine::save(const QString &fileName) int icount = 0; ImageList::Iterator iit = d->images.begin(); for (; iit != d->images.end(); ++iit) { - QString href = QString(QLatin1String("%1_%2.png")).arg(svgName).arg(icount); + QString href = QString::fromLatin1("%1_%2.png").arg(svgName).arg(icount); (*iit).image.save(href, "PNG"); (*iit).element.setAttribute(QLatin1String("xlink:href"), href); icount++; } PixmapList::Iterator pit = d->pixmaps.begin(); for (; pit != d->pixmaps.end(); ++pit) { - QString href = QString(QLatin1String("%1_%2.png")).arg(svgName).arg(icount); + QString href = QString::fromLatin1("%1_%2.png").arg(svgName).arg(icount); (*pit).pixmap.save(href, "PNG"); (*pit).element.setAttribute(QLatin1String("xlink:href"), href); icount++; @@ -592,7 +592,7 @@ void Q3SVGPaintEnginePrivate::appendChild(QDomElement &e, QPicturePrivate::Paint if (c == QPicturePrivate::PdcSetClipRegion || c == QPicturePrivate::PdcSetClipPath) { QDomElement ne; ne = doc.createElement(QLatin1String("g")); - ne.setAttribute(QLatin1String("style"), QString(QLatin1String("clip-path:url(#clip%1)")).arg(currentClip)); + ne.setAttribute(QLatin1String("style"), QString::fromLatin1("clip-path:url(#clip%1)").arg(currentClip)); if (dirtyTransform) { applyTransform(&ne); dirtyTransform = false; @@ -621,12 +621,12 @@ void Q3SVGPaintEnginePrivate::applyStyle(QDomElement *e, QPicturePrivate::PaintC if (c == QPicturePrivate::PdcDrawText2 || c == QPicturePrivate::PdcDrawText2Formatted) { // QPainter has a reversed understanding of pen/stroke vs. // brush/fill for text - s += QString(QLatin1String("fill:rgb(%1,%2,%3);")).arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); - s += QString(QLatin1String("stroke-width:0;")); + s += QString::fromLatin1("fill:rgb(%1,%2,%3);").arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); + s += QLatin1String("stroke-width:0;"); QFont f = cfont; QFontInfo fi(f); - s += QString(QLatin1String("font-size:%1;")).arg(fi.pointSize()); - s += QString(QLatin1String("font-style:%1;")).arg(f.italic() ? QLatin1String("italic") : QLatin1String("normal")); + s += QString::fromLatin1("font-size:%1;").arg(fi.pointSize()); + s += QString::fromLatin1("font-style:%1;").arg(f.italic() ? QLatin1String("italic") : QLatin1String("normal")); // not a very scientific distribution QString fw; if (f.weight() <= QFont::Light) @@ -641,32 +641,32 @@ void Q3SVGPaintEnginePrivate::applyStyle(QDomElement *e, QPicturePrivate::PaintC fw = QLatin1String("800"); else fw = QLatin1String("900"); - s += QString(QLatin1String("font-weight:%1;")).arg(fw); - s += QString(QLatin1String("font-family:%1;")).arg(f.family()); + s += QString::fromLatin1("font-weight:%1;").arg(fw); + s += QString::fromLatin1("font-family:%1;").arg(f.family()); } else { - s += QString(QLatin1String("stroke:rgb(%1,%2,%3);")).arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); + s += QString::fromLatin1("stroke:rgb(%1,%2,%3);").arg(pcol.red()).arg(pcol.green()).arg(pcol.blue()); if (pcol.alpha() != 255) - s += QString(QLatin1String("stroke-opacity:%1;")).arg(pcol.alpha()/255.0); + s += QString::fromLatin1("stroke-opacity:%1;").arg(pcol.alpha()/255.0); if (bcol.alpha() != 255) - s += QString(QLatin1String("fill-opacity:%1;")).arg(bcol.alpha()/255.0); + s += QString::fromLatin1("fill-opacity:%1;").arg(bcol.alpha()/255.0); double pw = cpen.width(); if (pw == 0 && cpen.style() != Qt::NoPen) pw = 0.9; if (c == QPicturePrivate::PdcDrawLine) pw /= (qAbs(worldMatrix.m11()) + qAbs(worldMatrix.m22())) / 2.0; - s += QString(QLatin1String("stroke-width:%1;")).arg(pw); + s += QString::fromLatin1("stroke-width:%1;").arg(pw); if (cpen.style() == Qt::DashLine) - s+= QString(QLatin1String("stroke-dasharray:18,6;")); + s+= QLatin1String("stroke-dasharray:18,6;"); else if (cpen.style() == Qt::DotLine) - s+= QString(QLatin1String("stroke-dasharray:3;")); + s+= QLatin1String("stroke-dasharray:3;"); else if (cpen.style() == Qt::DashDotLine) - s+= QString(QLatin1String("stroke-dasharray:9,6,3,6;")); + s+= QLatin1String("stroke-dasharray:9,6,3,6;"); else if (cpen.style() == Qt::DashDotDotLine) - s+= QString(QLatin1String("stroke-dasharray:9,3,3;")); + s+= QLatin1String("stroke-dasharray:9,3,3;"); if (cbrush.style() == Qt::NoBrush || c == QPicturePrivate::PdcDrawPolyline || c == QPicturePrivate::PdcDrawCubicBezier) s += QLatin1String("fill:none;"); // Qt polylines use no brush, neither do Beziers else - s += QString(QLatin1String("fill:rgb(%1,%2,%3);")).arg(bcol.red()).arg(bcol.green()).arg(bcol.blue()); + s += QString::fromLatin1("fill:rgb(%1,%2,%3);").arg(bcol.red()).arg(bcol.green()).arg(bcol.blue()); } e->setAttribute(QLatin1String("style"), s); } @@ -679,13 +679,13 @@ void Q3SVGPaintEnginePrivate::applyTransform(QDomElement *e) const bool rot = (m.m11() != 1.0 || m.m12() != 0.0 || m.m21() != 0.0 || m.m22() != 1.0); if (!rot && (m.dx() != 0.0 || m.dy() != 0.0)) { - s = QString(QLatin1String("translate(%1,%2)")).arg(m.dx()).arg(m.dy()); + s = QString::fromLatin1("translate(%1,%2)").arg(m.dx()).arg(m.dy()); } else if (rot) { if (m.m12() == 0.0 && m.m21() == 0.0 && m.dx() == 0.0 && m.dy() == 0.0) - s = QString(QLatin1String("scale(%1,%2)")).arg(m.m11()).arg(m.m22()); + s = QString::fromLatin1("scale(%1,%2)").arg(m.m11()).arg(m.m22()); else - s = QString(QLatin1String("matrix(%1,%2,%3,%4,%5,%6)")) + s = QString::fromLatin1("matrix(%1,%2,%3,%4,%5,%6)") .arg(m.m11()).arg(m.m12()) .arg(m.m21()).arg(m.m22()) .arg(m.dx()).arg(m.dy()); @@ -730,9 +730,9 @@ bool Q3SVGPaintEngine::play(QPainter *pt) d->brect.setX(x); d->brect.setY(y); QString wstr = attr.contains(QLatin1String("width")) - ? attr.namedItem(QLatin1String("width")).nodeValue() : QString(QLatin1String("100%")); + ? attr.namedItem(QLatin1String("width")).nodeValue() : QString::fromLatin1("100%"); QString hstr = attr.contains(QLatin1String("height")) - ? attr.namedItem(QLatin1String("height")).nodeValue() : QString(QLatin1String("100%")); + ? attr.namedItem(QLatin1String("height")).nodeValue() : QString::fromLatin1("100%"); double width = d->parseLen(wstr, 0, true); double height = d->parseLen(hstr, 0, false); // SVG doesn't respect x and y. But we want a proper bounding rect. diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index e508001..d02f961 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -1678,7 +1678,7 @@ void Q3TextDocument::setRichTextInternal(const QString &text, Q3TextCursor* curs if (curtag.style->displayMode() == Q3StyleSheetItem::DisplayListItem) { // we are in a li and a new block comes along - if (nstyle->name() == QString(QLatin1String("ul")) || nstyle->name() == QLatin1String("ol")) + if (nstyle->name() == QLatin1String("ul") || nstyle->name() == QLatin1String("ol")) hasNewPar = false; // we want an empty li (like most browsers) if (!hasNewPar) { /* do not add new blocks inside @@ -1857,7 +1857,7 @@ void Q3TextDocument::setRichTextInternal(const QString &text, Q3TextCursor* curs curtag.format = curtag.format.makeTextFormat(nstyle, attr, scaleFontsFactor); if (nstyle->isAnchor()) { if (!anchorName.isEmpty()) - anchorName += QLatin1String("#") + attr[QLatin1String("name")]; + anchorName += QLatin1Char('#') + attr[QLatin1String("name")]; else anchorName = attr[QLatin1String("name")]; curtag.anchorHref = attr[QLatin1String("href")]; @@ -2436,7 +2436,7 @@ QString Q3TextDocument::richText() const list_type = QLatin1String(" type=") + list_style_to_string(p->listStyle()); for (int i = pastListDepth; i < listDepth; i++) { s += list_is_ordered(p->listStyle()) ? QLatin1String("<ol") : QLatin1String("<ul"); - s += list_type + QLatin1String(">"); + s += list_type + QLatin1Char('>'); } } else { s += QLatin1Char('\n'); @@ -2463,7 +2463,7 @@ QString Q3TextDocument::richText() const s += margin_to_string(item_li, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += list_value_to_string(p->listValue()); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String("</li>"); } else if (p->listDepth()) { @@ -2471,7 +2471,7 @@ QString Q3TextDocument::richText() const s += align_to_string(p->alignment()); s += margin_to_string(item_div, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String("</div>"); } else { @@ -2480,7 +2480,7 @@ QString Q3TextDocument::richText() const s += align_to_string(p->alignment()); s += margin_to_string(item_p, p->utm, p->ubm, p->ulm, p->urm, p->uflm); s += direction_to_string(p->direction()); - s += QLatin1String(">"); + s += QLatin1Char('>'); s += ps; s += QLatin1String("</p>"); } @@ -6667,7 +6667,7 @@ Q3TextImage::Q3TextImage(Q3TextDocument *p, const QMap<QString, QString> &attr, imageName = attr[QLatin1String("source")]; if (!imageName.isEmpty()) { - imgId = QString(QLatin1String("%1,%2,%3,%4")).arg(imageName).arg(width).arg(height).arg((ulong)&factory); + imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((ulong)&factory); if (!pixmap_map) pixmap_map = new QMap<QString, QPixmapInt>; if (pixmap_map->contains(imgId)) { @@ -6761,13 +6761,13 @@ QString Q3TextImage::richText() const s += QLatin1String("<img "); QMap<QString, QString>::ConstIterator it = attributes.begin(); for (; it != attributes.end(); ++it) { - s += it.key() + QLatin1String("="); + s += it.key() + QLatin1Char('='); if ((*it).contains(QLatin1Char(' '))) - s += QLatin1String("\"") + *it + QLatin1String("\" "); + s += QLatin1Char('\"') + *it + QLatin1String("\" "); else - s += *it + QLatin1String(" "); + s += *it + QLatin1Char(' '); } - s += QLatin1String(">"); + s += QLatin1Char('>'); return s; } @@ -7722,7 +7722,7 @@ QString Q3TextTable::richText() const s = QLatin1String("<table "); QMap<QString, QString>::ConstIterator it = attributes.begin(); for (; it != attributes.end(); ++it) - s += it.key() + QLatin1String("=") + *it + QLatin1String(" "); + s += it.key() + QLatin1Char('=') + *it + QLatin1Char(' '); s += QLatin1String(">\n"); int lastRow = -1; @@ -7739,8 +7739,8 @@ QString Q3TextTable::richText() const s += QLatin1String("<td"); it = cell->attributes.constBegin(); for (; it != cell->attributes.constEnd(); ++it) - s += QLatin1String(" ") + it.key() + QLatin1String("=") + *it; - s += QLatin1String(">"); + s += QLatin1Char(' ') + it.key() + QLatin1Char('=') + *it; + s += QLatin1Char('>'); s += cell->richText()->richText(); s += QLatin1String("</td>"); } diff --git a/src/qt3support/text/q3textedit.cpp b/src/qt3support/text/q3textedit.cpp index 7577dce..d1db1e4 100644 --- a/src/qt3support/text/q3textedit.cpp +++ b/src/qt3support/text/q3textedit.cpp @@ -77,7 +77,7 @@ #include <qkeysequence.h> #define ACCEL_KEY(k) QLatin1Char('\t') + QString(QKeySequence(Qt::CTRL | Qt::Key_ ## k)) #else -#define ACCEL_KEY(k) QLatin1Char('\t' )+ QString(QLatin1String("Ctrl+" #k)) +#define ACCEL_KEY(k) QLatin1Char('\t' )+ QString::fromLatin1("Ctrl+" #k) #endif #ifdef QT_TEXTEDIT_OPTIMIZATION @@ -6625,7 +6625,7 @@ void Q3TextEdit::optimSetTextFormat(Q3TextDocument * td, Q3TextCursor * cur, } if (tag) { QString col = tag->tag.simplified(); - if (col.left(10) == QLatin1String("font color")) { + if (col.startsWith(QLatin1String("font color"))) { int i = col.indexOf(QLatin1Char('='), 10); col = col.mid(i + 1).simplified(); if (col[0] == QLatin1Char('\"')) diff --git a/src/qt3support/widgets/q3mainwindow.cpp b/src/qt3support/widgets/q3mainwindow.cpp index 2ee3bdc..ae80321 100644 --- a/src/qt3support/widgets/q3mainwindow.cpp +++ b/src/qt3support/widgets/q3mainwindow.cpp @@ -2261,7 +2261,7 @@ static void saveDockArea(QTextStream &ts, Q3DockArea *a) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << QString(dw->windowTitle()); - ts << ","; + ts << ','; } ts << endl; ts << *a; @@ -2287,7 +2287,7 @@ QTextStream &operator<<(QTextStream &ts, const Q3MainWindow &mainWindow) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << dw->windowTitle(); - ts << ","; + ts << ','; } ts << endl; @@ -2295,17 +2295,17 @@ QTextStream &operator<<(QTextStream &ts, const Q3MainWindow &mainWindow) for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); ts << dw->windowTitle(); - ts << ","; + ts << ','; } ts << endl; for (int i = 0; i < l.size(); ++i) { Q3DockWindow *dw = l.at(i); - ts << "[" << dw->windowTitle() << "," - << (int)dw->geometry().x() << "," - << (int)dw->geometry().y() << "," - << (int)dw->geometry().width() << "," - << (int)dw->geometry().height() << "," - << (int)dw->isVisible() << "]"; + ts << '[' << dw->windowTitle() << ',' + << (int)dw->geometry().x() << ',' + << (int)dw->geometry().y() << ',' + << (int)dw->geometry().width() << ',' + << (int)dw->geometry().height() << ',' + << (int)dw->isVisible() << ']'; } ts << endl; diff --git a/src/script/qscriptcontext.cpp b/src/script/qscriptcontext.cpp index 020601b..ff519c7 100644 --- a/src/script/qscriptcontext.cpp +++ b/src/script/qscriptcontext.cpp @@ -469,7 +469,7 @@ QString QScriptContext::toString() const QScriptValue arg = argument(i); result.append(safeValueToString(arg)); } - result.append(QLatin1String(")")); + result.append(QLatin1Char(')')); QString fileName = info.fileName(); int lineNumber = info.lineNumber(); diff --git a/src/script/qscriptcontext_p.cpp b/src/script/qscriptcontext_p.cpp index 199c9d4..f19ba9c 100644 --- a/src/script/qscriptcontext_p.cpp +++ b/src/script/qscriptcontext_p.cpp @@ -841,7 +841,7 @@ Ltop: flags = iPtr->operand[1].m_int_value; #ifndef QT_NO_REGEXP if (flags != 0) { - literal += QLatin1String("/"); + literal += QLatin1Char('/'); literal += QString::number(flags); } #endif @@ -2396,10 +2396,10 @@ QStringList QScriptContextPrivate::backtrace() const s += QLatin1String("<global>"); } } - s += QLatin1String("("); + s += QLatin1Char('('); for (int i = 0; i < ctx->argc; ++i) { if (i > 0) - s += QLatin1String(","); + s += QLatin1Char(','); QScriptValueImpl arg = ctx->args[i]; if (arg.isObject()) s += QLatin1String("[object Object]"); // don't do a function call diff --git a/src/script/qscriptecmaerror.cpp b/src/script/qscriptecmaerror.cpp index fc39bf9..0dde68c 100644 --- a/src/script/qscriptecmaerror.cpp +++ b/src/script/qscriptecmaerror.cpp @@ -318,18 +318,18 @@ QStringList Error::backtrace(const QScriptValueImpl &error) } else { s += functionName; } - s += QLatin1String("("); + s += QLatin1Char('('); QScriptValueImpl arguments = frame.property(QLatin1String("arguments")); if (arguments.isObject()) { int argCount = arguments.property(QLatin1String("length")).toInt32(); for (int j = 0; j < argCount; ++j) { if (j > 0) - s += QLatin1String(","); + s += QLatin1Char(','); s += arguments.property(j).toString(); } } s += QLatin1String(")@") + o.property(QLatin1String("fileName")).toString() - + QLatin1String(":") + o.property(QLatin1String("lineNumber")).toString(); + + QLatin1Char(':') + o.property(QLatin1String("lineNumber")).toString(); result.append(s); } return result; diff --git a/src/script/qscriptecmafunction.cpp b/src/script/qscriptecmafunction.cpp index ec45ae4..a1e5b58 100644 --- a/src/script/qscriptecmafunction.cpp +++ b/src/script/qscriptecmafunction.cpp @@ -197,7 +197,7 @@ QString Function::buildFunction(QScriptContextPrivate *context) // the formals for (int i = 0; i < argc - 1; ++i) { if (i != 0) - code += QLatin1String(","); + code += QLatin1Char(','); code += context->argument(i).toString(); } diff --git a/src/script/qscriptecmaglobal.cpp b/src/script/qscriptecmaglobal.cpp index da7ab9e..b5cf675 100644 --- a/src/script/qscriptecmaglobal.cpp +++ b/src/script/qscriptecmaglobal.cpp @@ -296,7 +296,7 @@ public: QString result; for (int i = 0; i < context->argumentCount(); ++i) { if (i != 0) - result.append(QLatin1String(" ")); + result.append(QLatin1Char(' ')); QString s = context->argument(i).toString(); if (context->state() == QScriptContext::ExceptionState) diff --git a/src/script/qscriptecmaobject.cpp b/src/script/qscriptecmaobject.cpp index 694f479..c4a1b08 100644 --- a/src/script/qscriptecmaobject.cpp +++ b/src/script/qscriptecmaobject.cpp @@ -113,7 +113,7 @@ QScriptValueImpl Object::method_toString(QScriptContextPrivate *context, QScript QString s = QLatin1String("[object "); QScriptValueImpl self = context->thisObject(); s += self.classInfo()->name(); - s += QLatin1String("]"); + s += QLatin1Char(']'); return (QScriptValueImpl(eng, s)); } diff --git a/src/script/qscriptparser.cpp b/src/script/qscriptparser.cpp index 0b04df1..7408ec5 100644 --- a/src/script/qscriptparser.cpp +++ b/src/script/qscriptparser.cpp @@ -1148,9 +1148,9 @@ case 266: { error_message += QLatin1String (", "); first = false; - error_message += QLatin1String("`"); + error_message += QLatin1Char('`'); error_message += QLatin1String (spell [expected_tokens [s]]); - error_message += QLatin1String("'"); + error_message += QLatin1Char('\''); } } diff --git a/src/script/qscriptprettypretty.cpp b/src/script/qscriptprettypretty.cpp index 6ee1e55..b221b0a 100644 --- a/src/script/qscriptprettypretty.cpp +++ b/src/script/qscriptprettypretty.cpp @@ -73,13 +73,13 @@ PrettyPretty::~PrettyPretty() void PrettyPretty::acceptAsBlock(AST::Node *node) { - out << "{"; + out << '{'; pushIndentLevel(); newlineAndIndent(); accept(node); popIndentLevel(); newlineAndIndent(); - out << "}"; + out << '}'; } int PrettyPretty::operatorPrecedenceLevel(int op) @@ -230,8 +230,8 @@ void PrettyPretty::endVisit(AST::FalseLiteral *node) bool PrettyPretty::visit(AST::StringLiteral *node) { QString lit = QScriptEnginePrivate::toString(node->value); - lit.replace(QLatin1String("\\"), QLatin1String("\\\\")); - out << "\"" << lit << "\""; + lit.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + out << '\"' << lit << '\"'; return false; } @@ -253,7 +253,7 @@ void PrettyPretty::endVisit(AST::NumericLiteral *node) bool PrettyPretty::visit(AST::RegExpLiteral *node) { - out << "/" << QScriptEnginePrivate::toString(node->pattern) << "/"; + out << '/' << QScriptEnginePrivate::toString(node->pattern) << '/'; if (node->flags) out << QScript::Ecma::RegExp::flagsToString(node->flags); @@ -267,10 +267,10 @@ void PrettyPretty::endVisit(AST::RegExpLiteral *node) bool PrettyPretty::visit(AST::ArrayLiteral *node) { - out << "["; + out << '['; accept(node->elements); accept(node->elision); - out << "]"; + out << ']'; return false; } @@ -281,7 +281,7 @@ void PrettyPretty::endVisit(AST::ArrayLiteral *node) bool PrettyPretty::visit(AST::ObjectLiteral *node) { - out << "{"; + out << '{'; if (node->properties) { pushIndentLevel(); AST::PropertyNameAndValueList *prop; @@ -289,12 +289,12 @@ bool PrettyPretty::visit(AST::ObjectLiteral *node) newlineAndIndent(); accept(prop); if (prop->next) - out << ","; + out << ','; } popIndentLevel(); newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -384,9 +384,9 @@ void PrettyPretty::endVisit(AST::NumericLiteralPropertyName *node) bool PrettyPretty::visit(AST::ArrayMemberExpression *node) { accept(node->base); - out << "["; + out << '['; accept(node->expression); - out << "]"; + out << ']'; return false; } @@ -398,7 +398,7 @@ void PrettyPretty::endVisit(AST::ArrayMemberExpression *node) bool PrettyPretty::visit(AST::FieldMemberExpression *node) { accept(node->base); - out << "." << QScriptEnginePrivate::toString(node->name); + out << '.' << QScriptEnginePrivate::toString(node->name); return false; } @@ -411,9 +411,9 @@ bool PrettyPretty::visit(AST::NewMemberExpression *node) { out << "new "; accept(node->base); - out << "("; + out << '('; accept(node->arguments); - out << ")"; + out << ')'; return false; } @@ -437,9 +437,9 @@ void PrettyPretty::endVisit(AST::NewExpression *node) bool PrettyPretty::visit(AST::CallExpression *node) { accept(node->base); - out << "("; + out << '('; accept(node->arguments); - out << ")"; + out << ')'; return false; } @@ -549,13 +549,13 @@ void PrettyPretty::endVisit(AST::PreDecrementExpression *node) bool PrettyPretty::visit(AST::UnaryPlusExpression *node) { - out << "+"; + out << '+'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -566,13 +566,13 @@ void PrettyPretty::endVisit(AST::UnaryPlusExpression *node) bool PrettyPretty::visit(AST::UnaryMinusExpression *node) { - out << "-"; + out << '-'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -583,13 +583,13 @@ void PrettyPretty::endVisit(AST::UnaryMinusExpression *node) bool PrettyPretty::visit(AST::TildeExpression *node) { - out << "~"; + out << '~'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -600,13 +600,13 @@ void PrettyPretty::endVisit(AST::TildeExpression *node) bool PrettyPretty::visit(AST::NotExpression *node) { - out << "!"; + out << '!'; bool needParens = (node->expression->binaryExpressionCast() != 0); if (needParens) - out << "("; + out << '('; accept(node->expression); if (needParens) - out << ")"; + out << ')'; return false; } @@ -620,10 +620,10 @@ bool PrettyPretty::visit(AST::BinaryExpression *node) bool needParens = node->left->binaryExpressionCast() && (compareOperatorPrecedence(node->left->binaryExpressionCast()->op, node->op) < 0); if (needParens) - out << "("; + out << '('; accept(node->left); if (needParens) - out << ")"; + out << ')'; QString s; switch (node->op) { case QSOperator::Add: @@ -699,14 +699,14 @@ bool PrettyPretty::visit(AST::BinaryExpression *node) default: Q_ASSERT (0); } - out << " " << s << " "; + out << ' ' << s << ' '; needParens = node->right->binaryExpressionCast() && (compareOperatorPrecedence(node->right->binaryExpressionCast()->op, node->op) <= 0); if (needParens) - out << "("; + out << '('; accept(node->right); if (needParens) - out << ")"; + out << ')'; return false; } @@ -798,7 +798,7 @@ bool PrettyPretty::visit(AST::VariableStatement *node) void PrettyPretty::endVisit(AST::VariableStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; } bool PrettyPretty::visit(AST::VariableDeclaration *node) @@ -819,7 +819,7 @@ void PrettyPretty::endVisit(AST::VariableDeclaration *node) bool PrettyPretty::visit(AST::EmptyStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; return true; } @@ -831,7 +831,7 @@ void PrettyPretty::endVisit(AST::EmptyStatement *node) bool PrettyPretty::visit(AST::ExpressionStatement *node) { accept(node->expression); - out << ";"; + out << ';'; return false; } @@ -959,9 +959,9 @@ bool PrettyPretty::visit(AST::ContinueStatement *node) { out << "continue"; if (node->label) { - out << " " << QScriptEnginePrivate::toString(node->label); + out << ' ' << QScriptEnginePrivate::toString(node->label); } - out << ";"; + out << ';'; return false; } @@ -974,9 +974,9 @@ bool PrettyPretty::visit(AST::BreakStatement *node) { out << "break"; if (node->label) { - out << " " << QScriptEnginePrivate::toString(node->label); + out << ' ' << QScriptEnginePrivate::toString(node->label); } - out << ";"; + out << ';'; return false; } @@ -989,10 +989,10 @@ bool PrettyPretty::visit(AST::ReturnStatement *node) { out << "return"; if (node->expression) { - out << " "; + out << ' '; accept(node->expression); } - out << ";"; + out << ';'; return false; } @@ -1067,7 +1067,7 @@ bool PrettyPretty::visit(AST::CaseClause *node) { out << "case "; accept(node->expression); - out << ":"; + out << ':'; if (node->statements) { newlineAndIndent(); accept(node->statements); @@ -1109,7 +1109,7 @@ bool PrettyPretty::visit(AST::ThrowStatement *node) Q_UNUSED(node); out << "throw "; accept(node->expression); - out << ";"; + out << ';'; return false; } @@ -1166,10 +1166,10 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) out << "function"; if (node->name) - out << " " << QScriptEnginePrivate::toString(node->name); + out << ' ' << QScriptEnginePrivate::toString(node->name); // the arguments - out << "("; + out << '('; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) out << QScriptEnginePrivate::toString(it->name); @@ -1177,7 +1177,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) if (it->next) out << ", "; } - out << ")"; + out << ')'; // the function body out << " {"; @@ -1190,7 +1190,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -1205,10 +1205,10 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) out << "function"; if (node->name) - out << " " << QScriptEnginePrivate::toString(node->name); + out << ' ' << QScriptEnginePrivate::toString(node->name); // the arguments - out << "("; + out << '('; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) out << QScriptEnginePrivate::toString(it->name); @@ -1216,7 +1216,7 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) if (it->next) out << ", "; } - out << ")"; + out << ')'; // the function body out << " {"; @@ -1229,7 +1229,7 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) newlineAndIndent(); } - out << "}"; + out << '}'; return false; } @@ -1320,7 +1320,7 @@ bool PrettyPretty::visit(AST::DebuggerStatement *node) void PrettyPretty::endVisit(AST::DebuggerStatement *node) { Q_UNUSED(node); - out << ";"; + out << ';'; } bool PrettyPretty::preVisit(AST::Node *node) diff --git a/src/script/qscriptsyntaxchecker.cpp b/src/script/qscriptsyntaxchecker.cpp index 9653bc1..74ca00f 100644 --- a/src/script/qscriptsyntaxchecker.cpp +++ b/src/script/qscriptsyntaxchecker.cpp @@ -186,9 +186,9 @@ SyntaxChecker::Result SyntaxChecker::checkSyntax(const QString &code) error_message += QLatin1String (", "); first = false; - error_message += QLatin1String("`"); + error_message += QLatin1Char('`'); error_message += QLatin1String (spell [expected_tokens [s]]); - error_message += QLatin1String("'"); + error_message += QLatin1Char('\''); } } diff --git a/src/script/qscriptvalueimpl.cpp b/src/script/qscriptvalueimpl.cpp index 15d1b8a..a890839 100644 --- a/src/script/qscriptvalueimpl.cpp +++ b/src/script/qscriptvalueimpl.cpp @@ -395,7 +395,7 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) QScriptObject *od = object.objectValue(); for (int i=0; i<od->memberCount(); ++i) { if (i != 0) - d << ","; + d << ','; QScript::Member m; od->member(i, &m); @@ -404,7 +404,7 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) d << object.engine()->toString(m.nameId()); QScriptValueImpl o; od->get(m, &o); - d.nospace() << QLatin1String(":") + d.nospace() << QLatin1Char(':') << (o.classInfo() ? o.classInfo()->name() : QLatin1String("?")); @@ -415,14 +415,14 @@ QDebug &operator<<(QDebug &d, const QScriptValueImpl &object) QScriptValueImpl scope = object.scope(); while (scope.isValid()) { Q_ASSERT(scope.isObject()); - d.nospace() << " " << scope.objectValue(); + d.nospace() << ' ' << scope.objectValue(); scope = scope.scope(); } - d.nospace() << "}"; + d.nospace() << '}'; break; } - d << ")"; + d << ')'; return d; } diff --git a/src/script/qscriptxmlgenerator.cpp b/src/script/qscriptxmlgenerator.cpp index 131882b..163b60c 100644 --- a/src/script/qscriptxmlgenerator.cpp +++ b/src/script/qscriptxmlgenerator.cpp @@ -121,10 +121,10 @@ QTextStream &XmlGenerator::startTag(const QString &name, AST::Node *locationNode { pushIndentLevel(); newlineAndIndent(); - out << QLatin1String("<") << name; + out << QLatin1Char('<') << name; if (locationNode) - out << QLatin1String(" line=\"") << locationNode->startLine << QLatin1String("\""); - out << QLatin1String(">"); + out << QLatin1String(" line=\"") << locationNode->startLine << QLatin1Char('\"'); + out << QLatin1Char('>'); return out; } @@ -132,7 +132,7 @@ QTextStream &XmlGenerator::endTag(const QString &name) { newlineAndIndent(); popIndentLevel(); - out << QLatin1String("</") << escape(name) << QLatin1String(">"); + out << QLatin1String("</") << escape(name) << QLatin1Char('>'); return out; } @@ -233,7 +233,7 @@ void XmlGenerator::endVisit(AST::NumericLiteral *) bool XmlGenerator::visit(AST::RegExpLiteral *node) { startTag(QLatin1String("regexp")); - out << QLatin1String("/") << escape(QScriptEnginePrivate::toString(node->pattern)) << QLatin1String("/"); + out << QLatin1Char('/') << escape(QScriptEnginePrivate::toString(node->pattern)) << QLatin1Char('/'); if (node->flags) out << QScript::Ecma::RegExp::flagsToString(node->flags); out << QLatin1String("</regexp>"); diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp index 119b96a..2f3c2cf 100644 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ b/src/scripttools/debugging/qscriptcompletiontask.cpp @@ -158,7 +158,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression() if (path.size() > 1) { const QString &topLevelIdent = path.at(0); QScriptValue obj; - if (topLevelIdent == QString::fromLatin1("this")) { + if (topLevelIdent == QLatin1String("this")) { obj = ctx->thisObject(); } else { QScriptValueList scopeChain; @@ -256,9 +256,9 @@ void QScriptCompletionTask::start() } QString argType = cmd->argumentTypes().value(argNum); if (!argType.isEmpty()) { - if (argType == QString::fromLatin1("command-or-group-name")) { + if (argType == QLatin1String("command-or-group-name")) { d->results = d->console->commandManager()->completions(arg); - } else if (argType == QString::fromLatin1("script-filename")) { + } else if (argType == QLatin1String("script-filename")) { // ### super-cheating for now; have to use the async API QScriptEngineDebuggerFrontend *edf = static_cast<QScriptEngineDebuggerFrontend*>(d->frontend); QScriptDebuggerBackend *backend = edf->backend(); @@ -269,13 +269,13 @@ void QScriptCompletionTask::start() if (isPrefixOf(arg, fileName)) d->results.append(fileName); } - } else if (argType == QString::fromLatin1("subcommand-name")) { + } else if (argType == QLatin1String("subcommand-name")) { for (int i = 0; i < cmd->subCommands().size(); ++i) { QString name = cmd->subCommands().at(i); if (isPrefixOf(arg, name)) d->results.append(name); } - } else if (argType == QString::fromLatin1("script")) { + } else if (argType == QLatin1String("script")) { d->completeScriptExpression(); } if ((d->type == NoCompletion) && !d->results.isEmpty()) { diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp index 3c29130..0771d0b 100644 --- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp +++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp @@ -292,7 +292,7 @@ QScriptValue QScriptDebuggerBackendPrivate::trace(QScriptContext *context, QString str; for (int i = 0; i < context->argumentCount(); ++i) { if (i > 0) - str.append(QLatin1String(" ")); + str.append(QLatin1Char(' ')); str.append(context->argument(i).toString()); } QScriptDebuggerEvent e(QScriptDebuggerEvent::Trace); diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp index 70bb8b1..546ec63 100644 --- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp +++ b/src/scripttools/debugging/qscriptdebuggerconsole.cpp @@ -163,10 +163,10 @@ QScriptDebuggerConsoleCommandJob *QScriptDebuggerConsolePrivate::createJob( .arg(name)); for (int j = 0; j < completions.size(); ++j) { if (j > 0) - msg.append(QString::fromLatin1(", ")); + msg.append(QLatin1String(", ")); msg.append(completions.at(j)); } - msg.append(QString::fromLatin1(".")); + msg.append(QLatin1Char('.')); messageHandler->message(QtWarningMsg, msg); return 0; } diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp index caeb971..e096ba8 100644 --- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp +++ b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp @@ -807,7 +807,7 @@ QVariant QScriptDebuggerLocalsModel::data(const QModelIndex &index, int role) co QString str = node->property.valueAsString(); if (node->property.value().type() == QScriptDebuggerValue::StringValue) { // escape - str.replace(QLatin1String("\""), QLatin1String("\\\"")); + str.replace(QLatin1Char('\"'), QLatin1String("\\\"")); str.prepend(QLatin1Char('\"')); str.append(QLatin1Char('\"')); } diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 11d0041..c7cbc9b 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -1666,7 +1666,7 @@ QVariant QDB2Driver::handle() const QString QDB2Driver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp index 1645555..199ad8e 100644 --- a/src/sql/drivers/ibase/qsql_ibase.cpp +++ b/src/sql/drivers/ibase/qsql_ibase.cpp @@ -1732,7 +1732,7 @@ bool QIBaseDriver::subscribeToNotificationImplementation(const QString &name) eBuffer->resultBuffer); if (status[0] == 1 && status[1]) { - setLastError(QSqlError(QString(QLatin1String("Could not subscribe to event notifications for %1.")).arg(name))); + setLastError(QSqlError(QString::fromLatin1("Could not subscribe to event notifications for %1.").arg(name))); d->eventBuffers.remove(name); qFreeEventBuffer(eBuffer); return false; @@ -1760,7 +1760,7 @@ bool QIBaseDriver::unsubscribeFromNotificationImplementation(const QString &name isc_cancel_events(status, &d->ibase, &eBuffer->eventId); if (status[0] == 1 && status[1]) { - setLastError(QSqlError(QString(QLatin1String("Could not unsubscribe from event notifications for %1.")).arg(name))); + setLastError(QSqlError(QString::fromLatin1("Could not unsubscribe from event notifications for %1.").arg(name))); return false; } @@ -1818,7 +1818,7 @@ void QIBaseDriver::qHandleEventNotification(void *updatedResultBuffer) QString QIBaseDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index 53645c9..82ed124 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -1468,7 +1468,7 @@ QString QMYSQLDriver::formatValue(const QSqlField &field, bool trimStrings) cons QString QMYSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('`')) && identifier.right(1) != QString(QLatin1Char('`')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('`')) && !identifier.endsWith(QLatin1Char('`')) ) { res.prepend(QLatin1Char('`')).append(QLatin1Char('`')); res.replace(QLatin1Char('.'), QLatin1String("`.`")); } @@ -1478,12 +1478,9 @@ QString QMYSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType bool QMYSQLDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType type) const { Q_UNUSED(type); - bool isLeftDelimited = (identifier.left(1) == QString(QLatin1Char('`'))); - bool isRightDelimited = (identifier.right(1) == QString(QLatin1Char('`'))); - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + return identifier.size() > 2 + && identifier.startsWith(QLatin1Char('`')) //left delimited + && identifier.endsWith(QLatin1Char('`')); //right delimited } QT_END_NAMESPACE diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index a7031b1..e6ee63d 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -2040,8 +2040,8 @@ bool QOCIDriver::open(const QString & db, QString connectionString = db; if (!hostname.isEmpty()) connectionString = - QString(QLatin1String("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))" - "(CONNECT_DATA=(SID=%3)))")).arg(hostname).arg((port > -1 ? port : 1521)).arg(db); + QString::fromLatin1("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))" + "(CONNECT_DATA=(SID=%3)))").arg(hostname).arg((port > -1 ? port : 1521)).arg(db); r = OCIHandleAlloc(d->env, reinterpret_cast<void **>(&d->srvhp), OCI_HTYPE_SERVER, 0, 0); if (r == OCI_SUCCESS) @@ -2219,7 +2219,7 @@ QStringList QOCIDriver::tables(QSql::TableType type) const while (t.next()) { if (t.value(0).toString().toUpper() != user.toUpper()) - tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); else tl.append(t.value(1).toString()); } @@ -2235,7 +2235,7 @@ QStringList QOCIDriver::tables(QSql::TableType type) const "and owner != 'WMSYS'")); while (t.next()) { if (t.value(0).toString().toUpper() != d->user.toUpper()) - tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); else tl.append(t.value(1).toString()); } @@ -2297,7 +2297,7 @@ QSqlRecord QOCIDriver::record(const QString& tablename) const else owner = owner.toUpper(); - tmpStmt += QLatin1String(" and owner='") + owner + QLatin1String("'"); + tmpStmt += QLatin1String(" and owner='") + owner + QLatin1Char('\''); t.setForwardOnly(true); t.exec(tmpStmt); if (!t.next()) { // try and see if the tablename is a synonym @@ -2352,7 +2352,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const else table = table.toUpper(); - tmpStmt = stmt + QLatin1String(" and a.table_name='") + table + QLatin1String("'"); + tmpStmt = stmt + QLatin1String(" and a.table_name='") + table + QLatin1Char('\''); if (owner.isEmpty()) { owner = d->user; } @@ -2362,7 +2362,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const else owner = owner.toUpper(); - tmpStmt += QLatin1String(" and a.owner='") + owner + QLatin1String("'"); + tmpStmt += QLatin1String(" and a.owner='") + owner + QLatin1Char('\''); t.setForwardOnly(true); t.exec(tmpStmt); @@ -2386,7 +2386,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const tt.exec(QLatin1String("select data_type from all_tab_columns where table_name='") + t.value(2).toString() + QLatin1String("' and column_name='") + t.value(0).toString() + QLatin1String("' and owner='") + - owner +QLatin1String("'")); + owner + QLatin1Char('\'')); if (!tt.next()) { return QSqlIndex(); } diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index ee500a0..8eaa8bf 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -213,14 +213,14 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode static QString qODBCWarn(const QODBCPrivate* odbc, int *nativeCode = 0) { - return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1String(" ") - + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc) + QLatin1String(" ") + return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1Char(' ') + + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc) + QLatin1Char(' ') + qWarnODBCHandle(SQL_HANDLE_STMT, odbc->hStmt, nativeCode)); } static QString qODBCWarn(const QODBCDriverPrivate* odbc, int *nativeCode = 0) { - return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1String(" ") + return (qWarnODBCHandle(SQL_HANDLE_ENV, odbc->hEnv) + QLatin1Char(' ') + qWarnODBCHandle(SQL_HANDLE_DBC, odbc->hDbc, nativeCode)); } @@ -2414,12 +2414,12 @@ QString QODBCDriver::escapeIdentifier(const QString &identifier, IdentifierType) { QString res = identifier; if (d->isMySqlServer) { - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('`')) && identifier.right(1) != QString(QLatin1Char('`')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('`')) && !identifier.endsWith(QLatin1Char('`')) ) { res.prepend(QLatin1Char('`')).append(QLatin1Char('`')); res.replace(QLatin1Char('.'), QLatin1String("`.`")); } } else { - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); @@ -2430,13 +2430,10 @@ QString QODBCDriver::escapeIdentifier(const QString &identifier, IdentifierType) bool QODBCDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType) const { - QString quote = d->quoteChar(); - bool isLeftDelimited = identifier.left(1) == quote; - bool isRightDelimited = identifier.right(1) == quote; - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + QChar quote = d->quoteChar(); + return identifier.size() > 2 + && identifier.startsWith(quote) //left delimited + && identifier.endsWith(quote); //right delimited } QT_END_NAMESPACE diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 16d19f1..ce0b8c5 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -541,7 +541,7 @@ bool QPSQLResult::prepare(const QString &query) qDeallocatePreparedStmt(d); const QString stmtId = qMakePreparedStmtId(); - const QString stmt = QString(QLatin1String("PREPARE %1 AS ")).arg(stmtId).append(qReplacePlaceholderMarkers(query)); + const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(qReplacePlaceholderMarkers(query)); PGresult *result = PQexec(d->driver->connection, d->driver->isUtf8 ? stmt.toUtf8().constData() @@ -570,9 +570,9 @@ bool QPSQLResult::exec() QString stmt; const QString params = qCreateParamString(boundValues(), d->q->driver()); if (params.isEmpty()) - stmt = QString(QLatin1String("EXECUTE %1")).arg(d->preparedStmtId); + stmt = QString::fromLatin1("EXECUTE %1").arg(d->preparedStmtId); else - stmt = QString(QLatin1String("EXECUTE %1 (%2)")).arg(d->preparedStmtId).arg(params); + stmt = QString::fromLatin1("EXECUTE %1 (%2)").arg(d->preparedStmtId).arg(params); d->result = PQexec(d->driver->connection, d->driver->isUtf8 ? stmt.toUtf8().constData() @@ -1102,12 +1102,12 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const QTime tm = field.value().toDateTime().time(); // msecs need to be right aligned otherwise psql // interpretes them wrong - r = QLatin1String("'") + QString::number(dt.year()) + QLatin1String("-") - + QString::number(dt.month()) + QLatin1String("-") - + QString::number(dt.day()) + QLatin1String(" ") - + tm.toString() + QLatin1String(".") + r = QLatin1Char('\'') + QString::number(dt.year()) + QLatin1Char('-') + + QString::number(dt.month()) + QLatin1Char('-') + + QString::number(dt.day()) + QLatin1Char(' ') + + tm.toString() + QLatin1Char('.') + QString::number(tm.msec()).rightJustified(3, QLatin1Char('0')) - + QLatin1String("'"); + + QLatin1Char('\''); } else { r = QLatin1String("NULL"); } @@ -1162,7 +1162,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const QString QPSQLDriver::escapeIdentifier(const QString &identifier, IdentifierType) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); @@ -1195,7 +1195,7 @@ bool QPSQLDriver::subscribeToNotificationImplementation(const QString &name) int socket = PQsocket(d->connection); if (socket) { - QString query = QString(QLatin1String("LISTEN %1")).arg(escapeIdentifier(name, QSqlDriver::TableName)); + QString query = QLatin1String("LISTEN ") + escapeIdentifier(name, QSqlDriver::TableName); if (PQresultStatus(PQexec(d->connection, d->isUtf8 ? query.toUtf8().constData() : query.toLocal8Bit().constData()) @@ -1227,7 +1227,7 @@ bool QPSQLDriver::unsubscribeFromNotificationImplementation(const QString &name) return false; } - QString query = QString(QLatin1String("UNLISTEN %1")).arg(escapeIdentifier(name, QSqlDriver::TableName)); + QString query = QLatin1String("UNLISTEN ") + escapeIdentifier(name, QSqlDriver::TableName); if (PQresultStatus(PQexec(d->connection, d->isUtf8 ? query.toUtf8().constData() : query.toLocal8Bit().constData()) diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index f732077..05d63ca 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -631,9 +631,9 @@ static QSqlIndex qGetTableInfo(QSqlQuery &q, const QString &tableName, bool only { QString schema; QString table(tableName); - int indexOfSeparator = tableName.indexOf(QLatin1String(".")); + int indexOfSeparator = tableName.indexOf(QLatin1Char('.')); if (indexOfSeparator > -1) { - schema = tableName.left(indexOfSeparator).append(QLatin1String(".")); + schema = tableName.left(indexOfSeparator).append(QLatin1Char('.')); table = tableName.mid(indexOfSeparator + 1); } q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info ('") + table + QLatin1String("')")); diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index d0c6e18..cb72ff0 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -170,8 +170,8 @@ void QSQLite2ResultPrivate::init(const char **cnames, int numCols) //remove quotations around the field name if any QString fieldStr = QString::fromAscii(fieldName); - QString quote = QString::fromLatin1("\""); - if ( fieldStr.length() > 2 && fieldStr.left(1) == quote && fieldStr.right(1) == quote) { + QLatin1Char quote('\"'); + if ( fieldStr.length() > 2 && fieldStr.startsWith(quote) && fieldStr.endsWith(quote)) { fieldStr = fieldStr.mid(1); fieldStr.chop(1); } @@ -561,7 +561,7 @@ QVariant QSQLite2Driver::handle() const QString QSQLite2Driver::escapeIdentifier(const QString &identifier, IdentifierType /*type*/) const { QString res = identifier; - if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + if(!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"')) ) { res.replace(QLatin1Char('"'), QLatin1String("\"\"")); res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); res.replace(QLatin1Char('.'), QLatin1String("\".\"")); diff --git a/src/sql/drivers/tds/qsql_tds.cpp b/src/sql/drivers/tds/qsql_tds.cpp index 515f0de..298b008 100644 --- a/src/sql/drivers/tds/qsql_tds.cpp +++ b/src/sql/drivers/tds/qsql_tds.cpp @@ -181,7 +181,7 @@ static int CS_PUBLIC qTdsMsgHandler (DBPROCESS* dbproc, } if (severity > 0) { - QString errMsg = QString(QLatin1String("%1 (%2)")).arg(QString::fromAscii(msgtext)).arg( + QString errMsg = QString::fromLatin1("%1 (%2)").arg(QString::fromAscii(msgtext)).arg( msgstate); p->addErrorMsg(errMsg); } @@ -211,8 +211,8 @@ static int CS_PUBLIC qTdsErrHandler(DBPROCESS* dbproc, } - QString errMsg = QString(QLatin1String("%1 %2\n")).arg(QString::fromAscii(dberrstr)).arg( - QString::fromAscii(oserrstr)); + QString errMsg = QString::fromLatin1("%1 %2\n").arg(QLatin1String(dberrstr)).arg( + QLatin1String(oserrstr)); errMsg += p->getErrorMsgs(); p->lastError = qMakeError(errMsg, QSqlError::UnknownError, dberr); p->clearErrorMsgs(); diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 40bc0df..477d531 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -520,7 +520,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName, continue; s.append(prepareIdentifier(rec.fieldName(i), QSqlDriver::FieldName, this)).append(QLatin1String(", ")); if (preparedStatement) - vals.append(QLatin1String("?")); + vals.append(QLatin1Char('?')); else vals.append(formatValue(rec.field(i))); vals.append(QLatin1String(", ")); @@ -530,7 +530,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName, } else { vals.chop(2); // remove trailing comma s[s.length() - 2] = QLatin1Char(')'); - s.append(QLatin1String("VALUES (")).append(vals).append(QLatin1String(")")); + s.append(QLatin1String("VALUES (")).append(vals).append(QLatin1Char(')')); } break; } } @@ -625,10 +625,7 @@ QString QSqlDriver::formatValue(const QSqlField &field, bool trimStrings) const break; } case QVariant::Bool: - if (field.value().toBool()) - r = QLatin1String("1"); - else - r = QLatin1String("0"); + r = QString::number(field.value().toBool()); break; case QVariant::ByteArray : { if (hasFeature(BLOB)) { @@ -884,12 +881,9 @@ QStringList QSqlDriver::subscribedToNotificationsImplementation() const bool QSqlDriver::isIdentifierEscapedImplementation(const QString &identifier, IdentifierType type) const { Q_UNUSED(type); - bool isLeftDelimited = identifier.left(1) == QString(QLatin1Char('"')); - bool isRightDelimited = identifier.right(1) == QString(QLatin1Char('"')); - if( identifier.size() > 2 && isLeftDelimited && isRightDelimited ) - return true; - else - return false; + return identifier.size() > 2 + && identifier.startsWith(QLatin1Char('"')) //left delimited + && identifier.endsWith(QLatin1Char('"')); //right delimited } /*! diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp index 14fc050..b1fa6e2 100644 --- a/src/sql/kernel/qsqlerror.cpp +++ b/src/sql/kernel/qsqlerror.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE QDebug operator<<(QDebug dbg, const QSqlError &s) { dbg.nospace() << "QSqlError(" << s.number() << ", " << s.driverText() << - ", " << s.databaseText() << ")"; + ", " << s.databaseText() << ')'; return dbg.space(); } #endif diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 8a808b6..46a5135 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -514,8 +514,8 @@ QDebug operator<<(QDebug dbg, const QSqlField &f) if (f.typeID() >= 0) dbg.nospace() << ", typeID: " << f.typeID(); if (!f.defaultValue().isNull()) - dbg.nospace() << ", auto-value: \"" << f.defaultValue() << "\""; - dbg.nospace() << ")"; + dbg.nospace() << ", auto-value: \"" << f.defaultValue() << '\"'; + dbg.nospace() << ')'; return dbg.space(); #else qWarning("This compiler doesn't support streaming QSqlField to QDebug"); diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp index 0162664..95f6020 100644 --- a/src/sql/kernel/qsqlrecord.cpp +++ b/src/sql/kernel/qsqlrecord.cpp @@ -589,7 +589,7 @@ void QSqlRecord::detach() #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QSqlRecord &r) { - dbg << "QSqlRecord(" << r.count() << ")"; + dbg << "QSqlRecord(" << r.count() << ')'; for (int i = 0; i < r.count(); ++i) dbg << '\n' << QString::fromLatin1("%1:").arg(i, 2) << r.field(i) << r.value(i).toString(); return dbg; diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 12eae84..1b8fb4c 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -573,7 +573,7 @@ QString QSqlRelationalTableModel::selectStatement() const } // this needs fixing!! the below if is borken. - tables.append(relation.tableName().append(QLatin1String(" ")).append(relTableAlias)); + tables.append(relation.tableName().append(QLatin1Char(' ')).append(relTableAlias)); if(!where.isEmpty()) where.append(QLatin1String(" AND ")); where.append(d->relationField(tableName(), d->db.driver()->escapeIdentifier(rec.fieldName(i), QSqlDriver::FieldName))); diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index 2b5fbd5..d51636f 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -261,7 +261,7 @@ public: constantAlpha &= (stops.at(i).second.alpha() == alpha); if (!constantAlpha) { - const qreal spacing = 0.02; + const qreal spacing = qreal(0.02); QGradientStops newStops; QRgb fromColor = PREMUL(stops.at(0).second.rgba()); QRgb toColor; @@ -362,7 +362,7 @@ public: translate_dashPattern(spen.dashPattern(), penWidth, &dashPattern); // SVG uses absolute offset - dashOffset = QString::fromLatin1("%1").arg(spen.dashOffset() * penWidth); + dashOffset = QString::number(spen.dashOffset() * penWidth); d_func()->attributes.stroke = color; d_func()->attributes.strokeOpacity = colorOpacity; @@ -403,8 +403,8 @@ public: } switch (spen.joinStyle()) { case Qt::MiterJoin: - stream() << "stroke-linejoin=\"miter\" "; - stream() << "stroke-miterlimit=\""<<spen.miterLimit()<<"\" "; + stream() << "stroke-linejoin=\"miter\" " + "stroke-miterlimit=\""<<spen.miterLimit()<<"\" "; break; case Qt::BevelJoin: stream() << "stroke-linejoin=\"bevel\" "; @@ -413,8 +413,8 @@ public: stream() << "stroke-linejoin=\"round\" "; break; case Qt::SvgMiterJoin: - stream() << "stroke-linejoin=\"miter\" "; - stream() << "stroke-miterlimit=\""<<spen.miterLimit()<<"\" "; + stream() << "stroke-linejoin=\"miter\" " + "stroke-miterlimit=\""<<spen.miterLimit()<<"\" "; break; default: qWarning("Unhandled join style"); @@ -427,8 +427,8 @@ public: case Qt::SolidPattern: { QString color, colorOpacity; translate_color(sbrush.color(), &color, &colorOpacity); - stream() << "fill=\"" << color << "\" "; - stream() << "fill-opacity=\"" + stream() << "fill=\"" << color << "\" " + "fill-opacity=\"" << colorOpacity << "\" "; d_func()->attributes.fill = color; d_func()->attributes.fillOpacity = colorOpacity; @@ -493,9 +493,9 @@ public: d->attributes.font_style = d->font.italic() ? QLatin1String("italic") : QLatin1String("normal"); *d->stream << "font-family=\"" << d->attributes.font_family << "\" " - << "font-size=\"" << d->attributes.font_size << "\" " - << "font-weight=\"" << d->attributes.font_weight << "\" " - << "font-style=\"" << d->attributes.font_style << "\" " + "font-size=\"" << d->attributes.font_size << "\" " + "font-weight=\"" << d->attributes.font_weight << "\" " + "font-style=\"" << d->attributes.font_style << "\" " << endl; } }; @@ -849,13 +849,13 @@ bool QSvgPaintEngine::begin(QPaintDevice *) } if (d->viewBox.isValid()) { - *d->stream << " viewBox=\"" << d->viewBox.left() << " " << d->viewBox.top(); - *d->stream << " " << d->viewBox.width() << " " << d->viewBox.height() << "\"" << endl; + *d->stream << " viewBox=\"" << d->viewBox.left() << ' ' << d->viewBox.top(); + *d->stream << ' ' << d->viewBox.width() << ' ' << d->viewBox.height() << '\"' << endl; } *d->stream << " xmlns=\"http://www.w3.org/2000/svg\"" - << " xmlns:xlink=\"http://www.w3.org/1999/xlink\" " - << " version=\"1.2\" baseProfile=\"tiny\">" << endl; + " xmlns:xlink=\"http://www.w3.org/1999/xlink\" " + " version=\"1.2\" baseProfile=\"tiny\">" << endl; if (!d->attributes.document_title.isEmpty()) { *d->stream << "<title>" << d->attributes.document_title << "</title>" << endl; @@ -918,10 +918,10 @@ void QSvgPaintEngine::drawImage(const QRectF &r, const QImage &image, Q_UNUSED(sr); Q_UNUSED(flags); stream() << "<image "; - stream() << "x=\""<<r.x()<<"\" "; - stream() << "y=\""<<r.y()<<"\" "; - stream() << "width=\""<<r.width()<<"\" "; - stream() << "height=\""<<r.height()<<"\" "; + stream() << "x=\""<<r.x()<<"\" " + "y=\""<<r.y()<<"\" " + "width=\""<<r.width()<<"\" " + "height=\""<<r.height()<<"\" "; QByteArray data; QBuffer buffer(&data); @@ -930,8 +930,7 @@ void QSvgPaintEngine::drawImage(const QRectF &r, const QImage &image, buffer.close(); stream() << "xlink:href=\"data:image/png;base64," << data.toBase64() - <<"\" "; - stream() << "/>\n"; + <<"\" />\n"; } void QSvgPaintEngine::updateState(const QPaintEngineState &state) @@ -958,10 +957,10 @@ void QSvgPaintEngine::updateState(const QPaintEngineState &state) if (flags & QPaintEngine::DirtyTransform) { d->matrix = state.matrix(); - *d->stream << "transform=\"matrix(" << d->matrix.m11() << "," - << d->matrix.m12() << "," - << d->matrix.m21() << "," << d->matrix.m22() << "," - << d->matrix.dx() << "," << d->matrix.dy() + *d->stream << "transform=\"matrix(" << d->matrix.m11() << ',' + << d->matrix.m12() << ',' + << d->matrix.m21() << ',' << d->matrix.m22() << ',' + << d->matrix.dx() << ',' << d->matrix.dy() << ")\"" << endl; } @@ -975,7 +974,7 @@ void QSvgPaintEngine::updateState(const QPaintEngineState &state) stream() << "opacity=\""<<state.opacity()<<"\" "; } - *d->stream << ">" << endl; + *d->stream << '>' << endl; d->afterFirstUpdate = true; } @@ -984,10 +983,8 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) { Q_D(QSvgPaintEngine); - *d->stream << "<path "; - - - *d->stream << "fill-rule="; + *d->stream << "<path " + "fill-rule="; if (p.fillRule() == Qt::OddEvenFill) *d->stream << "\"evenodd\" "; else @@ -999,13 +996,13 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) const QPainterPath::Element &e = p.elementAt(i); switch (e.type) { case QPainterPath::MoveToElement: - *d->stream << "M" << e.x << "," << e.y; + *d->stream << 'M' << e.x << ',' << e.y; break; case QPainterPath::LineToElement: - *d->stream << "L" << e.x << "," << e.y; + *d->stream << 'L' << e.x << ',' << e.y; break; case QPainterPath::CurveToElement: - *d->stream << "C" << e.x << "," << e.y; + *d->stream << 'C' << e.x << ',' << e.y; ++i; while (i < p.elementCount()) { const QPainterPath::Element &e = p.elementAt(i); @@ -1013,8 +1010,8 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) --i; break; } else - *d->stream << " "; - *d->stream << e.x << "," << e.y; + *d->stream << ' '; + *d->stream << e.x << ',' << e.y; ++i; } break; @@ -1022,7 +1019,7 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p) break; } if (i != p.elementCount() - 1) { - *d->stream << " "; + *d->stream << ' '; } } @@ -1044,7 +1041,7 @@ void QSvgPaintEngine::drawPolygon(const QPointF *points, int pointCount, stream() << "<polyline fill=\"none\" points=\""; for (int i = 0; i < pointCount; ++i) { const QPointF &pt = points[i]; - stream() << pt.x() << "," << pt.y() << " "; + stream() << pt.x() << ',' << pt.y() << ' '; } stream() << "\" />" <<endl; } else { @@ -1063,10 +1060,10 @@ void QSvgPaintEngine::drawTextItem(const QPointF &pt, const QTextItem &textItem) QString s = QString::fromRawData(ti.chars, ti.num_chars); *d->stream << "<text " - << "fill=\"" << d->attributes.stroke << "\" " - << "fill-opacity=\"" << d->attributes.strokeOpacity << "\" " - << "stroke=\"none\" " - << "x=\"" << pt.x() << "\" y=\"" << pt.y() << "\" "; + "fill=\"" << d->attributes.stroke << "\" " + "fill-opacity=\"" << d->attributes.strokeOpacity << "\" " + "stroke=\"none\" " + "x=\"" << pt.x() << "\" y=\"" << pt.y() << "\" "; qfontToSvg(textItem.font()); *d->stream << " >" << Qt::escape(s) diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h index 8bb6e84..b6340f8 100644 --- a/src/testlib/qbenchmark_p.h +++ b/src/testlib/qbenchmark_p.h @@ -81,7 +81,7 @@ struct QBenchmarkContext QString toString() const { - QString s = QString(QLatin1String("%1,%2,%3")).arg(slotName).arg(tag).arg(checkpointIndex); + QString s = QString::fromLatin1("%1,%2,%3").arg(slotName).arg(tag).arg(checkpointIndex); return s; } diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp index bcce147..c61460d 100644 --- a/src/testlib/qbenchmarkvalgrind.cpp +++ b/src/testlib/qbenchmarkvalgrind.cpp @@ -133,12 +133,12 @@ QString QBenchmarkValgrindUtils::getNewestFileName() QString base = QBenchmarkGlobalData::current->callgrindOutFileBase; Q_ASSERT(!base.isEmpty()); - nameFilters << QString(QLatin1String("%1.*")).arg(base); + nameFilters << QString::fromLatin1("%1.*").arg(base); QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable); Q_ASSERT(!fiList.empty()); int hiSuffix = -1; QFileInfo lastFileInfo; - const QString pattern = QString(QLatin1String("%1.(\\d+)")).arg(base); + const QString pattern = QString::fromLatin1("%1.(\\d+)").arg(base); const QRegExp rx(pattern); foreach (QFileInfo fileInfo, fiList) { const int index = rx.indexIn(fileInfo.fileName()); @@ -168,8 +168,8 @@ void QBenchmarkValgrindUtils::cleanup() QString base = QBenchmarkGlobalData::current->callgrindOutFileBase; Q_ASSERT(!base.isEmpty()); nameFilters - << QString(QLatin1String("%1")).arg(base) // overall summary - << QString(QLatin1String("%1.*")).arg(base); // individual dumps + << base // overall summary + << QString::fromLatin1("%1.*").arg(base); // individual dumps QFileInfoList fiList = QDir().entryInfoList(nameFilters, QDir::Files | QDir::Readable); foreach (QFileInfo fileInfo, fiList) { const bool removeOk = QFile::remove(fileInfo.fileName()); @@ -180,7 +180,7 @@ void QBenchmarkValgrindUtils::cleanup() QString QBenchmarkValgrindUtils::outFileBase(qint64 pid) { - return QString(QLatin1String("callgrind.out.%1")).arg( + return QString::fromLatin1("callgrind.out.%1").arg( pid != -1 ? pid : QCoreApplication::applicationPid()); } diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index 6f10d72..8ffdca2 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -216,9 +216,9 @@ namespace QTest { template <typename T> QString formatResult(T number, int significantDigits) { if (number < T(0)) - return QString(QLatin1String("NAN")); + return QLatin1String("NAN"); if (number == T(0)) - return QString(QLatin1String("0")); + return QLatin1String("0"); QString beforeDecimalPoint = QString::number(qint64(number), 'f', 0); QString afterDecimalPoint = QString::number(number, 'f', 20); diff --git a/src/testlib/qsignaldumper.cpp b/src/testlib/qsignaldumper.cpp index 0a32a6d..3a9d75e 100644 --- a/src/testlib/qsignaldumper.cpp +++ b/src/testlib/qsignaldumper.cpp @@ -87,7 +87,7 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv str.fill(' ', QTest::iLevel++ * QTest::IndentSpacesCount); str += "Signal: "; str += mo->className(); - str += "("; + str += '('; QString objname = caller->objectName(); str += objname.toLocal8Bit(); @@ -114,15 +114,15 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv str.append(QByteArray::number(addr, 16)); } else if (typeId != QMetaType::Void) { str.append(arg) - .append("(") + .append('(') .append(QVariant(typeId, argv[i + 1]).toString().toLocal8Bit()) - .append(")"); + .append(')'); } str.append(", "); } if (str.endsWith(", ")) str.chop(2); - str.append(")"); + str.append(')'); qPrintMessage(str); } @@ -143,7 +143,7 @@ static void qSignalDumperCallbackSlot(QObject *caller, int method_index, void ** str.fill(' ', QTest::iLevel * QTest::IndentSpacesCount); str += "Slot: "; str += mo->className(); - str += "("; + str += '('; QString objname = caller->objectName(); str += objname.toLocal8Bit(); diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp index eb04114..8d2f0cc 100644 --- a/src/tools/idc/main.cpp +++ b/src/tools/idc/main.cpp @@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE static QString quotePath(const QString &s) { - if (!s.startsWith(QLatin1String("\"")) && s.contains(QLatin1Char(' '))) - return QLatin1String("\"") + s + QLatin1String("\""); + if (!s.startsWith(QLatin1Char('\"')) && s.contains(QLatin1Char(' '))) + return QLatin1Char('\"') + s + QLatin1Char('\"'); return s; } @@ -282,7 +282,7 @@ int runIdc(int argc, char **argv) fprintf(stderr, "Server unregistered successfully!\n"); return 0; } else if (p[0] == QLatin1Char('/') || p[0] == QLatin1Char('-')) { - error = QLatin1String("Unknown option \"") + p + QLatin1String("\""); + error = QLatin1String("Unknown option \"") + p + QLatin1Char('\"'); break; } else { input = QLatin1String(argv[i]); diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index ae8a76e..e94bb77 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1161,8 +1161,8 @@ void Generator::_generateFunctions(QList<FunctionDef> &list, int type) for (int j = 0; j < f.arguments.count(); ++j) { const ArgumentDef &a = f.arguments.at(j); if (j) { - sig += ","; - arguments += ","; + sig += ','; + arguments += ','; } sig += a.normalizedType; arguments += a.name; diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index a6a0ba1..8ca2823 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -752,14 +752,14 @@ void Moc::generate(FILE *out) if (!noInclude) { - if (includePath.size() && includePath.right(1) != "/") - includePath += "/"; + if (includePath.size() && !includePath.endsWith('/')) + includePath += '/'; for (int i = 0; i < includeFiles.size(); ++i) { QByteArray inc = includeFiles.at(i); if (inc[0] != '<' && inc[0] != '"') { if (includePath.size() && includePath != "./") inc.prepend(includePath); - inc = "\"" + inc + "\""; + inc = '\"' + inc + '\"'; } fprintf(out, "#include %s\n", inc.constData()); } diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 45cbbfd..3260ca2 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -807,7 +807,7 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) continue; QByteArray frameworkCandidate = include.left(slashPos); frameworkCandidate.append(".framework/Headers/"); - fi.setFile(QString::fromLocal8Bit(p.path + "/" + frameworkCandidate), QString::fromLocal8Bit(include.mid(slashPos + 1))); + fi.setFile(QString::fromLocal8Bit(p.path + '/' + frameworkCandidate), QString::fromLocal8Bit(include.mid(slashPos + 1))); } else { fi.setFile(QString::fromLocal8Bit(p.path), QString::fromLocal8Bit(include)); } diff --git a/src/tools/uic/cpp/cppwriteicondata.cpp b/src/tools/uic/cpp/cppwriteicondata.cpp index 53b108f..08d552d 100644 --- a/src/tools/uic/cpp/cppwriteicondata.cpp +++ b/src/tools/uic/cpp/cppwriteicondata.cpp @@ -161,9 +161,9 @@ void WriteIconData::writeImage(QTextStream &output, const QString &indent, DomIm for (a = 0; a < (int) (data.length()/2)-1; a++) { output << "0x" << QString(data[2*a]) << QString(data[2*a+1]) << ','; if (a % 12 == 11) - output << "\n" << indent; + output << '\n' << indent; else - output << " "; + output << ' '; } output << "0x" << QString(data[2*a]) << QString(data[2*a+1]) << '\n'; output << "};\n\n"; diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 47566ad..5a2f487 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -2813,7 +2813,7 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp bool generateMultiDirective = false; if (emptyItemPolicy == Item::ConstructItemOnly && m_children.size() == 0) { if (m_setupUiData.policy == ItemData::DontGenerate) { - m_setupUiStream << m_indent << "new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << "new " << m_itemClassName << '(' << parent << ");\n"; return QString(); } else if (m_setupUiData.policy == ItemData::GenerateWithMultiDirective) { generateMultiDirective = true; @@ -2824,11 +2824,11 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp generateMultiDirectiveBegin(m_setupUiStream, m_setupUiData.directives); const QString uniqueName = m_driver->unique(QLatin1String("__") + m_itemClassName.toLower()); - m_setupUiStream << m_indent << m_itemClassName << " *" << uniqueName << " = new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << m_itemClassName << " *" << uniqueName << " = new " << m_itemClassName << '(' << parent << ");\n"; if (generateMultiDirective) { m_setupUiStream << "#else\n"; - m_setupUiStream << m_indent << "new " << m_itemClassName << "(" << parent << ");\n"; + m_setupUiStream << m_indent << "new " << m_itemClassName << '(' << parent << ");\n"; generateMultiDirectiveEnd(m_setupUiStream, m_setupUiData.directives); } diff --git a/src/tools/uic3/embed.cpp b/src/tools/uic3/embed.cpp index 882328a..b406c1f 100644 --- a/src/tools/uic3/embed.cpp +++ b/src/tools/uic3/embed.cpp @@ -238,7 +238,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images) out << "true, "; else out << "false, "; - out << "\"" << e->name << "\" },\n"; + out << '\"' << e->name << "\" },\n"; delete e; } #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION diff --git a/src/tools/uic3/form.cpp b/src/tools/uic3/form.cpp index d9e968b..b484210 100644 --- a/src/tools/uic3/form.cpp +++ b/src/tools/uic3/form.cpp @@ -185,14 +185,14 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) for (it = globalIncludes.constBegin(); it != globalIncludes.constEnd(); ++it) { if (!(*it).isEmpty()) { QString header = fixHeaderName(*it); - out << "#include <" << header << ">" << endl; + out << "#include <" << header << '>' << endl; } } localIncludes = unique(localIncludes); for (it = localIncludes.constBegin(); it != localIncludes.constEnd(); ++it) { if (!(*it).isEmpty()) { QString header = fixHeaderName(*it); - out << "#include \"" << header << "\"" << endl; + out << "#include \"" << header << '\"' << endl; } } out << endl; @@ -216,7 +216,7 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) typeDefs = unique(typeDefs); for (it = typeDefs.constBegin(); it != typeDefs.constEnd(); ++it) { if (!(*it).isEmpty()) - out << "typedef " << *it << ";" << endl; + out << "typedef " << *it << ';' << endl; } nl = e.parentNode().toElement().elementsByTagName(QLatin1String("forward")); @@ -236,17 +236,17 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes) out << "namespace " << *ns << " {" << endl; ++ns; } - out << "class " << forwardName << ";" << endl; + out << "class " << forwardName << ';' << endl; for (int i = 0; i < (int) forwardNamespaces.count(); i++) - out << "}" << endl; + out << '}' << endl; } } for (it = forwardDecl2.constBegin(); it != forwardDecl2.constEnd(); ++it) { QString fd = *it; fd = fd.trimmed(); - if (!fd.endsWith(QLatin1String(";"))) - fd += QLatin1String(";"); + if (!fd.endsWith(QLatin1Char(';'))) + fd += QLatin1Char(';'); out << fd << endl; } @@ -279,7 +279,7 @@ void Ui3Reader::createWrapperDecl(const QDomElement &e, const QString &converted out << "#ifndef " << protector << endl; out << "#define " << protector << endl; out << endl; - out << "#include \"" << convertedUiFile << "\"" << endl; + out << "#include \"" << convertedUiFile << '\"' << endl; createWrapperDeclContents(e); out << endl; @@ -309,8 +309,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) out << "class "; if (!exportMacro.isEmpty()) - out << exportMacro << " "; - out << bareNameOfClass << " : public " << objClass << ", public Ui::" << bareNameOfClass << endl << "{" << endl; + out << exportMacro << ' '; + out << bareNameOfClass << " : public " << objClass << ", public Ui::" << bareNameOfClass << endl << '{' << endl; /* qmake ignore Q_OBJECT */ out << " Q_OBJECT" << endl; @@ -362,8 +362,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if (access == QLatin1String(QLatin1String("protected"))) { @@ -394,8 +394,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if (access == QLatin1String("protected")) { @@ -423,8 +423,8 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) // continue; QString access = n.attribute(QLatin1String("access"), QLatin1String("protected")); QString var = fixDeclaration(n.firstChild().toText().data().trimmed()); - if (!var.endsWith(QLatin1String(";"))) - var += QLatin1String(";"); + if (!var.endsWith(QLatin1Char(';'))) + var += QLatin1Char(';'); if (access == QLatin1String("public")) publicVars += var; else if (access == QLatin1String("private")) @@ -458,7 +458,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString sigName = n.firstChild().toText().data().trimmed(); - if (sigName.endsWith(QLatin1String(";"))) + if (sigName.endsWith(QLatin1Char(';'))) sigName = sigName.left(sigName.length() - 1); extraSignals += fixDeclaration(sigName); } @@ -467,7 +467,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) if (!extraSignals.isEmpty()) { out << "signals:" << endl; for (it = extraSignals.constBegin(); it != extraSignals.constEnd(); ++it) - out << " void " << (*it) << ";" << endl; + out << " void " << (*it) << ';' << endl; out << endl; } @@ -513,7 +513,7 @@ void Ui3Reader::createWrapperDeclContents(const QDomElement &e) out << "};" << endl; for (i = 0; i < (int) namespaces.count(); i++) - out << "}" << endl; + out << '}' << endl; out << endl; } @@ -543,7 +543,7 @@ void Ui3Reader::writeFunctionsDecl(const QStringList &fuLst, const QStringList & signature = fixDeclaration(signature); type = fixType(type); - out << " " << specifier << type << " " << signature << pure << ";" << endl; + out << " " << specifier << type << ' ' << signature << pure << ';' << endl; } out << endl; } @@ -583,8 +583,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); extraFuncts += functionName; extraFunctTyp += n.attribute(QLatin1String("returnType"), QLatin1String("void")); extraFunctSpecifier += n.attribute(QLatin1String("specifier"), QLatin1String("virtual")); @@ -598,8 +598,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (n.attribute(QLatin1String("language"), QLatin1String("C++")) != QLatin1String("C++")) continue; QString functionName = n.firstChild().toText().data().trimmed(); - if (functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left(functionName.length() - 1); + if (functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); extraFuncts += functionName; extraFunctTyp += n.attribute(QLatin1String("returnType"), QLatin1String("void")); extraFunctSpecifier += n.attribute(QLatin1String("specifier"), QLatin1String("virtual")); @@ -663,7 +663,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) globalIncludes = unique(globalIncludes); for (it = globalIncludes.begin(); it != globalIncludes.end(); ++it) { if (!(*it).isEmpty()) - out << "#include <" << fixHeaderName(*it) << ">" << endl; + out << "#include <" << fixHeaderName(*it) << '>' << endl; } if (externPixmaps) { @@ -677,14 +677,14 @@ void Ui3Reader::createFormImpl(const QDomElement &e) localIncludes = unique(localIncludes); for (it = localIncludes.begin(); it != localIncludes.end(); ++it) { if (!(*it).isEmpty() && *it != QFileInfo(fileName + QLatin1String(".h")).fileName()) - out << "#include \"" << fixHeaderName(*it) << "\"" << endl; + out << "#include \"" << fixHeaderName(*it) << '\"' << endl; } QString uiDotH = fileName + QLatin1String(".h"); if (QFile::exists(uiDotH)) { if (!outputFileName.isEmpty()) uiDotH = QString::fromUtf8(combinePath(uiDotH.ascii(), outputFileName.ascii())); - out << "#include \"" << uiDotH << "\"" << endl; + out << "#include \"" << uiDotH << '\"' << endl; writeFunctImpl = false; } @@ -702,7 +702,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * name 'name' and widget flags set to 'f'." << endl; out << " *" << endl; out << " * The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * true to construct a modal " << objClass.mid(1).toLower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).toLower() << '.' << endl; out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)" << endl; out << " : " << objClass << "(parent, name, modal, fl)"; @@ -733,7 +733,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << endl; - out << "{" << endl; + out << '{' << endl; // // setup the gui @@ -775,7 +775,7 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << indent << "init();" << endl; // end of constructor - out << "}" << endl; + out << '}' << endl; out << endl; // destructor @@ -783,11 +783,11 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * Destroys the object and frees any allocated resources" << endl; out << " */" << endl; out << nameOfClass << "::~" << bareNameOfClass << "()" << endl; - out << "{" << endl; + out << '{' << endl; if (extraFuncts.contains(QLatin1String("destroy()"))) out << indent << "destroy();" << endl; out << indent << "// no need to delete child widgets, Qt does it all for us" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; // handle application events if required @@ -816,9 +816,9 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << " * language." << endl; out << " */" << endl; out << "void " << nameOfClass << "::languageChange()" << endl; - out << "{" << endl; + out << '{' << endl; out << " retranslateUi(this);" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; // create stubs for additional slots if necessary @@ -833,8 +833,8 @@ void Ui3Reader::createFormImpl(const QDomElement &e) type = type.simplified(); QString fname = fixDeclaration(Parser::cleanArgs(*it)); if (!(*it3).startsWith(QLatin1String("pure"))) { // "pure virtual" or "pureVirtual" - out << type << " " << nameOfClass << "::" << fname << endl; - out << "{" << endl; + out << type << ' ' << nameOfClass << "::" << fname << endl; + out << '{' << endl; if (*it != QLatin1String("init()") && *it != QLatin1String("destroy()")) { QRegExp numeric(QLatin1String("^(?:signed|unsigned|u?char|u?short|u?int" "|u?long|Q_U?INT(?:8|16|32)|Q_U?LONG|float" @@ -868,14 +868,14 @@ void Ui3Reader::createFormImpl(const QDomElement &e) if (type == QLatin1String("bool")) { retVal = QLatin1String("false"); - } else if (isBasicNumericType || type.endsWith(QLatin1String("*"))) { + } else if (isBasicNumericType || type.endsWith(QLatin1Char('*'))) { retVal = QLatin1String("0"); - } else if (type.endsWith(QLatin1String("&"))) { + } else if (type.endsWith(QLatin1Char('&'))) { do { type.chop(1); - } while (type.endsWith(QLatin1String(" "))); + } while (type.endsWith(QLatin1Char(' '))); retVal = QLatin1String("uic_temp_var"); - out << indent << "static " << type << " " << retVal << ";" << endl; + out << indent << "static " << type << ' ' << retVal << ';' << endl; } else { retVal = type + QLatin1String("()"); } @@ -883,9 +883,9 @@ void Ui3Reader::createFormImpl(const QDomElement &e) out << indent << "qWarning(\"" << nameOfClass << "::" << fname << ": Not implemented yet\");" << endl; if (!retVal.isEmpty()) - out << indent << "return " << retVal << ";" << endl; + out << indent << "return " << retVal << ';' << endl; } - out << "}" << endl; + out << '}' << endl; out << endl; } ++it; diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp index d581016..9535b91 100644 --- a/src/tools/uic3/main.cpp +++ b/src/tools/uic3/main.cpp @@ -367,7 +367,7 @@ int runUic3(int argc, char * argv[]) } if (headerFile) { - out << "#include \"" << headerFile << "\"" << endl << endl; + out << "#include \"" << headerFile << '\"' << endl << endl; } QString convertedUi; diff --git a/src/tools/uic3/parser.cpp b/src/tools/uic3/parser.cpp index 744dd30..395cc4d 100644 --- a/src/tools/uic3/parser.cpp +++ b/src/tools/uic3/parser.cpp @@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE QString Parser::cleanArgs(const QString &func) { QString slot(func); - int begin = slot.indexOf(QLatin1String("(")) + 1; + int begin = slot.indexOf(QLatin1Char('(')) + 1; QString args = slot.mid(begin); - args = args.left(args.indexOf(QLatin1String(")"))); + args = args.left(args.indexOf(QLatin1Char(')'))); QStringList lst = args.split(QLatin1Char(',')); QString res = slot.left(begin); for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) { if (it != lst.begin()) - res += QLatin1String(","); + res += QLatin1Char(','); QString arg = *it; int pos = 0; if ((pos = arg.indexOf(QLatin1Char('&'))) != -1) { @@ -65,7 +65,7 @@ QString Parser::cleanArgs(const QString &func) } else { arg = arg.simplified(); if ((pos = arg.indexOf(QLatin1Char(':'))) != -1) - arg = arg.left(pos).simplified() + QLatin1String(":") + arg.mid(pos + 1).simplified(); + arg = arg.left(pos).simplified() + QLatin1Char(':') + arg.mid(pos + 1).simplified(); QStringList l = arg.split(QLatin1Char(' ')); if (l.count() == 2) { if (l[0] != QLatin1String("const") @@ -73,12 +73,12 @@ QString Parser::cleanArgs(const QString &func) && l[0] != QLatin1String("var")) arg = l[0]; } else if (l.count() == 3) { - arg = l[0] + QLatin1String(" ") + l[1]; + arg = l[0] + QLatin1Char(' ') + l[1]; } } res += arg; } - res += QLatin1String(")"); + res += QLatin1Char(')'); return res; } diff --git a/src/tools/uic3/qt3to4.cpp b/src/tools/uic3/qt3to4.cpp index 9e5b64b..2862727 100644 --- a/src/tools/uic3/qt3to4.cpp +++ b/src/tools/uic3/qt3to4.cpp @@ -149,7 +149,7 @@ void Porting::readXML(RuleList *renamedHeaders, RuleList *renamedClasses, RuleLi QString fileName = QLatin1String("q3porting.xml"); QString filePath; //check QLibraryInfo::DataPath/filename - filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QLatin1String("/") + fileName) ; + filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QLatin1Char('/') + fileName) ; //check QLibraryInfo::PrefixPath/tools/porting/src/filename if (!QFile::exists(filePath)) diff --git a/src/tools/uic3/subclassing.cpp b/src/tools/uic3/subclassing.cpp index e590ab7..85c2218 100644 --- a/src/tools/uic3/subclassing.cpp +++ b/src/tools/uic3/subclassing.cpp @@ -69,7 +69,7 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) return; out << "class " << subClass << " : public " << nameOfClass << endl; - out << "{" << endl; + out << '{' << endl; /* tmake ignore Q_OBJECT */ out << " Q_OBJECT" << endl; @@ -105,8 +105,8 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";"))) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';'))) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -133,8 +133,8 @@ void Ui3Reader::createSubDecl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -195,7 +195,7 @@ void Ui3Reader::writeFunctionsSubDecl( const QStringList &fuLst, const QStringLi type = QLatin1String("void"); if ( *it3 == QLatin1String("non virtual") ) continue; - out << " " << type << " " << fixDeclaration(*it) << ";" << endl; + out << " " << type << ' ' << fixDeclaration(*it) << ';' << endl; } out << endl; } @@ -223,7 +223,7 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << " * name 'name' and widget flags set to 'f' " << endl; out << " *" << endl; out << " * The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * true to construct a modal " << objClass.mid(1).toLower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).toLower() << '.' << endl; out << " */" << endl; out << subClass << "::" << subClass << "( QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, modal, fl )" << endl; @@ -235,8 +235,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << subClass << "::" << subClass << "( QWidget* parent, const char* name, Qt::WindowFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, fl )" << endl; } - out << "{" << endl; - out << "}" << endl; + out << '{' << endl; + out << '}' << endl; out << endl; // destructor @@ -244,9 +244,9 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) out << " * Destroys the object and frees any allocated resources" << endl; out << " */" << endl; out << subClass << "::~" << subClass << "()" << endl; - out << "{" << endl; + out << '{' << endl; out << " // no need to delete child widgets, Qt does it all for us" << endl; - out << "}" << endl; + out << '}' << endl; out << endl; @@ -268,8 +268,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -296,8 +296,8 @@ void Ui3Reader::createSubImpl( const QDomElement &e, const QString& subClass ) continue; QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void")); QString functionName = n.firstChild().toText().data().trimmed(); - if ( functionName.endsWith(QLatin1String(";")) ) - functionName = functionName.left( functionName.length() - 1 ); + if ( functionName.endsWith(QLatin1Char(';')) ) + functionName.chop(1); QString specifier = n.attribute(QLatin1String("specifier")); QString access = n.attribute(QLatin1String("access")); if ( access == QLatin1String("protected") ) { @@ -351,10 +351,10 @@ void Ui3Reader::writeFunctionsSubImpl( const QStringList &fuLst, const QStringLi out << "/*" << endl; out << " * " << descr << endl; out << " */" << endl; - out << type << " " << subClass << "::" << fixDeclaration(*it) << endl; - out << "{" << endl; + out << type << ' ' << subClass << "::" << fixDeclaration(*it) << endl; + out << '{' << endl; out << " qWarning( \"" << subClass << "::" << fixDeclaration(*it) << " not yet implemented!\" );" << endl; - out << "}" << endl << endl; + out << '}' << endl << endl; } out << endl; } diff --git a/src/tools/uic3/ui3reader.cpp b/src/tools/uic3/ui3reader.cpp index 1ba4b2f..539565c 100644 --- a/src/tools/uic3/ui3reader.cpp +++ b/src/tools/uic3/ui3reader.cpp @@ -125,10 +125,10 @@ QString Ui3Reader::fixString(const QString &str, bool encode) QString s; if (!encode) { s = str; - s.replace(QLatin1String("\\"), QLatin1String("\\\\")); - s.replace(QLatin1String("\""), QLatin1String("\\\"")); - s.replace(QLatin1String("\r"), QLatin1String("")); - s.replace(QLatin1String("\n"), QLatin1String("\\n\"\n\"")); + s.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + s.replace(QLatin1Char('\"'), QLatin1String("\\\"")); + s.remove(QLatin1Char('\r')); + s.replace(QLatin1Char('\n'), QLatin1String("\\n\"\n\"")); } else { QByteArray utf8 = str.utf8(); const int l = utf8.length(); @@ -136,7 +136,7 @@ QString Ui3Reader::fixString(const QString &str, bool encode) s += QLatin1String("\\x") + QString::number((uchar)utf8[i], 16); } - return QLatin1String("\"") + s + QLatin1String("\""); + return QLatin1Char('\"') + s + QLatin1Char('\"'); } QString Ui3Reader::trcall(const QString& sourceText, const QString& comment) @@ -158,12 +158,12 @@ QString Ui3Reader::trcall(const QString& sourceText, const QString& comment) } if (comment.isEmpty()) { - return t + QLatin1String("(") + fixString(sourceText, encode) + QLatin1String(")"); + return t + QLatin1Char('(') + fixString(sourceText, encode) + QLatin1Char(')'); } else { - return t + QLatin1String("(") + return t + QLatin1Char('(') + fixString(sourceText, encode) + QLatin1String(", ") - + fixString(comment, encode) + QLatin1String(")"); + + fixString(comment, encode) + QLatin1Char(')'); } } @@ -480,10 +480,10 @@ void Ui3Reader::createColorGroupImpl(const QString& name, const QDomElement& e) QString pixmap = n.firstChild().toText().data(); if (!pixmapLoaderFunction.isEmpty()) { pixmap.prepend(pixmapLoaderFunction - + QLatin1String("(") + + QLatin1Char('(') + QLatin1String(externPixmaps ? "\"" : "")); - pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1String(")")); + pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1Char(')')); } out << indent << name << ".setBrush(QColorGroup::" << ColorRole[r] << ", QBrush(" << color << ", " << pixmap << "));" << endl; @@ -578,9 +578,9 @@ QString Ui3Reader::registerObject(const QString& name) if (objectNames.contains(result)) { int i = 2; - while (objectNames.contains(result + QLatin1String("_") + QString::number(i))) + while (objectNames.contains(result + QLatin1Char('_') + QString::number(i))) i++; - result += QLatin1String("_"); + result += QLatin1Char('_'); result += QString::number(i); } objectNames += result; diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp index a3bc0e0..e5b3259 100644 --- a/src/winmain/qtmain_win.cpp +++ b/src/winmain/qtmain_win.cpp @@ -100,7 +100,7 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara #if defined(Q_OS_WINCE) TCHAR appName[256]; GetModuleFileName(0, appName, 255); - cmdParam = QString(QLatin1String("\"%1\" ")).arg(QString::fromUtf16((const unsigned short *)appName)).toLocal8Bit() + cmdParam; + cmdParam.prepend(QString::fromLatin1("\"%1\" ").arg(QString::fromUtf16((const unsigned short *)appName)).toLocal8Bit()); #endif int argc = 0; @@ -110,7 +110,7 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /*cmdPara #if defined(Q_OS_WINCE) TCHAR uniqueAppID[256]; GetModuleFileName(0, uniqueAppID, 255); - QString uid = QString::fromUtf16((const unsigned short *)uniqueAppID).toLower().replace(QString(QLatin1String("\\")), QString(QLatin1String("_"))); + QString uid = QString::fromUtf16((const unsigned short *)uniqueAppID).toLower().replace(QLatin1Char('\\'), QLatin1Char('_')); // If there exists an other instance of this application // it will be the owner of a mutex with the unique ID. diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index dc6ff92..da0e31b 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -4589,7 +4589,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const qName = prefix + QLatin1Char(':') + name; nsDecl = QLatin1String(" xmlns:") + prefix; } - nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1String("\""); + nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1Char('\"'); } s << '<' << qName << nsDecl; diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index ade0339..db50f01 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -5464,7 +5464,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference() if (skipIt) { if (contentHnd) { - if (!contentHnd->skippedEntity(QString::fromLatin1("%") + ref())) { + if (!contentHnd->skippedEntity(QLatin1Char('%') + ref())) { reportParseError(contentHnd->errorString()); return false; } @@ -5476,7 +5476,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference() return false; } else if (parsePEReference_context == InDTD) { // Included as PE - if (!insertXmlRef(QString::fromLatin1(" ")+xmlRefString+QString::fromLatin1(" "), ref(), false)) + if (!insertXmlRef(QLatin1Char(' ') + xmlRefString + QLatin1Char(' '), ref(), false)) return false; } } @@ -6728,7 +6728,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() if ( !entityExist(name())) { parameterEntities.insert(name(), string()); if (declHnd) { - if (!declHnd->internalEntityDecl(QString::fromLatin1("%")+name(), string())) { + if (!declHnd->internalEntityDecl(QLatin1Char('%') + name(), string())) { reportParseError(declHnd->errorString()); return false; } @@ -6740,7 +6740,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() if ( !entityExist(name())) { externParameterEntities.insert(name(), QXmlSimpleReaderPrivate::ExternParameterEntity(publicId, systemId)); if (declHnd) { - if (!declHnd->externalEntityDecl(QString::fromLatin1("%")+name(), publicId, systemId)) { + if (!declHnd->externalEntityDecl(QLatin1Char('%') + name(), publicId, systemId)) { reportParseError(declHnd->errorString()); return false; } @@ -7864,8 +7864,8 @@ bool QXmlSimpleReaderPrivate::insertXmlRef(const QString &data, const QString &n { if (inLiteral) { QString tmp = data; - xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1String("\""), - QLatin1String(""")).replace(QLatin1String("'"), QLatin1String("'")))); + xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1Char('\"'), + QLatin1String(""")).replace(QLatin1Char('\''), QLatin1String("'")))); } else { xmlRefStack.push(XmlRef(name, data)); } diff --git a/src/xmlpatterns/acceltree/qacceltree.cpp b/src/xmlpatterns/acceltree/qacceltree.cpp index 60e6e27..6bc1794 100644 --- a/src/xmlpatterns/acceltree/qacceltree.cpp +++ b/src/xmlpatterns/acceltree/qacceltree.cpp @@ -71,7 +71,7 @@ void AccelTree::printStats(const NamePool::Ptr &np) const for(int i = 0; i < len; ++i) { const BasicNodeData &v = basicData.at(i); - pDebug() << "|" << i + pDebug() << '|' << i << "\t\t|" << v.depth() << "\t|" << v.size() << "\t|" << postNumber(i) @@ -81,12 +81,12 @@ void AccelTree::printStats(const NamePool::Ptr &np) const : data.value(i)) << "\t|"; /* - pDebug() << "|" << QString().arg(i, 14) - << "|" << QString().arg(v.depth(), 6) - << "|" << QString().arg(v.size(), 6) - << "|" << QString().arg(postNumber(i), 14) - << "|" << QString().arg(v.kind(), 6) - << "|"; + pDebug() << '|' << QString().arg(i, 14) + << '|' << QString().arg(v.depth(), 6) + << '|' << QString().arg(v.size(), 6) + << '|' << QString().arg(postNumber(i), 14) + << '|' << QString().arg(v.kind(), 6) + << '|'; */ } pDebug() << "+---------------+-------+-------+---------------+-------+--------------+"; diff --git a/src/xmlpatterns/api/qsourcelocation.cpp b/src/xmlpatterns/api/qsourcelocation.cpp index 4eee39c..1dd8ffd 100644 --- a/src/xmlpatterns/api/qsourcelocation.cpp +++ b/src/xmlpatterns/api/qsourcelocation.cpp @@ -206,7 +206,7 @@ QDebug operator<<(QDebug debug, const QSourceLocation &sourceLocation) << sourceLocation.line() << ", column:" << sourceLocation.column() - << ")"; + << ')'; return debug; } #endif diff --git a/src/xmlpatterns/data/qabstractfloat.cpp b/src/xmlpatterns/data/qabstractfloat.cpp index b6226b5..a45b0fd 100644 --- a/src/xmlpatterns/data/qabstractfloat.cpp +++ b/src/xmlpatterns/data/qabstractfloat.cpp @@ -186,7 +186,7 @@ QString AbstractFloat<isDouble>::stringValue() const if(sign) valueAsString += QLatin1Char('-'); - valueAsString += qret.left(1); + valueAsString += qret.at(0); valueAsString += QLatin1Char('.'); if(1 == qret.size()) diff --git a/src/xmlpatterns/data/qcommonvalues.cpp b/src/xmlpatterns/data/qcommonvalues.cpp index 07a273d..99a8086 100644 --- a/src/xmlpatterns/data/qcommonvalues.cpp +++ b/src/xmlpatterns/data/qcommonvalues.cpp @@ -57,7 +57,7 @@ using namespace QPatternist; // STATIC DATA const AtomicString::Ptr CommonValues::EmptyString - (new AtomicString(QString(QLatin1String("")))); + (new AtomicString(QLatin1String(""))); const AtomicString::Ptr CommonValues::TrueString (new AtomicString(QLatin1String("true"))); const AtomicString::Ptr CommonValues::FalseString diff --git a/src/xmlpatterns/expr/qexpression_p.h b/src/xmlpatterns/expr/qexpression_p.h index 5eb63de..65918e6 100644 --- a/src/xmlpatterns/expr/qexpression_p.h +++ b/src/xmlpatterns/expr/qexpression_p.h @@ -884,7 +884,7 @@ namespace QPatternist { pDebug() << "AST REWRITE:" << old.data() << "to" << New.data() << '(' << old->actualReflection() << "to" << New->actualReflection() << ", " - << old->description() << "to" << New->description() << ")"; + << old->description() << "to" << New->description() << ')'; /* The order of these two lines is significant.. */ context->addLocation(New.data(), context->locationFor(old->actualReflection())); diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index 2fff6d0..816b2e8 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -2171,7 +2171,7 @@ void tst_QComboBox::noScrollbar_data() QTest::newRow("everything and more") << QString::fromLatin1("QAbstractItemView { border: 1px 3px 5px 1px solid blue; " " padding: 2px 5px 3px 1px; margin: 2px 5px 3px 1px; } " " QAbstractItemView::item { border: 2px solid green; " - " padding: 1px 1px 2px 2px margin: 1px; } " ); + " padding: 1px 1px 2px 2px; margin: 1px; } " ); } void tst_QComboBox::noScrollbar() @@ -2179,10 +2179,11 @@ void tst_QComboBox::noScrollbar() QStringList initialContent; initialContent << "foo" << "bar" << "foobar" << "moo"; QFETCH(QString, stylesheet); + QString oldCss = qApp->styleSheet(); + qApp->setStyleSheet(stylesheet); { QComboBox comboBox; - comboBox.setStyleSheet(stylesheet); comboBox.addItems(initialContent); comboBox.show(); comboBox.resize(200, comboBox.height()); @@ -2196,7 +2197,6 @@ void tst_QComboBox::noScrollbar() { QTableWidget *table = new QTableWidget(2,2); QComboBox comboBox; - comboBox.setStyleSheet(stylesheet); comboBox.setView(table); comboBox.setModel(table->model()); comboBox.show(); @@ -2207,6 +2207,8 @@ void tst_QComboBox::noScrollbar() QVERIFY(!comboBox.view()->horizontalScrollBar()->isVisible()); QVERIFY(!comboBox.view()->verticalScrollBar()->isVisible()); } + + qApp->setStyleSheet(oldCss); } void tst_QComboBox::setItemDelegate() diff --git a/tests/auto/qdate/tst_qdate.cpp b/tests/auto/qdate/tst_qdate.cpp index d4273d0..4d6c80c 100644 --- a/tests/auto/qdate/tst_qdate.cpp +++ b/tests/auto/qdate/tst_qdate.cpp @@ -82,6 +82,8 @@ private slots: void operator_gt_eq(); void fromString_data(); void fromString(); + void fromString_format_data(); + void fromString_format(); void toString_format_data(); void toString_format(); void isLeapYear(); @@ -618,6 +620,30 @@ void tst_QDate::fromString() QCOMPARE( QDate::fromString( str2, Qt::ISODate ), d1 ); } +void tst_QDate::fromString_format_data() +{ + QTest::addColumn<QString>("string"); + QTest::addColumn<QString>("format"); + QTest::addColumn<QDate>("date"); + + //year with yy is always 19xx for compatibility + QTest::newRow( "data0" ) << QString("21052006") << QString("ddMMyyyy") << QDate(2006,5,21); + QTest::newRow( "data1" ) << QString("210506") << QString("ddMMyy") << QDate(1906,5,21); + QTest::newRow( "data2" ) << QString("21/5/2006") << QString("d/M/yyyy") << QDate(2006,5,21); + QTest::newRow( "data3" ) << QString("21/5/06") << QString("d/M/yy") << QDate(1906,5,21); + QTest::newRow( "data4" ) << QString("20060521") << QString("yyyyMMdd") << QDate(2006,5,21); + QTest::newRow( "data5" ) << QString("060521") << QString("yyMMdd") << QDate(1906,5,21); +} + +void tst_QDate::fromString_format() +{ + QFETCH( QString, string ); + QFETCH( QString, format ); + QFETCH( QDate, date ); + + QCOMPARE( QDate::fromString( string, format ), date ); +} + void tst_QDate::toString_format_data() { QTest::addColumn<QDate>("t"); diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp index 8fe15b1..b25cdc7 100644 --- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp @@ -371,182 +371,6 @@ void tst_QEasingCurve::valueForProgress_data() << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) << (RealList() << 0.5 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5 << 0.2061 << 0.02447 << 0.02447 << 0.2061 << 0.5); - /* - QTest::newRow("InQuad") << int(QEasingCurve::InQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (RealList() << 0 << 0.01 << 0.04 << 0.09 << 0.16 << 0.25 << 0.36 << 0.49 << 0.64 << 0.81 << 1); - QTest::newRow("OutQuad") << int(QEasingCurve::OutQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0.19 << 0.36 << 0.51 << 0.64 << 0.75 << 0.84 << 0.91 << 0.96 << 0.99 << 1); - - QTest::newRow("InOutQuad") << int(QEasingCurve::InOutQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 8 << 18 << 32 << 50 << 68 << 82 << 92 << 98 << 100); - - QTest::newRow("OutInQuad") << int(QEasingCurve::OutInQuad) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 18 << 32 << 42 << 48 << 50 << 52 << 57 << 68 << 82 << 100); - - QTest::newRow("InCubic") << int(QEasingCurve::InCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 2 << 6 << 12 << 21 << 34 << 51 << 72 << 100); - - QTest::newRow("OutCubic") << int(QEasingCurve::OutCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 27 << 48 << 65 << 78 << 87 << 93 << 97 << 99 << 99 << 100); - - QTest::newRow("InOutCubic") << int(QEasingCurve::InOutCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 3 << 10 << 25 << 50 << 74 << 89 << 96 << 99 << 100); - - QTest::newRow("OutInCubic") << int(QEasingCurve::OutInCubic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 24 << 39 << 46 << 49 << 50 << 50 << 53 << 60 << 75 << 100); - - QTest::newRow("InQuart") << int(QEasingCurve::InQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 2 << 6 << 12 << 24 << 40 << 65 << 100); - - QTest::newRow("OutQuart") << int(QEasingCurve::OutQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 34 << 59 << 75 << 87 << 93 << 97 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutQuart") << int(QEasingCurve::InOutQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 1 << 6 << 20 << 50 << 79 << 93 << 98 << 99 << 100); - - QTest::newRow("OutInQuart") << int(QEasingCurve::OutInQuart) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 29 << 43 << 48 << 49 << 50 << 50 << 51 << 56 << 70 << 100); - - QTest::newRow("InQuint") << int(QEasingCurve::InQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << 3 << 7 << 16 << 32 << 59 << 100); - - QTest::newRow("OutQuint") << int(QEasingCurve::OutQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 40 << 67 << 83 << 92 << 96 << 98 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutQuint") << int(QEasingCurve::InOutQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 3 << 16 << 50 << 83 << 96 << 99 << 99 << 100); - - QTest::newRow("OutInQuint") << int(QEasingCurve::OutInQuint) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 33 << 46 << 49 << 49 << 50 << 50 << 50 << 53 << 66 << 100); - - QTest::newRow("InSine") << int(QEasingCurve::InSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 4 << 10 << 19 << 29 << 41 << 54 << 69 << 84 << 100); - - QTest::newRow("OutSine") << int(QEasingCurve::OutSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 30 << 45 << 58 << 70 << 80 << 89 << 95 << 98 << 100); - - QTest::newRow("InOutSine") << int(QEasingCurve::InOutSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 9 << 20 << 34 << 49 << 65 << 79 << 90 << 97 << 100); - - QTest::newRow("OutInSine") << int(QEasingCurve::OutInSine) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 29 << 40 << 47 << 50 << 52 << 59 << 70 << 84 << 100); - - QTest::newRow("InExpo") << int(QEasingCurve::InExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << 3 << 6 << 12 << 24 << 49 << 100); - - QTest::newRow("OutExpo") << int(QEasingCurve::OutExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 50 << 75 << 87 << 93 << 96 << 98 << 99 << 99 << 99 << 100); - - QTest::newRow("InOutExpo") << int(QEasingCurve::InOutExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 3 << 12 << 50 << 87 << 96 << 99 << 99 << 100); - - QTest::newRow("OutInExpo") << int(QEasingCurve::OutInExpo) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 37 << 46 << 49 << 49 << 50 << 50 << 50 << 53 << 62 << 100); - - QTest::newRow("InCirc") << int(QEasingCurve::InCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 2 << 4 << 8 << 13 << 19 << 28 << 40 << 56 << 100); - - QTest::newRow("OutCirc") << int(QEasingCurve::OutCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 43 << 59 << 71 << 80 << 86 << 91 << 95 << 97 << 99 << 100); - - QTest::newRow("InOutCirc") << int(QEasingCurve::InOutCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 4 << 9 << 20 << 50 << 80 << 89 << 95 << 98 << 100); - - QTest::newRow("OutInCirc") << int(QEasingCurve::OutInCirc) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 29 << 40 << 45 << 48 << 50 << 51 << 54 << 60 << 70 << 100); - - QTest::newRow("InElastic") << int(QEasingCurve::InElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << 0 << 1 << -1 << -3 << 12 << -12 << -25 << 100); - - QTest::newRow("OutElastic") << int(QEasingCurve::OutElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 125 << 112 << 87 << 103 << 101 << 98 << 100 << 100 << 99 << 100); - - QTest::newRow("InOutElastic") << int(QEasingCurve::InOutElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 0 << 0 << -1 << -6 << 50 << 106 << 101 << 99 << 100 << 100); - - QTest::newRow("OutInElastic") << int(QEasingCurve::OutInElastic) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 37 << 56 << 49 << 49 << 50 << 49 << 50 << 53 << 24 << 100); - - QTest::newRow("InBack") << int(QEasingCurve::InBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << -1 << -4 << -8 << -9 << -8 << -2 << 9 << 29 << 59 << 100); - - QTest::newRow("OutBack") << int(QEasingCurve::OutBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 40 << 70 << 90 << 102 << 108 << 109 << 108 << 104 << 101 << 100); - - QTest::newRow("InOutBack") << int(QEasingCurve::InOutBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << -3 << -9 << -7 << 8 << 50 << 91 << 107 << 109 << 103 << 100); - - QTest::newRow("OutInBack") << int(QEasingCurve::OutInBack) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 35 << 51 << 54 << 52 << 50 << 47 << 45 << 48 << 64 << 100); - - QTest::newRow("InBounce") << int(QEasingCurve::InBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 1 << 6 << 6 << 22 << 23 << 9 << 31 << 69 << 92 << 100); - - QTest::newRow("OutBounce") << int(QEasingCurve::OutBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 7 << 30 << 68 << 90 << 76 << 77 << 93 << 94 << 98 << 100); - - QTest::newRow("InOutBounce") << int(QEasingCurve::InOutBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 3 << 11 << 4 << 34 << 50 << 65 << 95 << 88 << 97 << 100); - - QTest::newRow("OutInBounce") << int(QEasingCurve::OutInBounce) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 15 << 40 << 27 << 43 << 50 << 56 << 72 << 58 << 84 << 100); - - QTest::newRow("InCurve") << int(QEasingCurve::InCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 2 << 10 << 23 << 37 << 50 << 60 << 70 << 80 << 90 << 100); - - QTest::newRow("OutCurve") << int(QEasingCurve::OutCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 10 << 20 << 30 << 39 << 50 << 62 << 76 << 89 << 97 << 100); - - QTest::newRow("SineCurve") << int(QEasingCurve::SineCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 0 << 9 << 34 << 65 << 90 << 100 << 90 << 65 << 34 << 9 << 0); - - QTest::newRow("CosineCurve") << int(QEasingCurve::CosineCurve) - << (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100) - << (IntList() << 50 << 79 << 97 << 97 << 79 << 50 << 20 << 2 << 2 << 20 << 49); -*/ } @@ -590,7 +414,11 @@ void tst_QEasingCurve::valueForProgress() // converting ease to 4 precision qreal to match the generated samples qreal easeConv = qreal(QString().setNum(ease, 'g', 4).toDouble()); qreal ex = expected.at(i); - QVERIFY(qFuzzyCompare(easeConv, ex)); + + // the least significant digit it is still subject to rounding errors + qreal error = easeConv - ex; + // accept the potential rounding error in the least significant digit + QVERIFY(error <= 0.00001 ); } #endif } diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 689f73d..16c84d8 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -159,6 +159,7 @@ private slots: void task218353_relativePaths(); void task251321_sideBarHiddenEntries(); void task251341_sideBarRemoveEntries(); + void task254490_selectFileMultipleTimes(); private: QByteArray userSettings; @@ -1981,5 +1982,37 @@ void tst_QFiledialog::task251341_sideBarRemoveEntries() current.rmdir("testDir"); } +void tst_QFiledialog::task254490_selectFileMultipleTimes() +{ + QString tempPath = QDir::tempPath(); + QTemporaryFile *t; + t = new QTemporaryFile; + t->open(); + QNonNativeFileDialog fd(0, "TestFileDialog"); + + fd.setDirectory(tempPath); + fd.setViewMode(QFileDialog::List); + fd.setAcceptMode(QFileDialog::AcceptSave); + fd.setFileMode(QFileDialog::AnyFile); + + //This should select the file in the QFileDialog + fd.selectFile(t->fileName()); + + //This should clear the selection and write it into the filename line edit + fd.selectFile("new_file.txt"); + + fd.show(); + QTest::qWait(250); + + QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QVERIFY(lineEdit); + QCOMPARE(lineEdit->text(),QLatin1String("new_file.txt")); + QListView *list = qFindChild<QListView*>(&fd, "listView"); + QVERIFY(list); + QCOMPARE(list->selectionModel()->selectedRows(0).count(), 0); + + t->deleteLater(); +} + QTEST_MAIN(tst_QFiledialog) #include "tst_qfiledialog.moc" diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index c03c420..8afdeb4 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -230,6 +230,7 @@ private slots: void task240400_clickOnTextItem_data(); void task240400_clickOnTextItem(); void task243707_addChildBeforeParent(); + void task197802_childrenVisibility(); }; void tst_QGraphicsItem::init() @@ -5437,6 +5438,41 @@ void tst_QGraphicsItem::task243707_addChildBeforeParent() QVERIFY(!widget2->commonAncestorItem(widget)); } +void tst_QGraphicsItem::task197802_childrenVisibility() +{ + QGraphicsScene scene; + QGraphicsRectItem item(QRectF(0,0,20,20)); + + QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(0,0,10,10), &item); + scene.addItem(&item); + + //freshly created: both visible + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + + //hide child: parent visible, child not + item2->hide(); + QVERIFY(item.isVisible()); + QVERIFY(!item2->isVisible()); + + //hide parent: parent and child invisible + item.hide(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + + //ask to show the child: parent and child invisible anyways + item2->show(); + QVERIFY(!item.isVisible()); + QVERIFY(!item2->isVisible()); + + //show the parent: both parent and child visible + item.show(); + QVERIFY(item.isVisible()); + QVERIFY(item2->isVisible()); + + delete item2; +} + void tst_QGraphicsItem::boundingRegion_data() { QTest::addColumn<QLineF>("line"); diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp index c6b0560..b7199f3 100644 --- a/tests/auto/qimage/tst_qimage.cpp +++ b/tests/auto/qimage/tst_qimage.cpp @@ -131,6 +131,8 @@ private slots: void nullSize(); void premultipliedAlphaConsistency(); + + void compareIndexed(); }; tst_QImage::tst_QImage() @@ -1762,5 +1764,31 @@ void tst_QImage::premultipliedAlphaConsistency() } } +void tst_QImage::compareIndexed() +{ + QImage img(256, 1, QImage::Format_Indexed8); + + QVector<QRgb> colorTable(256); + for (int i = 0; i < 256; ++i) + colorTable[i] = qRgb(i, i, i); + img.setColorTable(colorTable); + + for (int i = 0; i < 256; ++i) { + img.setPixel(i, 0, i); + } + + QImage imgInverted(256, 1, QImage::Format_Indexed8); + QVector<QRgb> invertedColorTable(256); + for (int i = 0; i < 256; ++i) + invertedColorTable[255-i] = qRgb(i, i, i); + imgInverted.setColorTable(invertedColorTable); + + for (int i = 0; i < 256; ++i) { + imgInverted.setPixel(i, 0, (255-i)); + } + + QCOMPARE(img, imgInverted); +} + QTEST_MAIN(tst_QImage) #include "tst_qimage.moc" diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp index 70f1f3c..1178c81 100644 --- a/tests/auto/qmake/tst_qmake.cpp +++ b/tests/auto/qmake/tst_qmake.cpp @@ -63,6 +63,7 @@ public slots: private slots: void simple_app(); + void simple_app_shadowbuild(); void simple_lib(); void simple_dll(); void subdirs(); @@ -143,6 +144,21 @@ void tst_qmake::simple_app() QVERIFY( test_compiler.removeMakefile( workDir ) ); } +void tst_qmake::simple_app_shadowbuild() +{ + QString workDir = base_path + "/testdata/simple_app"; + QString buildDir = base_path + "/testdata/simple_app_build"; + + QVERIFY( test_compiler.qmake( workDir, "simple_app", buildDir )); + QVERIFY( test_compiler.make( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); + QVERIFY( test_compiler.makeClean( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should still exist after a make clean + QVERIFY( test_compiler.makeDistClean( buildDir )); + QVERIFY( !test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should not exist after a make distclean + QVERIFY( test_compiler.removeMakefile( buildDir ) ); +} + void tst_qmake::simple_dll() { QString workDir = base_path + "/testdata/simple_dll"; diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index fb46073..399d021 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -116,6 +116,7 @@ private slots: void dumpObjectInfo(); void connectToSender(); void qobjectConstCast(); + void uniqConnection(); protected: }; @@ -204,12 +205,20 @@ public: sequence_slot3 = 0; sequence_slot2 = 0; sequence_slot1 = 0; + count_slot1 = 0; + count_slot2 = 0; + count_slot3 = 0; + count_slot4 = 0; } int sequence_slot1; int sequence_slot2; int sequence_slot3; int sequence_slot4; + int count_slot1; + int count_slot2; + int count_slot3; + int count_slot4; bool called(int slot) { switch (slot) { @@ -224,10 +233,10 @@ public: static int sequence; public slots: - void slot1() { sequence_slot1 = ++sequence; } - void slot2() { sequence_slot2 = ++sequence; } - void slot3() { sequence_slot3 = ++sequence; } - void slot4() { sequence_slot4 = ++sequence; } + void slot1() { sequence_slot1 = ++sequence; count_slot1++; } + void slot2() { sequence_slot2 = ++sequence; count_slot2++; } + void slot3() { sequence_slot3 = ++sequence; count_slot3++; } + void slot4() { sequence_slot4 = ++sequence; count_slot4++; } }; @@ -2783,5 +2792,69 @@ void tst_QObject::qobjectConstCast() QVERIFY(qobject_cast<const FooObject *>(cptr)); } +void tst_QObject::uniqConnection() +{ + SenderObject *s = new SenderObject; + ReceiverObject *r1 = new ReceiverObject; + ReceiverObject *r2 = new ReceiverObject; + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot1() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot1() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal3() ), r1, SLOT( slot3() ) , Qt::UniqueConnection) ); + + s->emitSignal1(); + s->emitSignal2(); + s->emitSignal3(); + s->emitSignal4(); + + QCOMPARE( r1->count_slot1, 1 ); + QCOMPARE( r1->count_slot2, 0 ); + QCOMPARE( r1->count_slot3, 2 ); + QCOMPARE( r1->count_slot4, 0 ); + QCOMPARE( r2->count_slot1, 1 ); + QCOMPARE( r2->count_slot2, 0 ); + QCOMPARE( r2->count_slot3, 0 ); + QCOMPARE( r2->count_slot4, 0 ); + QCOMPARE( r1->sequence_slot1, 1 ); + QCOMPARE( r2->sequence_slot1, 2 ); + QCOMPARE( r1->sequence_slot3, 4 ); + + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + QVERIFY( connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL( signal4() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY( connect( s, SIGNAL( signal1() ), r2, SLOT( slot4() ) , Qt::UniqueConnection) ); + QVERIFY(!connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) , Qt::UniqueConnection) ); + + s->emitSignal4(); + QCOMPARE( r1->count_slot4, 1 ); + QCOMPARE( r2->count_slot4, 1 ); + QCOMPARE( r1->sequence_slot4, 1 ); + QCOMPARE( r2->sequence_slot4, 2 ); + + r1->reset(); + r2->reset(); + ReceiverObject::sequence = 0; + + connect( s, SIGNAL( signal4() ), r1, SLOT( slot4() ) ); + + s->emitSignal4(); + QCOMPARE( r1->count_slot4, 2 ); + QCOMPARE( r2->count_slot4, 1 ); + QCOMPARE( r1->sequence_slot4, 3 ); + QCOMPARE( r2->sequence_slot4, 2 ); + + delete s; + delete r1; + delete r2; +} + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" diff --git a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp index 405ac34..fb5998a 100644 --- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp +++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp @@ -369,6 +369,14 @@ void tst_QPixmapCache::remove() key = QPixmapCache::insert(p1); QCOMPARE(getPrivate(key)->key, 1); + //Test if pixmaps are correctly deleted + QPixmapCache::clear(); + key = QPixmapCache::insert(p1); + QCOMPARE(getPrivate(key)->key, 1); + QVERIFY(QPixmapCache::find(key, &p1) != 0); + QPixmapCache::remove(key); + QCOMPARE(p1.isDetached(), true); + //We mix both part of the API QPixmapCache::clear(); p1.fill(Qt::red); diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 7e910d4..0aeac91 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -63,6 +63,18 @@ protected: } }; +class MyObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x WRITE setX) +public: + MyObject() : m_x(0) { } + qreal x() const { return m_x; } + void setX(qreal x) { m_x = x; } +private: + qreal m_x; +}; + class tst_QPropertyAnimation : public QObject { Q_OBJECT @@ -92,6 +104,7 @@ private slots: void startWithoutStartValue(); void playForwardBackward(); void interpolated(); + void setStartEndValues_data(); void setStartEndValues(); void zeroDurationStart(); void operationsInStates_data(); @@ -283,7 +296,7 @@ void tst_QPropertyAnimation::statesAndSignals() void tst_QPropertyAnimation::deletion1() { QObject *object = new QWidget; - QPointer<QPropertyAnimation> anim = new QPropertyAnimation(object,"minimumWidth"); + QPointer<QPropertyAnimation> anim = new QPropertyAnimation(object, "minimumWidth"); //test that the animation is deleted correctly depending of the deletion flag passed in start() QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); @@ -686,52 +699,78 @@ void tst_QPropertyAnimation::interpolated() } } +Q_DECLARE_METATYPE(QVariant) + +void tst_QPropertyAnimation::setStartEndValues_data() +{ + QTest::addColumn<QByteArray>("propertyName"); + QTest::addColumn<QVariant>("initialValue"); + QTest::addColumn<QVariant>("startValue"); + QTest::addColumn<QVariant>("endValue"); + + QTest::newRow("dynamic property") << QByteArray("ole") << QVariant(42) << QVariant(0) << QVariant(10); + QTest::newRow("real property, with unmatching types") << QByteArray("x") << QVariant(42.) << QVariant(0) << QVariant(10.); +} + void tst_QPropertyAnimation::setStartEndValues() { + MyObject object; + QFETCH(QByteArray, propertyName); + QFETCH(QVariant, initialValue); + QFETCH(QVariant, startValue); + QFETCH(QVariant, endValue); + //this tests the start value, end value and default start value - QObject o; - o.setProperty("ole", 42); - QPropertyAnimation anim(&o, "ole"); + object.setProperty(propertyName, initialValue); + QPropertyAnimation anim(&object, propertyName); QVariantAnimation::KeyValues values; QCOMPARE(anim.keyValues(), values); //let's add a start value - anim.setStartValue(0); - values << QVariantAnimation::KeyValue(0, 0); + anim.setStartValue(startValue); + values << QVariantAnimation::KeyValue(0, startValue); QCOMPARE(anim.keyValues(), values); - anim.setEndValue(10); - values << QVariantAnimation::KeyValue(1, 10); + anim.setEndValue(endValue); + values << QVariantAnimation::KeyValue(1, endValue); QCOMPARE(anim.keyValues(), values); //now we can play with objects - QCOMPARE(o.property("ole").toInt(), 42); - QCOMPARE(o.property("ole").toInt(), 42); + QCOMPARE(object.property(propertyName).toDouble(), initialValue.toDouble()); anim.start(); QVERIFY(anim.startValue().isValid()); - QCOMPARE(o.property("ole"), anim.startValue()); + QCOMPARE(object.property(propertyName), anim.startValue()); + anim.setCurrentTime(anim.duration()/2); + QCOMPARE(object.property(propertyName).toDouble(), (startValue.toDouble() + endValue.toDouble())/2 ); //just in the middle of the animation + anim.setCurrentTime(anim.duration()); //we go to the end of the animation + QCOMPARE(anim.state(), QAnimationGroup::Stopped); //it should have stopped + QVERIFY(anim.endValue().isValid()); + QCOMPARE(object.property(propertyName), anim.endValue()); //end of the animations //now we remove the explicit start value and test the implicit one anim.stop(); - o.setProperty("ole", 42); + object.setProperty(propertyName, initialValue); + + //let's reset the start value values.remove(0); - anim.setStartValue(QVariant()); //reset the start value + anim.setStartValue(QVariant()); QCOMPARE(anim.keyValues(), values); QVERIFY(!anim.startValue().isValid()); + anim.start(); - QCOMPARE(o.property("ole").toInt(), 42); + QCOMPARE(object.property(propertyName), initialValue); anim.setCurrentTime(anim.duration()/2); - QCOMPARE(o.property("ole").toInt(), 26); //just in the middle of the animation - anim.setCurrentTime(anim.duration()); + QCOMPARE(object.property(propertyName).toDouble(), (initialValue.toDouble() + endValue.toDouble())/2 ); //just in the middle of the animation + anim.setCurrentTime(anim.duration()); //we go to the end of the animation QCOMPARE(anim.state(), QAnimationGroup::Stopped); //it should have stopped QVERIFY(anim.endValue().isValid()); - QCOMPARE(o.property("ole"), anim.endValue()); //end of the animations + QCOMPARE(object.property(propertyName), anim.endValue()); //end of the animations //now we set back the startValue - anim.setStartValue(5); + anim.setStartValue(startValue); QVERIFY(anim.startValue().isValid()); anim.start(); - QCOMPARE(o.property("ole").toInt(), 5); + QCOMPARE(object.property(propertyName), startValue); } void tst_QPropertyAnimation::zeroDurationStart() diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index f414d3a..d7c231f 100644 --- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -2585,6 +2585,16 @@ void tst_QSortFilterProxyModel::task248868_dynamicSorting() QModelIndex index = proxy1.index(row, 0, QModelIndex()); QCOMPARE(proxy1.data(index, Qt::DisplayRole).toString(), expected.at(row)); } + + //set up the sorting before seting the model up + QSortFilterProxyModel proxy2; + proxy2.setDynamicSortFilter(true); + proxy2.sort(0); + proxy2.setSourceModel(&model2); + for (int row = 0; row < proxy2.rowCount(QModelIndex()); ++row) { + QModelIndex index = proxy2.index(row, 0, QModelIndex()); + QCOMPARE(proxy2.data(index, Qt::DisplayRole).toString(), expected.at(row)); + } } class QtTestModel: public QAbstractItemModel diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index c4517d6..2ef76a4 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -227,6 +227,7 @@ private slots: void task246536_scrollbarsNotWorking(); void task250683_wrongSectionSize(); void task239271_addRowsWithFirstColumnHidden(); + void task254234_proxySort(); }; class QtTestModel: public QAbstractItemModel @@ -2498,7 +2499,6 @@ void tst_QTreeView::sortByColumn() QCOMPARE(view.header()->sortIndicatorSection(), 0); QCOMPARE(view.model()->data(view.model()->index(0,0)).toString(), QString::fromLatin1("a")); QCOMPARE(view.model()->data(view.model()->index(1,0)).toString(), QString::fromLatin1("b")); - } /* @@ -3346,7 +3346,6 @@ void tst_QTreeView::task246536_scrollbarsNotWorking() QVERIFY(o.count > 0); } - void tst_QTreeView::task250683_wrongSectionSize() { QDirModel model; @@ -3400,5 +3399,32 @@ void tst_QTreeView::task239271_addRowsWithFirstColumnHidden() QVERIFY(delegate.paintedIndexes.contains(sub11.index())); } +void tst_QTreeView::task254234_proxySort() +{ + //based on tst_QTreeView::sortByColumn + // it used not to work when setting the source of a proxy after enabling sorting + QTreeView view; + QStandardItemModel model(4,2); + model.setItem(0,0,new QStandardItem("b")); + model.setItem(1,0,new QStandardItem("d")); + model.setItem(2,0,new QStandardItem("c")); + model.setItem(3,0,new QStandardItem("a")); + model.setItem(0,1,new QStandardItem("e")); + model.setItem(1,1,new QStandardItem("g")); + model.setItem(2,1,new QStandardItem("h")); + model.setItem(3,1,new QStandardItem("f")); + + view.sortByColumn(1); + view.setSortingEnabled(true); + + QSortFilterProxyModel proxy; + proxy.setDynamicSortFilter(true); + view.setModel(&proxy); + proxy.setSourceModel(&model); + QCOMPARE(view.header()->sortIndicatorSection(), 1); + QCOMPARE(view.model()->data(view.model()->index(0,1)).toString(), QString::fromLatin1("h")); + QCOMPARE(view.model()->data(view.model()->index(1,1)).toString(), QString::fromLatin1("g")); +} + QTEST_MAIN(tst_QTreeView) #include "tst_qtreeview.moc" diff --git a/tests/benchmarks/qgraphicsview/images/wine-big.jpeg b/tests/benchmarks/qgraphicsview/images/wine-big.jpeg Binary files differnew file mode 100644 index 0000000..9900a50 --- /dev/null +++ b/tests/benchmarks/qgraphicsview/images/wine-big.jpeg diff --git a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc b/tests/benchmarks/qgraphicsview/qgraphicsview.qrc index 5e80029..3681648 100644 --- a/tests/benchmarks/qgraphicsview/qgraphicsview.qrc +++ b/tests/benchmarks/qgraphicsview/qgraphicsview.qrc @@ -2,6 +2,7 @@ <qresource> <file>images/designer.png</file> <file>images/wine.jpeg</file> + <file>images/wine-big.jpeg</file> <file>random.data</file> </qresource> </RCC> diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp index a06e033..570f744 100644 --- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp @@ -124,6 +124,8 @@ private slots: void textRiver(); void moveItemCache_data(); void moveItemCache(); + void paintItemCache_data(); + void paintItemCache(); }; tst_QGraphicsView::tst_QGraphicsView() @@ -796,5 +798,105 @@ void tst_QGraphicsView::moveItemCache() } } +class UpdatedPixmapCacheItem : public QGraphicsPixmapItem +{ +public: + UpdatedPixmapCacheItem(bool partial, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(parent), partial(partial) + { + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + { + QGraphicsPixmapItem::paint(painter,option,widget); + } +protected: + void advance(int i) + { + if (partial) + update(QRectF(boundingRect().center().x(), boundingRect().center().x(), 30, 30)); + else + update(); + } + +private: + bool partial; +}; + +void tst_QGraphicsView::paintItemCache_data() +{ + QTest::addColumn<bool>("updatePartial"); + QTest::addColumn<bool>("rotation"); + QTest::addColumn<int>("cacheMode"); + QTest::newRow("Partial Update : ItemCoordinate Cache") << true << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache") << true << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache") << true << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache") << false << false << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache") << false << false << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache") << false << false << (int)QGraphicsItem::NoCache; + QTest::newRow("Partial Update : ItemCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Partial Update : DeviceCoordinate Cache item rotated") << true << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Partial Update : No Cache item rotated") << true << true << (int)QGraphicsItem::NoCache; + QTest::newRow("Full Update : ItemCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::ItemCoordinateCache; + QTest::newRow("Full Update : DeviceCoordinate Cache item rotated") << false << true << (int)QGraphicsItem::DeviceCoordinateCache; + QTest::newRow("Full Update : No Cache item rotated") << false << true <<(int)QGraphicsItem::NoCache; +} + +void tst_QGraphicsView::paintItemCache() +{ + QFETCH(bool, updatePartial); + QFETCH(bool, rotation); + QFETCH(int, cacheMode); + + QGraphicsScene scene(0, 0, 300, 300); + + CountPaintEventView view(&scene); + view.resize(600, 600); + view.setFrameStyle(0); + view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view.show(); + + QPixmap pix(":/images/wine.jpeg"); + QVERIFY(!pix.isNull()); + + QList<QGraphicsItem *> items; + QFile file(":/random.data"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QDataStream str(&file); + UpdatedPixmapCacheItem *item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(-100, -100); + scene.addItem(item); + + QPixmap pix2(":/images/wine-big.jpeg"); + item = new UpdatedPixmapCacheItem(updatePartial); + item->setPixmap(pix2); + item->setCacheMode((QGraphicsItem::CacheMode)cacheMode); + if (rotation) + item->setTransform(QTransform().rotate(45)); + item->setPos(0, 0); + scene.addItem(item); + + view.count = 0; + + QBENCHMARK { +#ifdef CALLGRIND_DEBUG + CALLGRIND_START_INSTRUMENTATION +#endif + for (int i = 0; i < 50; ++i) { + scene.advance(); + while (view.count < (i+1)) + qApp->processEvents(); + } +#ifdef CALLGRIND_DEBUG + CALLGRIND_STOP_INSTRUMENTATION +#endif + } +} + QTEST_MAIN(tst_QGraphicsView) #include "tst_qgraphicsview.moc" diff --git a/tests/benchmarks/qstringbuilder/main.cpp b/tests/benchmarks/qstringbuilder/main.cpp new file mode 100644 index 0000000..8eb4e78 --- /dev/null +++ b/tests/benchmarks/qstringbuilder/main.cpp @@ -0,0 +1,304 @@ + +#include "qstringbuilder.h" + +#include <QDebug> +#include <QString> + +#include <qtest.h> + + +#define COMPARE(a, b) QCOMPARE(a, b) +//#define COMPARE(a, b) + +#define SEP(s) qDebug() << "\n\n-------- " s " ---------"; +#define L(s) QLatin1String(s) + +class tst_qstringbuilder : public QObject +{ + Q_OBJECT + +public: + tst_qstringbuilder() + : l1literal("some string literal"), + l1string("some string literal"), + ba("some string literal"), + string(l1string), + stringref(&string, 2, 10), + achar('c') + {} + + +public: + enum { N = 10000 }; + + int run_traditional() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1string + l1string).size(); + s += QString(l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string).size(); + s += QString(l1string + l1string + l1string + l1string + l1string).size(); +#endif + s += QString(achar + l1string + achar).size(); + } + return s; + } + + int run_builder() + { + int s = 0; + for (int i = 0; i < N; ++i) { +#if 0 + s += QString(l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal % l1literal).size(); + s += QString(l1literal % l1literal % l1literal % l1literal % l1literal).size(); +#endif + s += QString(achar % l1literal % achar).size(); + } + return s; + } + +private slots: + + void separator_0() { + qDebug() << "\nIn each block the QStringBuilder based result appear first, " + "QStringBased second.\n"; + } + + void separator_1() { SEP("literal + literal (builder first)"); } + + void b_2_l1literal() { + QBENCHMARK { r = l1literal % l1literal; } + COMPARE(r, QString(l1string + l1string)); + } + void s_2_l1string() { + QBENCHMARK { r = l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal)); + } + + + void separator_2() { SEP("2 strings"); } + + void b_2_string() { + QBENCHMARK { r = string % string; } + COMPARE(r, QString(string + string)); + } + void s_2_string() { + QBENCHMARK { r = string + string; } + COMPARE(r, QString(string % string)); + } + + + void separator_2c() { SEP("2 string refs"); } + + void b_2_stringref() { + QBENCHMARK { r = stringref % stringref; } + COMPARE(r, QString(stringref.toString() + stringref.toString())); + } + void s_2_stringref() { + QBENCHMARK { r = stringref.toString() + stringref.toString(); } + COMPARE(r, QString(stringref % stringref)); + } + + + void separator_2b() { SEP("3 strings"); } + + void b_3_string() { + QBENCHMARK { r = string % string % string; } + COMPARE(r, QString(string + string + string)); + } + void s_3_string() { + QBENCHMARK { r = string + string + string; } + COMPARE(r, QString(string % string % string)); + } + + + void separator_2a() { SEP("string + literal (builder first)"); } + + void b_string_l1literal() { + QBENCHMARK { r = string % l1literal; } + COMPARE(r, QString(string + l1string)); + } + void b_string_l1string() { + QBENCHMARK { r = string % l1string; } + COMPARE(r, QString(string + l1string)); + } + void s_string_l1literal() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, QString(string % l1literal)); + } + void s_string_l1string() { + QBENCHMARK { r = string + l1string; } + COMPARE(r, QString(string % l1literal)); + } + + + void separator_3() { SEP("3 literals"); } + + void b_3_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal; } + COMPARE(r, QString(l1string + l1string + l1string)); + } + void s_3_l1string() { + QBENCHMARK { r = l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal)); + } + + + void separator_4() { SEP("4 literals"); } + + void b_4_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal; } + COMPARE(r, QString(l1string + l1string + l1string + l1string)); + } + void s_4_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal % l1literal)); + } + + + void separator_5() { SEP("5 literals"); } + + void b_5_l1literal() { + QBENCHMARK { r = l1literal % l1literal % l1literal % l1literal %l1literal; } + COMPARE(r, QString(l1string + l1string + l1string + l1string + l1string)); + } + + void s_5_l1string() { + QBENCHMARK { r = l1string + l1string + l1string + l1string + l1string; } + COMPARE(r, QString(l1literal % l1literal % l1literal % l1literal % l1literal)); + } + + + void separator_6() { SEP("4 chars"); } + + void b_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string % achar % achar % achar % achar)); + } + + void s_string_4_char() { + QBENCHMARK { r = string + achar + achar + achar + achar; } + COMPARE(r, QString(string % achar % achar % achar % achar)); + } + + + void separator_7() { SEP("char + string + char"); } + + void b_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar % string % achar)); + } + + void s_char_string_char() { + QBENCHMARK { r = achar + string + achar; } + COMPARE(r, QString(achar % string % achar)); + } + + void separator_8() { SEP("string.arg"); } + + void b_string_arg() { + const QString pattern = l1string + QLatin1String("%1") + l1string; + QBENCHMARK { r = l1literal % string % l1literal; } + COMPARE(r, QString(l1string + string + l1string)); + } + + void s_string_arg() { + const QString pattern = l1string + QLatin1String("%1") + l1string; + QBENCHMARK { r = pattern.arg(string); } + COMPARE(r, QString(l1string + string + l1string)); + } + + void s_bytearray_arg() { + QByteArray result; + QBENCHMARK { result = ba + ba + ba; } + } + + + void separator_9() { SEP("QString::reserve()"); } + + void b_reserve() { + QBENCHMARK { + r.clear(); + r = string % string % string % string; + } + COMPARE(r, QString(string + string + string + string)); + } + void b_reserve_lit() { + QBENCHMARK { + r.clear(); + r = string % l1literal % string % string; + } + COMPARE(r, QString(string + string + string + string)); + } + void s_reserve() { + QBENCHMARK { + r.clear(); + r.reserve(string.size() + string.size() + string.size() + string.size()); + r += string; + r += string; + r += string; + r += string; + } + COMPARE(r, QString(string + string + string + string)); + } + void s_reserve_lit() { + QBENCHMARK { + r.clear(); + //r.reserve(string.size() + qstrlen(l1string.latin1()) + // + string.size() + string.size()); + r.reserve(1024); + r += string; + r += l1string; + r += string; + r += string; + } + COMPARE(r, QString(string + string + string + string)); + } + +private: + const QLatin1Literal l1literal; + const QLatin1String l1string; + const QByteArray ba; + const QString string; + const QStringRef stringref; + const QLatin1Char achar; + + QString r; +}; + + +//void operator%(QString, int) {} + +int main(int argc, char *argv[]) +{ + //qDebug() << (QString("xx") * QLatin1String("y")).toString(); + //42 % 3; // Sanity test, should always work. + //QString("x") % 2; // Sanity test, should only compile when the + // operator%(QString, int) is visible. + + if (argc == 2 && (argv[1] == L("--run-builder") || argv[1] == L("-b"))) { + tst_qstringbuilder test; + return test.run_builder(); + } + + if (argc == 2 && (argv[1] == L("--run-traditional") || argv[1] == L("-t"))) { + tst_qstringbuilder test; + return test.run_traditional(); + } + + if (argc == 1) { + QCoreApplication app(argc, argv); + QStringList args = app.arguments(); + tst_qstringbuilder test; + return QTest::qExec(&test, argc, argv); + } + + qDebug() << "Usage: " << argv[0] << " [--run-builder|-r|--run-traditional|-t]"; +} + + +#include "main.moc" diff --git a/tests/benchmarks/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/qstringbuilder/qstringbuilder.pro new file mode 100644 index 0000000..02daaaa --- /dev/null +++ b/tests/benchmarks/qstringbuilder/qstringbuilder.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qstringbuilder + +# Uncomment to test compilation of the drop-in +# replacement operator+() +#DEFINES += QT_USE_FAST_OPERATOR_PLUS + +QMAKE_CXXFLAGS += -g +QMAKE_CFLAGS += -g + +QT -= gui + +CONFIG += release + +SOURCES += main.cpp diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index b78f346..52d48d5 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -87,6 +87,7 @@ namespace { FindWidget::FindWidget(QWidget *parent) : QWidget(parent) + , appPalette(qApp->palette()) { QHBoxLayout *hboxLayout = new QHBoxLayout(this); QString resourcePath = QLatin1String(":/trolltech/assistant/images/"); @@ -148,6 +149,34 @@ FindWidget::~FindWidget() { } +void FindWidget::hideEvent(QHideEvent* event) +{ +#if !defined(QT_NO_WEBKIT) + // TODO: remove this once webkit supports setting the palette + if (!event->spontaneous()) + qApp->setPalette(appPalette); +#else + Q_UNUSED(event); +#endif +} + +void FindWidget::showEvent(QShowEvent* event) +{ +#if !defined(QT_NO_WEBKIT) + // TODO: remove this once webkit supports setting the palette + if (!event->spontaneous()) { + QPalette p = appPalette; + p.setColor(QPalette::Inactive, QPalette::Highlight, + p.color(QPalette::Active, QPalette::Highlight)); + p.setColor(QPalette::Inactive, QPalette::HighlightedText, + p.color(QPalette::Active, QPalette::HighlightedText)); + qApp->setPalette(p); + } +#else + Q_UNUSED(event); +#endif +} + void FindWidget::updateButtons() { if (editFind->text().isEmpty()) { @@ -245,12 +274,14 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent) SLOT(showTabBarContextMenu(QPoint))); } - QPalette p = qApp->palette(); +#if defined(QT_NO_WEBKIT) + QPalette p = palette(); p.setColor(QPalette::Inactive, QPalette::Highlight, p.color(QPalette::Active, QPalette::Highlight)); p.setColor(QPalette::Inactive, QPalette::HighlightedText, p.color(QPalette::Active, QPalette::HighlightedText)); - qApp->setPalette(p); + setPalette(p); +#endif } CentralWidget::~CentralWidget() @@ -848,60 +879,64 @@ void CentralWidget::keyPressEvent(QKeyEvent *e) QWidget::keyPressEvent(e); } -void CentralWidget::find(QString ttf, bool forward, bool backward) +void CentralWidget::find(const QString &ttf, bool forward, bool backward) { - QTextCursor cursor; - QTextDocument *doc = 0; - QTextBrowser *browser = 0; - - HelpViewer *viewer = currentHelpViewer(); QPalette p = findWidget->editFind->palette(); p.setColor(QPalette::Active, QPalette::Base, Qt::white); -#if !defined(QT_NO_WEBKIT) - Q_UNUSED(forward) - Q_UNUSED(doc) - Q_UNUSED(browser) - - if (viewer) { - QWebPage::FindFlags options; - if (backward) - options |= QWebPage::FindBackward; + if (!ttf.isEmpty()) { + HelpViewer *viewer = currentHelpViewer(); - if (findWidget->checkCase->isChecked()) - options |= QWebPage::FindCaseSensitively; + bool found = false; +#if !defined(QT_NO_WEBKIT) + if (viewer) { + QWebPage::FindFlags options; + if (backward) + options |= QWebPage::FindBackward; - bool found = viewer->findText(ttf, options); - findWidget->labelWrapped->hide(); + if (findWidget->checkCase->isChecked()) + options |= QWebPage::FindCaseSensitively; - if (!found) { - options |= QWebPage::FindWrapsAroundDocument; found = viewer->findText(ttf, options); + findWidget->labelWrapped->hide(); if (!found) { - p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); - } else { - findWidget->labelWrapped->show(); + options |= QWebPage::FindWrapsAroundDocument; + found = viewer->findText(ttf, options); + if (found) + findWidget->labelWrapped->show(); } + } else if (tabWidget->currentWidget() == m_searchWidget) { + QTextBrowser *browser = qFindChild<QTextBrowser*>(m_searchWidget); + found = findInTextBrowser(browser, ttf, forward, backward); } - } #else - if (viewer) { - doc = viewer->document(); - cursor = viewer->textCursor(); - browser = qobject_cast<QTextBrowser*>(viewer); - } + QTextBrowser *browser = qobject_cast<QTextBrowser*>(viewer); + if (tabWidget->currentWidget() == m_searchWidget) + browser = qFindChild<QTextBrowser*>(m_searchWidget); + found = findInTextBrowser(browser, ttf, forward, backward); +#endif - if (tabWidget->currentWidget() == m_searchWidget) { - QTextBrowser *browser = qFindChild<QTextBrowser*>(m_searchWidget); - if (browser) { - doc = browser->document(); - cursor = browser->textCursor(); - } + if (!found) + p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); } - if (!browser || !doc || cursor.isNull()) - return; + if (!findWidget->isVisible()) + findWidget->show(); + findWidget->editFind->setPalette(p); +} + +bool CentralWidget::findInTextBrowser(QTextBrowser* browser, const QString &ttf, + bool forward, bool backward) +{ + if (!browser) + return false; + + QTextDocument *doc = browser->document(); + QTextCursor cursor = browser->textCursor(); + + if (!doc || cursor.isNull()) + return false; QTextDocument::FindFlags options; @@ -910,44 +945,33 @@ void CentralWidget::find(QString ttf, bool forward, bool backward) QTextCursor::MoveAnchor); } - QTextCursor newCursor = cursor; + if (backward) + options |= QTextDocument::FindBackward; - if (!ttf.isEmpty()) { - if (backward) - options |= QTextDocument::FindBackward; - - if (findWidget->checkCase->isChecked()) - options |= QTextDocument::FindCaseSensitively; + if (findWidget->checkCase->isChecked()) + options |= QTextDocument::FindCaseSensitively; - if (findWidget->checkWholeWords->isChecked()) - options |= QTextDocument::FindWholeWords; + if (findWidget->checkWholeWords->isChecked()) + options |= QTextDocument::FindWholeWords; - newCursor = doc->find(ttf, cursor, options); - findWidget->labelWrapped->hide(); + findWidget->labelWrapped->hide(); + bool found = true; + QTextCursor newCursor = doc->find(ttf, cursor, options); + if (newCursor.isNull()) { + QTextCursor ac(doc); + ac.movePosition(options & QTextDocument::FindBackward + ? QTextCursor::End : QTextCursor::Start); + newCursor = doc->find(ttf, ac, options); if (newCursor.isNull()) { - QTextCursor ac(doc); - ac.movePosition(options & QTextDocument::FindBackward - ? QTextCursor::End : QTextCursor::Start); - newCursor = doc->find(ttf, ac, options); - if (newCursor.isNull()) { - p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102)); - newCursor = cursor; - } else { - findWidget->labelWrapped->show(); - } + found = false; + newCursor = cursor; + } else { + findWidget->labelWrapped->show(); } } -#endif - - if (!findWidget->isVisible()) - findWidget->show(); - -#if defined(QT_NO_WEBKIT) - if (browser) - browser->setTextCursor(newCursor); -#endif - findWidget->editFind->setPalette(p); + browser->setTextCursor(newCursor); + return found; } void CentralWidget::updateBrowserFont() diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h index e3ce200..d59dbe5 100644 --- a/tools/assistant/tools/assistant/centralwidget.h +++ b/tools/assistant/tools/assistant/centralwidget.h @@ -55,6 +55,7 @@ class QLabel; class QAction; class QCheckBox; class QLineEdit; +class QTextBrowser; class QToolButton; class HelpViewer; @@ -79,6 +80,10 @@ signals: void findNext(); void findPrevious(); +protected: + void hideEvent(QHideEvent* event); + void showEvent(QShowEvent * event); + private slots: void updateButtons(); @@ -94,6 +99,7 @@ private: QToolButton *toolPrevious; QCheckBox *checkWholeWords; + QPalette appPalette; friend class CentralWidget; }; @@ -176,7 +182,9 @@ private slots: private: void connectSignals(); bool eventFilter(QObject *object, QEvent *e); - void find(QString ttf, bool forward, bool backward); + void find(const QString &ttf, bool forward, bool backward); + bool findInTextBrowser(QTextBrowser* browser, const QString &ttf, + bool forward, bool backward); void initPrinter(); QString quoteTabTitle(const QString &title) const; void highlightSearchTerms(); diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 75955ec..f63cc65 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -230,7 +230,7 @@ int main(int argc, char *argv[]) if (file.isEmpty()) file = MainWindow::defaultHelpCollectionFileName(); QString path = QFileInfo(file).path(); - path += QLatin1String("/") + indexFilesFolder(file); + path += QLatin1Char('/') + indexFilesFolder(file); QLocalSocket localSocket; localSocket.connectToServer(QString(QLatin1String("QtAssistant%1")) diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro index efad6bf..e6208a6 100644 --- a/tools/assistant/translations/qt_help.pro +++ b/tools/assistant/translations/qt_help.pro @@ -44,5 +44,6 @@ TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qt_help_de.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_pl.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_untranslated.ts \ $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_CN.ts \ - $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts + $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts \ + $$[QT_INSTALL_TRANSLATIONS]/qt_help_da.ts error("This is a dummy profile to be used for translations ONLY.") diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro index 58de554..8572123 100644 --- a/tools/assistant/translations/translations.pro +++ b/tools/assistant/translations/translations.pro @@ -45,4 +45,5 @@ TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_de.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_pl.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_untranslated.ts \ $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_CN.ts \ - $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts + $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts \ + $$[QT_INSTALL_TRANSLATIONS]/assistant_da.ts diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8fd8c0a..2b25529 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1320,6 +1320,7 @@ void Configure::applySpecSpecifics() dictionary[ "WEBKIT" ] = "no"; dictionary[ "PHONON" ] = "yes"; dictionary[ "DIRECTSHOW" ] = "no"; + dictionary[ "LTCG" ] = "yes"; // We only apply MMX/IWMMXT for mkspecs we know they work if (dictionary[ "XQMAKESPEC" ].startsWith("wincewm")) { dictionary[ "MMX" ] = "yes"; diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp index 07d785a..66bab9b 100644 --- a/tools/designer/src/components/formeditor/formwindow.cpp +++ b/tools/designer/src/components/formeditor/formwindow.cpp @@ -2136,7 +2136,10 @@ void FormWindow::layoutContainer(QWidget *w, int type) bool FormWindow::hasInsertedChildren(QWidget *widget) const // ### move { if (QDesignerContainerExtension *container = qt_extension<QDesignerContainerExtension*>(core()->extensionManager(), widget)) { - widget = container->widget(container->currentIndex()); + const int index = container->currentIndex(); + if (index < 0) + return false; + widget = container->widget(index); } const QWidgetList l = widgets(widget); diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp index 5f53ae2..f94fb5c 100644 --- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp +++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp @@ -159,6 +159,7 @@ private: QDesignerFormEditorInterface *m_core; DesignerPixmapCache *m_pixmapCache; DesignerIconCache *m_iconCache; + const QDesignerLanguageExtension *m_lang; bool m_saveRelative; mutable QMap<QString, bool> m_usedQrcFiles; mutable QMap<QString, bool> m_loadedQrcFiles; @@ -168,13 +169,18 @@ QDesignerResourceBuilder::QDesignerResourceBuilder(QDesignerFormEditorInterface m_core(core), m_pixmapCache(pixmapCache), m_iconCache(iconCache), + m_lang(qt_extension<QDesignerLanguageExtension *>(core->extensionManager(), core)), m_saveRelative(true) { } -static inline void setIconPixmap(QIcon::Mode m, QIcon::State s, const QDir &workingDirectory, const QString &v, PropertySheetIconValue &icon) +static inline void setIconPixmap(QIcon::Mode m, QIcon::State s, const QDir &workingDirectory, + QString path, PropertySheetIconValue &icon, + const QDesignerLanguageExtension *lang = 0) { - icon.setPixmap(m, s, PropertySheetPixmapValue(QFileInfo(workingDirectory, v).absoluteFilePath())); + if (lang == 0 || !lang->isLanguageResource(path)) + path = QFileInfo(workingDirectory, path).absoluteFilePath(); + icon.setPixmap(m, s, PropertySheetPixmapValue(path)); } QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, const DomProperty *property) const @@ -184,7 +190,11 @@ QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, co PropertySheetPixmapValue pixmap; DomResourcePixmap *dp = property->elementPixmap(); if (!dp->text().isEmpty()) { - pixmap.setPath(QFileInfo(workingDirectory, dp->text()).absoluteFilePath()); + if (m_lang != 0 && m_lang->isLanguageResource(dp->text())) { + pixmap.setPath(dp->text()); + } else { + pixmap.setPath(QFileInfo(workingDirectory, dp->text()).absoluteFilePath()); + } #ifdef OLD_RESOURCE_FORMAT if (dp->hasAttributeResource()) m_loadedQrcFiles.insert(QFileInfo(workingDirectory, dp->attributeResource()).absoluteFilePath(), false); @@ -198,24 +208,24 @@ QVariant QDesignerResourceBuilder::loadResource(const QDir &workingDirectory, co DomResourceIcon *di = property->elementIconSet(); if (const int flags = iconStateFlags(di)) { // new, post 4.4 format if (flags & NormalOff) - setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->elementNormalOff()->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->elementNormalOff()->text(), icon, m_lang); if (flags & NormalOn) - setIconPixmap(QIcon::Normal, QIcon::On, workingDirectory, di->elementNormalOn()->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::On, workingDirectory, di->elementNormalOn()->text(), icon, m_lang); if (flags & DisabledOff) - setIconPixmap(QIcon::Disabled, QIcon::Off, workingDirectory, di->elementDisabledOff()->text(), icon); + setIconPixmap(QIcon::Disabled, QIcon::Off, workingDirectory, di->elementDisabledOff()->text(), icon, m_lang); if (flags & DisabledOn) - setIconPixmap(QIcon::Disabled, QIcon::On, workingDirectory, di->elementDisabledOn()->text(), icon); + setIconPixmap(QIcon::Disabled, QIcon::On, workingDirectory, di->elementDisabledOn()->text(), icon, m_lang); if (flags & ActiveOff) - setIconPixmap(QIcon::Active, QIcon::Off, workingDirectory, di->elementActiveOff()->text(), icon); + setIconPixmap(QIcon::Active, QIcon::Off, workingDirectory, di->elementActiveOff()->text(), icon, m_lang); if (flags & ActiveOn) - setIconPixmap(QIcon::Active, QIcon::On, workingDirectory, di->elementActiveOn()->text(), icon); + setIconPixmap(QIcon::Active, QIcon::On, workingDirectory, di->elementActiveOn()->text(), icon, m_lang); if (flags & SelectedOff) - setIconPixmap(QIcon::Selected, QIcon::Off, workingDirectory, di->elementSelectedOff()->text(), icon); + setIconPixmap(QIcon::Selected, QIcon::Off, workingDirectory, di->elementSelectedOff()->text(), icon, m_lang); if (flags & SelectedOn) - setIconPixmap(QIcon::Selected, QIcon::On, workingDirectory, di->elementSelectedOn()->text(), icon); + setIconPixmap(QIcon::Selected, QIcon::On, workingDirectory, di->elementSelectedOn()->text(), icon, m_lang); } else { #ifdef OLD_RESOURCE_FORMAT - setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->text(), icon); + setIconPixmap(QIcon::Normal, QIcon::Off, workingDirectory, di->text(), icon, m_lang); if (di->hasAttributeResource()) m_loadedQrcFiles.insert(QFileInfo(workingDirectory, di->attributeResource()).absoluteFilePath(), false); #endif diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp index 414eb14..5a771b7 100644 --- a/tools/designer/src/lib/uilib/formbuilder.cpp +++ b/tools/designer/src/lib/uilib/formbuilder.cpp @@ -120,7 +120,8 @@ QFormBuilder::~QFormBuilder() */ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) { - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false); + QFormBuilderExtra *fb = QFormBuilderExtra::instance(this); + fb->setProcessingLayoutWidget(false); if (ui_widget->attributeClass() == QFormBuilderStrings::instance().qWidgetClass && !ui_widget->hasAttributeNative() && parentWidget #ifndef QT_NO_MAINWINDOW @@ -145,7 +146,7 @@ QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget) && !qobject_cast<QDockWidget *>(parentWidget) #endif ) - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(true); + fb->setProcessingLayoutWidget(true); return QAbstractFormBuilder::create(ui_widget, parentWidget); } @@ -369,9 +370,10 @@ QWidget *QFormBuilder::create(DomUI *ui, QWidget *parentWidget) */ QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget) { + QFormBuilderExtra *fb = QFormBuilderExtra::instance(this); // Is this a temporary layout widget used to represent QLayout hierarchies in Designer? // Set its margins to 0. - bool layoutWidget = QFormBuilderExtra::instance(this)->processingLayoutWidget(); + bool layoutWidget = fb->processingLayoutWidget(); QLayout *l = QAbstractFormBuilder::create(ui_layout, layout, parentWidget); if (layoutWidget) { const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); @@ -392,7 +394,7 @@ QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *pa bottom = prop->elementNumber(); l->setContentsMargins(left, top, right, bottom); - QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false); + fb->setProcessingLayoutWidget(false); } return l; } diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 921b8b6..f91175d 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -127,7 +127,7 @@ static Ending ending(QString str, QLocale::Language lang) switch (ch) { case 0x002e: // full stop - if (str.endsWith(QString(QLatin1String("...")))) + if (str.endsWith(QLatin1String("..."))) return End_Ellipsis; else return End_FullStop; diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index 300f6e8..b1f9818 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -152,10 +152,10 @@ bool QphHandler::startElement(const QString & /* namespaceURI */, const QString &qName, const QXmlAttributes &atts) { - if (qName == QString(QLatin1String("QPH"))) { + if (qName == QLatin1String("QPH")) { m_language = atts.value(QLatin1String("language")); m_sourceLanguage = atts.value(QLatin1String("sourcelanguage")); - } else if (qName == QString(QLatin1String("phrase"))) { + } else if (qName == QLatin1String("phrase")) { source.truncate(0); target.truncate(0); definition.truncate(0); @@ -168,13 +168,13 @@ bool QphHandler::endElement(const QString & /* namespaceURI */, const QString & /* localName */, const QString &qName) { - if (qName == QString(QLatin1String("source"))) + if (qName == QLatin1String("source")) source = accum; - else if (qName == QString(QLatin1String("target"))) + else if (qName == QLatin1String("target")) target = accum; - else if (qName == QString(QLatin1String("definition"))) + else if (qName == QLatin1String("definition")) definition = accum; - else if (qName == QString(QLatin1String("phrase"))) + else if (qName == QLatin1String("phrase")) pb->m_phrases.append(new Phrase(source, target, definition, pb)); return true; } diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp index c4f4448..4849d6e 100644 --- a/tools/linguist/lupdate/merge.cpp +++ b/tools/linguist/lupdate/merge.cpp @@ -193,7 +193,7 @@ static QString translationAttempt(const QString &oldTranslation, */ for (k = 0; k < p; k++) { if (!met[k]) - attempt += QString(QLatin1String(" {")) + newNumbers[k] + QString(QLatin1String("?}")); + attempt += QLatin1String(" {") + newNumbers[k] + QLatin1String("?}"); } /* @@ -205,8 +205,8 @@ static QString translationAttempt(const QString &oldTranslation, for (ell = 0; ell < p; ell++) { if (k != ell && oldNumbers[k] == oldNumbers[ell] && newNumbers[k] < newNumbers[ell]) - attempt += QString(QLatin1String(" {")) + newNumbers[k] + QString(QLatin1String(" or ")) + - newNumbers[ell] + QString(QLatin1String("?}")); + attempt += QLatin1String(" {") + newNumbers[k] + QLatin1String(" or ") + + newNumbers[ell] + QLatin1String("?}"); } } return attempt; diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp index 0be6bec..ae46ad8 100644 --- a/tools/linguist/shared/profileevaluator.cpp +++ b/tools/linguist/shared/profileevaluator.cpp @@ -894,7 +894,7 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() { QStringList concat; { - const QString base_concat = QDir::separator() + QString(QLatin1String("features")); + const QString base_concat = QDir::separator() + QLatin1String("features"); concat << base_concat + QDir::separator() + QLatin1String("mac"); concat << base_concat + QDir::separator() + QLatin1String("macx"); concat << base_concat + QDir::separator() + QLatin1String("unix"); @@ -903,7 +903,7 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() concat << base_concat + QDir::separator() + QLatin1String("qnx6"); concat << base_concat; } - const QString mkspecs_concat = QDir::separator() + QString(QLatin1String("mkspecs")); + const QString mkspecs_concat = QDir::separator() + QLatin1String("mkspecs"); QStringList feature_roots; QByteArray mkspec_path = qgetenv("QMAKEFEATURES"); if (!mkspec_path.isNull()) diff --git a/tools/linguist/shared/proparserutils.h b/tools/linguist/shared/proparserutils.h index c27c3c0..3eab43f 100644 --- a/tools/linguist/shared/proparserutils.h +++ b/tools/linguist/shared/proparserutils.h @@ -282,7 +282,7 @@ static QStringList split_value_list(const QString &vals, bool do_semicolon=false static QStringList qmake_mkspec_paths() { QStringList ret; - const QString concat = QDir::separator() + QString(QLatin1String("mkspecs")); + const QString concat = QDir::separator() + QLatin1String("mkspecs"); QByteArray qmakepath = qgetenv("QMAKEPATH"); if (!qmakepath.isEmpty()) { const QStringList lst = splitPathList(QString::fromLocal8Bit(qmakepath)); diff --git a/tools/pixeltool/qpixeltool.cpp b/tools/pixeltool/qpixeltool.cpp index 6de7741..c55cbd1 100644 --- a/tools/pixeltool/qpixeltool.cpp +++ b/tools/pixeltool/qpixeltool.cpp @@ -179,13 +179,13 @@ void QPixelTool::paintEvent(QPaintEvent *) if (m_displayZoom) { render_string(&p, w, h, - QString(QLatin1String("Zoom: x%1")).arg(m_zoom), + QString::fromLatin1("Zoom: x%1").arg(m_zoom), Qt::AlignTop | Qt::AlignRight); } if (m_displayGridSize) { render_string(&p, w, h, - QString(QLatin1String("Grid size: %1")).arg(m_gridSize), + QString::fromLatin1("Grid size: %1").arg(m_gridSize), Qt::AlignBottom | Qt::AlignLeft); } diff --git a/tools/porting/src/logger.cpp b/tools/porting/src/logger.cpp index fb44de7..bbeac9c 100644 --- a/tools/porting/src/logger.cpp +++ b/tools/porting/src/logger.cpp @@ -60,8 +60,8 @@ SourcePointLogEntry::SourcePointLogEntry(QString type, QString location, QString QString SourcePointLogEntry::description() const { return QLatin1String("In file ") + file + - QLatin1String(" at line ") + QString(QLatin1String("%1")).arg(line + 1) + //line count is zero based, adjust here. - QLatin1String(" column ") + QString(QLatin1String("%1")).arg(column) + + QLatin1String(" at line ") + QString::number(line + 1) + //line count is zero based, adjust here. + QLatin1String(" column ") + QString::number(column) + QLatin1String(": ") + text ; } @@ -127,7 +127,7 @@ QStringList Logger::fullReport() commitSection(); QStringList report; report << QLatin1String("Log for qt3to4 on ") + QDateTime::currentDateTime().toString() + - QLatin1String(". Number of log entries: ") + QString(QLatin1String("%1")).arg(logEntries.size()); + QLatin1String(". Number of log entries: ") + QString::number(logEntries.size()); foreach(LogEntry *logEntry, logEntries) { report << logEntry->description(); } diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index 9a58bc6..f0ff27e 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -241,19 +241,6 @@ void CodeParser::processCommonMetaCommand(const Location &location, if (node->type() == Node::Fake) { FakeNode *fake = static_cast<FakeNode *>(node); fake->setTitle(arg); -#ifdef QDOC2DOX - /* qdoc -> doxygen. - I think this must be done here, because there can be multiple - "\externalpage" and "\title" metacommands in a single qdoc - comment, which means, among other things, that the "\title" - commands are not inserted into the metacommand map used by - the Doc class. I'm sure there4 is a better way to do this in - the DoxWriter class using the information in the FakeNode, - but I don't have time to figure it out right now. - */ - if (DoxWriter::isDoxPass(1)) - DoxWriter::insertTitle(fake,arg); -#endif } else location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE)); diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index c8488f3..aa6b454 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -751,7 +751,7 @@ void Config::load(Location location, const QString& fileName) word += QChar(c.digitValue()); SKIP_CHAR(); } - else if ((metaCharPos = QString(QLatin1String("abfnrtv")).indexOf(c)) != -1) { + else if ((metaCharPos = QString::fromLatin1("abfnrtv").indexOf(c)) != -1) { word += "\a\b\f\n\r\t\v"[metaCharPos]; SKIP_CHAR(); } diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 1ad5843..8baef0c 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -589,22 +589,6 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, // ### split(" ") hack is there to support header file syntax QStringList paths = arg.split(" "); QStringList path = paths[0].split("::"); - -#if QDOC2DOX - // qdoc -> doxygen. - if (Doc::isDoxPass(1)) { - if (command == COMMAND_PROPERTY) { - Doc::insertProperty(path); - } - else if (command == COMMAND_VARIABLE) { - Doc::insertVariable(path); - } - else if (command == COMMAND_ENUM) { - // zzz - } - } -#endif - Node *node = 0; if (!usedNamespaces.isEmpty()) { foreach (const QString &usedNamespace, usedNamespaces) { @@ -1753,12 +1737,6 @@ bool CppCodeParser::matchDocsAndStuff() readToken(); Doc::trimCStyleComment(start_loc,comment); - /* - qdoc --> doxygen - We must also remember the location of the end - of the comment, so we can construct a diff for - it. - */ Location end_loc(location()); /* diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 61d0ed6..f0a4c12 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -515,14 +515,7 @@ void DocParser::parse(const QString& source, break; case CMD_BADCODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::CodeBad,getUnmarkedCode(CMD_BADCODE)); - else - append(Atom::CodeBad,getCode(CMD_BADCODE, marker)); -#else append(Atom::CodeBad,getCode(CMD_BADCODE, marker)); -#endif break; case CMD_BASENAME: leavePara(); @@ -538,17 +531,8 @@ void DocParser::parse(const QString& source, case CMD_C: enterPara(); x = untabifyEtc(getArgument(true)); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::C, x); - else { - marker = CodeMarker::markerForCode(x); - append(Atom::C, marker->markedUpCode(x, 0, "")); - } -#else marker = CodeMarker::markerForCode(x); append(Atom::C, marker->markedUpCode(x, 0, "")); -#endif break; case CMD_CAPTION: leavePara(); @@ -559,14 +543,7 @@ void DocParser::parse(const QString& source, break; case CMD_CODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) - append(Atom::Code, getUnmarkedCode(CMD_CODE)); - else - append(Atom::Code, getCode(CMD_CODE, marker)); -#else append(Atom::Code, getCode(CMD_CODE, marker)); -#endif break; #ifdef QDOC_QML case CMD_QML: @@ -579,17 +556,6 @@ void DocParser::parse(const QString& source, #endif case CMD_CODELINE: { -#ifdef QDOC2DOX - if (!quoting && !DoxWriter::isDoxPass()) { - if (priv->text.lastAtom()->type() == Atom::Code - && priv->text.lastAtom()->string().endsWith("\n\n")) - priv->text.lastAtom()->chopString(); - appendToCode("\n"); - } lse { - append(Atom::CodeQuoteCommand, cmdStr); - append(Atom::CodeQuoteArgument, " "); - } -#else if (!quoting) { if (priv->text.lastAtom()->type() == Atom::Code && priv->text.lastAtom()->string().endsWith("\n\n")) @@ -600,37 +566,10 @@ void DocParser::parse(const QString& source, append(Atom::CodeQuoteCommand, cmdStr); append(Atom::CodeQuoteArgument, " "); } -#endif } break; case CMD_DOTS: { -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - append(Atom::CodeQuoteCommand, cmdStr); - append(Atom::CodeQuoteArgument, " ..."); - } - else if (!quoting) { - if (priv->text.lastAtom()->type() == Atom::Code - && priv->text.lastAtom()->string().endsWith("\n\n")) - priv->text.lastAtom()->chopString(); - - QString arg = getOptionalArgument(); - int indent = 4; - if (!arg.isEmpty()) - indent = arg.toInt(); - for (int i = 0; i < indent; ++i) - appendToCode(" "); - appendToCode("...\n"); - } - else { - append(Atom::CodeQuoteCommand, cmdStr); - QString arg = getOptionalArgument(); - if (arg.isEmpty()) - arg = "4"; - append(Atom::CodeQuoteArgument, arg); - } -#else if (!quoting) { if (priv->text.lastAtom()->type() == Atom::Code && priv->text.lastAtom()->string().endsWith("\n\n")) @@ -651,7 +590,6 @@ void DocParser::parse(const QString& source, arg = "4"; append(Atom::CodeQuoteArgument, arg); } -#endif } break; case CMD_ELSE: @@ -953,19 +891,8 @@ void DocParser::parse(const QString& source, break; case CMD_OLDCODE: leavePara(); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - append(Atom::CodeOld, getUnmarkedCode(CMD_OLDCODE)); - append(Atom::CodeNew, getUnmarkedCode(CMD_NEWCODE)); - } - else { - append(Atom::CodeOld, getCode(CMD_OLDCODE, marker)); - append(Atom::CodeNew, getCode(CMD_NEWCODE, marker)); - } -#else append(Atom::CodeOld, getCode(CMD_OLDCODE, marker)); append(Atom::CodeNew, getCode(CMD_NEWCODE, marker)); -#endif break; case CMD_OMIT: getUntilEnd(cmd); @@ -1147,18 +1074,6 @@ void DocParser::parse(const QString& source, { QString snippet = getArgument(); QString identifier = getRestOfLine(); -#ifdef QDOC2DOX - if (quoting || DoxWriter::isDoxPass()) { - append(Atom::SnippetCommand, cmdStr); - append(Atom::SnippetLocation, snippet); - append(Atom::SnippetIdentifier, identifier); - } - else { - Doc::quoteFromFile(location(),quoter,snippet); - appendToCode(quoter.quoteSnippet(location(), - identifier)); - } -#else if (quoting) { append(Atom::SnippetCommand, cmdStr); append(Atom::SnippetLocation, snippet); @@ -1169,7 +1084,6 @@ void DocParser::parse(const QString& source, appendToCode(quoter.quoteSnippet(location(), identifier)); } -#endif } break; case CMD_SUB: @@ -1251,7 +1165,7 @@ void DocParser::parse(const QString& source, append(Atom::FormattingRight, ATOM_FORMATTING_BOLD); append(Atom::String, " "); break; - case CMD_OVERLOAD: // qdoc --> doxygen + case CMD_OVERLOAD: priv->metacommandsUsed.insert(cmdStr); x.clear(); if (!isBlankLine()) @@ -1265,9 +1179,7 @@ void DocParser::parse(const QString& source, } else { append(Atom::ParaLeft); - append(Atom::String, - "This is an overloaded member function, " - "provided for convenience."); + append(Atom::String,"This is an overloaded function."); append(Atom::ParaRight); x = getMetaCommandArgument(cmdStr); } @@ -2345,7 +2257,7 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) } /*! - Used only for generating doxygen output. + Was used only for generating doxygen output. */ QString DocParser::getUnmarkedCode(int cmd) { @@ -2581,36 +2493,6 @@ QString DocParser::slashed(const QString& str) #define COMMAND_QMLBRIEF Doc::alias("qmlbrief") #endif -#ifdef QDOC2DOX -#define DOXYGEN_INDENT 2 -#define DOXYGEN_TAB_SIZE 4 -#define DOXYGEN_INDENT_STRING " " -#define DOXYGEN_TAB_STRING " " - -static QRegExp ws_rx("\\s"); -static QRegExp not_ws_rx("\\S"); - -int DoxWriter::doxPass = 0; -QString DoxWriter::currentClass; -QSet<QString> DoxWriter::anchors; -QStringMap DoxWriter::exampleTitles; -QStringMap DoxWriter::headerFileTitles; -QStringMap DoxWriter::fileTitles; -QStringMap DoxWriter::groupTitles; -QStringMap DoxWriter::moduleTitles; -QStringMap DoxWriter::pageTitles; -QStringMap DoxWriter::externalPageTitles; -QStringMap DoxWriter::exampleTitlesInverse; -QStringMap DoxWriter::headerFileTitlesInverse; -QStringMap DoxWriter::fileTitlesInverse; -QStringMap DoxWriter::groupTitlesInverse; -QStringMap DoxWriter::moduleTitlesInverse; -QStringMap DoxWriter::pageTitlesInverse; -QStringMap DoxWriter::externalPageTitlesInverse; -QStringMultiMap DoxWriter::variables; -QStringMultiMap DoxWriter::properties; -QStringMultiMap DoxWriter::enums; -#endif Doc::Doc(const Location& start_loc, const Location& end_loc, @@ -2620,15 +2502,6 @@ Doc::Doc(const Location& start_loc, priv = new DocPrivate(start_loc,end_loc,source); DocParser parser; parser.parse(source,priv,metaCommandSet); -#ifdef QDOC2DOX - if (DoxWriter::isDoxPass()) { - DoxWriter doxWriter(source,priv); - if (DoxWriter::isDoxPass(1)) - doxWriter.pass1(); - else - doxWriter.pass2(); - } -#endif } Doc::Doc(const Doc& doc) @@ -3182,1855 +3055,4 @@ void Doc::detach() priv = newPriv; } -#ifdef QDOC2DOX -/*! - Sets the doxygen writer pass to \a pass. You can use - isDoxPass(), with or without a parameter, to test if - you are in a doxygen writer run or in a specific pass - of a doxygen writer run. - - This function is only called from main() if either the - \e doxygen1 or \e doxygen2 flag is passed to qdoc3 on - the command line. - */ -void DoxWriter::setDoxPass(int pass) -{ - qDebug() << "SETTING doxygen pass to " << pass - << " in DoxWriter::setDoxPass()"; - doxPass = pass; -} - -/*! - Returns true if the doxygen pass is set to \a pass, - which means we are in the specified \a pass of a doxygen - writer run of qdoc3. - */ -bool DoxWriter::isDoxPass(int pass) { return (doxPass == pass); } - -/*! - Returns true if the doxygen pass is 1 or 2, which - means this is a doxygen writer run to transform qdoc - comments into doxygen comments. - */ -bool DoxWriter::isDoxPass() { return (doxPass > 0); } - -bool DoxWriter::conversionRequired() const -{ - /* - Loop through all the topic commands searching for - one that must be transformed to doxygen format. If - one is found, return true. - */ - QCommandMap::const_iterator i; - i = priv->metaCommandMap.constBegin(); - while (i != priv->metaCommandMap.constEnd()) { - QString s = i.key(); - if (s == "enum") - return true; - else if (s == "example") - return true; - else if (s == "externalpage") - return true; - else if (s == "group") - return true; - else if (s == "headerfile") - return true; - else if (s == "module") - return true; - else if (s == "page") - return true; - else if (s == "property") - return true; - else if (s == "typedef") - return true; - else if (s == "variable") - return true; - else if (s == "overload") - return true; - else if (s == "reimp") - return true; - else if (s == "relates") - return true; - else if (s == "macro") - return true; - else { -#if 0 - if (s == "class") - else if (s == "namespace") - else if (s == "service") - else if (s == "inheaderfile") - else if (s == "file") - else if (s == "fn") - else if (s == "contentspage") - else if (s == "nextpage") - else if (s == "previous") - else if (s == "indexpage") - else if (s == "startpage") -#endif - } - ++i; - } - - /* - Loop through all the qdoc atoms searching for one - that must be transformed to doxygen format. If one - is found, return true. - */ - const Atom* next = priv->text.firstAtom(); - while (next != 0) { - Atom::Type atomType = next->type(); - switch (atomType) { - case Atom::C: - case Atom::CaptionLeft: - case Atom::Code: - case Atom::CodeBad: - case Atom::CodeNew: - case Atom::CodeOld: - case Atom::CodeQuoteArgument: - case Atom::CodeQuoteCommand: - case Atom::FootnoteLeft: - case Atom::FormatElse: - case Atom::FormatEndif: - case Atom::FormatIf: - case Atom::GeneratedList: - case Atom::Image: - case Atom::ImageText: - case Atom::InlineImage: - case Atom::LegaleseLeft: - case Atom::LineBreak: - case Atom::Link: - case Atom::LinkNode: - case Atom::ListLeft: - case Atom::ListItemNumber: - case Atom::ListTagLeft: - case Atom::ListItemLeft: - case Atom::QuotationLeft: - case Atom::RawString: - case Atom::SectionLeft: - case Atom::SectionHeadingLeft: - case Atom::SidebarLeft: - case Atom::SnippetCommand: - case Atom::SnippetIdentifier: - case Atom::SnippetLocation: - case Atom::TableLeft: - case Atom::TableHeaderLeft: - case Atom::TableRowLeft: - case Atom::TableItemLeft: - case Atom::TableOfContents: - case Atom::Target: - return true; - case Atom::AbstractLeft: - case Atom::AbstractRight: - case Atom::AutoLink: - case Atom::BaseName: - case Atom::BriefLeft: - case Atom::BriefRight: - case Atom::CaptionRight: - case Atom::FormattingLeft: - case Atom::FormattingRight: - case Atom::Nop: - case Atom::ParaLeft: - case Atom::ParaRight: - case Atom::FootnoteRight: - case Atom::LegaleseRight: - case Atom::ListTagRight: - case Atom::ListItemRight: - case Atom::ListRight: - case Atom::QuotationRight: - case Atom::SectionRight: - case Atom::SectionHeadingRight: - case Atom::SidebarRight: - case Atom::String: - case Atom::TableRight: - case Atom::TableHeaderRight: - case Atom::TableRowRight: - case Atom::TableItemRight: - default: - break; - } - next = next->next(); - } - return false; -} - -/*! - A convenience function to write a qdoc metacommand as a - doxygen command, without conversion. i.e., some of the - qdoc metacommands don't require conversion for doxygen. - */ -void DoxWriter::writeCommand(QCommandMap::const_iterator cmd) -{ - concatenate("\\" + cmd.key() + " " + cmd.value()[0]); - newLine(); -} - -/*! - Convert the qdoc commands in the metacommand map to - doxygen format. This function is called only in pass2(). - The metacommand map contains all the metacommands that - were found in the qdoc comment that is being converted. - The metacommands are the ones that begin with the '\'. - These are not considered part of the text of the comment. - The text is converted by convertText(). - */ -void DoxWriter::convertMetaCommands() -{ - QCommandMap& metaCmdMap = priv->metaCommandMap; - QCommandMap::iterator cmd; - int c; - - currentPage.clear(); - currentFn.clear(); - currentTitle.clear(); - currentEnum.clear(); - currentProperty.clear(); - currentVariable.clear(); - currentClass.clear(); - currentExample.clear(); - currentGroup.clear(); - currentModule.clear(); - currentMacro.clear(); - currentService.clear(); - currentTypedef.clear(); - currentHeaderFile.clear(); - commentType = OtherComment; - - if ((cmd = metaCmdMap.find("class")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.indexOf(' ')) > 0) - currentClass = currentClass.left(c); - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = ClassComment; - } - else if ((cmd = metaCmdMap.find("fn")) != metaCmdMap.end()) { - currentFn = cmd.value()[0]; - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = FnComment; - } - else if ((cmd = metaCmdMap.find("enum")) != metaCmdMap.end()) { - currentEnum = cmd.value()[0]; - if ((c = currentEnum.lastIndexOf("::")) > 0) { - currentClass = currentEnum.left(c); - currentEnum = currentEnum.right(currentEnum.size()-c-2); - qDebug() << "currentEnum =" << currentEnum; - qDebug() << "currentClass =" << currentClass; - } - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = EnumComment; - } - else if ((cmd = metaCmdMap.find("property")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentProperty = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentProperty =" << currentProperty; - qDebug() << "currentClass =" << currentClass; - } - writeCommand(cmd); - metaCmdMap.erase(cmd); - commentType = PropertyComment; - } - else if ((cmd = metaCmdMap.find("variable")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentVariable = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentVariable =" << currentVariable; - qDebug() << "currentClass =" << currentClass; - } - concatenate("\\var " + cmd.value()[0]); - newLine(); - metaCmdMap.erase(cmd); - commentType = VariableComment; - } - - if ((cmd = metaCmdMap.find("page")) != metaCmdMap.end()) { - currentPage = cmd.value()[0]; - QString htmlFile = currentPage; - const QString* title = getPageTitle(htmlFile); - QStringList parts = htmlFile.split('.'); - metaCmdMap.erase(cmd); - if (title) { - concatenate("\\page " + parts[0] + " " + *title); - newLine(); - } - commentType = PageComment; - qDebug() << "currentPage =" << currentPage; - } - - if ((cmd = metaCmdMap.find("example")) != metaCmdMap.end()) { - currentExample = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = ExampleComment; - qDebug() << "currentExample =" << currentExample; - } - - if ((cmd = metaCmdMap.find("macro")) != metaCmdMap.end()) { - currentMacro = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = MacroComment; - qDebug() << "currentMacro =" << currentMacro; - } - - if ((cmd = metaCmdMap.find("group")) != metaCmdMap.end()) { - currentGroup = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = GroupComment; - qDebug() << "currentGroup =" << currentGroup; - } - - if ((cmd = metaCmdMap.find("module")) != metaCmdMap.end()) { - currentModule = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = ModuleComment; - qDebug() << "currentModule =" << currentModule; - } - - if ((cmd = metaCmdMap.find("headerfile")) != metaCmdMap.end()) { - currentHeaderFile = cmd.value()[0]; - metaCmdMap.erase(cmd); - commentType = HeaderFileComment; - qDebug() << "currentHeaderFile =" << currentHeaderFile; - } - - if ((cmd = metaCmdMap.find("typedef")) != metaCmdMap.end()) { - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentTypedef = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - } - metaCmdMap.erase(cmd); - commentType = TypedefComment; - qDebug() << "currentTypedef =" << currentTypedef; - qDebug() << "currentClass =" << currentClass; - } - - cmd = priv->metaCommandMap.begin(); - while (cmd != priv->metaCommandMap.end()) { - for (int i=0; i<cmd.value().size(); i++) { - concatenate("\\" + cmd.key() + " " + cmd.value()[i]); - newLine(); - } - //qDebug() << " " << cmd.key() << ": " << cmd.value(); - ++cmd; - } -} - -/*! - Convert the qdoc text to doxygen format. The metacommands - are converted by convertMetaCommands(). This function is - called in pass2(). - */ -void DoxWriter::convertText() -{ - const Atom* prev = 0; - const Atom* next = priv->text.firstAtom(); - while (next != 0) { - next->dump(); - Atom::Type atomType = next->type(); - switch (atomType) { - case Atom::AbstractLeft: - break; - case Atom::AbstractRight: - break; - case Atom::AutoLink: - concatenate(next->string()); - break; - case Atom::BaseName: - break; - case Atom::BriefLeft: - concatenate("\\brief "); - break; - case Atom::BriefRight: - newLine(); - break; - case Atom::C: - tt(next); - break; - case Atom::CaptionLeft: - unhandled(next); - break; - case Atom::CaptionRight: - unhandled(next); - break; - case Atom::Code: - code(next); - break; - case Atom::CodeBad: - code(next); - break; - case Atom::CodeNew: - newLine(); - concatenate("you can rewrite it as"); - code(next); - break; - case Atom::CodeOld: - newLine(); - concatenate("For example, if you have code like"); - code(next); - break; - case Atom::CodeQuoteArgument: - unhandled(next); - break; - case Atom::CodeQuoteCommand: - next = codeQuoteCommand(next); - break; - case Atom::FootnoteLeft: - break; - case Atom::FootnoteRight: - break; - case Atom::FormatElse: - formatElse(); - break; - case Atom::FormatEndif: - formatEndif(); - break; - case Atom::FormatIf: - formatIf(next); - break; - case Atom::FormattingLeft: - formattingLeft(next,next->next()); - break; - case Atom::FormattingRight: - formattingRight(next,prev); - break; - case Atom::GeneratedList: - break; - case Atom::Image: - break; - case Atom::ImageText: - break; - case Atom::InlineImage: - break; - case Atom::LegaleseLeft: - break; - case Atom::LegaleseRight: - break; - case Atom::LineBreak: - break; - case Atom::Link: - next = link(next); - break; - case Atom::LinkNode: - break; - case Atom::ListLeft: - { - bool nested = false; - if (structs.isEmpty()) { - const Atom* i = next->next(); - while (i->type() != Atom::ListRight) { - if ((i->type() == Atom::ListLeft) || - (i->type() == Atom::TableLeft)) { - nested = true; - break; - } - i = i->next(); - } - } - else - nested = true; - StructDesc d(BulletList,nested); - if (next->string() == "numeric") - d.structType = NumericList; - else if (next->string() == "value") { - d.structType = ValueList; - } - else if (next->string() != "bullet") - qDebug() << "UNKNOWN LIST TYPE" << next->string(); - structs.push(d); - if (nested || (d.structType != BulletList)) { - if (d.structType == BulletList) - concatenate("<ul>"); - else if (d.structType == NumericList) - concatenate("<ol>"); - else if (d.structType == ValueList) - concatenate("<dl>"); - newLine(); - } - } - break; - case Atom::ListItemNumber: - structs.top().count = next->string().toInt(); - break; - case Atom::ListTagLeft: - { - structs.top().count++; - concatenate("<dt>"); - const Atom* n = next->next(); - if (n->type() == Atom::String) { - qDebug() << "ENUM VALUE" << n->string(); - } - else - qDebug() << "NOT EN ENUM"; - } - break; - case Atom::ListTagRight: - concatenate("</dt>"); - break; - case Atom::ListItemLeft: - { - newLine(); - const StructDesc& d = structs.top(); - if (d.structType == BulletList) { - if (!d.nested) - concatenate("\\arg "); - else - concatenate("<li>"); - } - else if (d.structType == NumericList) - concatenate("<li>"); - else if (d.structType == ValueList) - concatenate("<dd>"); - } - break; - case Atom::ListItemRight: - { - const StructDesc& d = structs.top(); - if (d.structType == BulletList) { - if (d.nested) { - concatenate("</li>"); - newLine(); - } - } - else if (d.structType == NumericList) { - concatenate("</li>"); - newLine(); - } - else if (d.structType == ValueList) { - concatenate("</dd>"); - newLine(); - } - } - break; - case Atom::ListRight: - { - if (!structs.isEmpty()) { - const StructDesc& d = structs.top(); - if (d.nested || (d.structType != BulletList)) { - if (d.structType == BulletList) - concatenate("</ul>"); - else if (d.structType == NumericList) - concatenate("</ol>"); - else if (d.structType == ValueList) - concatenate("</dl>"); - newLine(); - } - structs.pop(); - } - } - break; - case Atom::Nop: - // nothing. - break; - case Atom::ParaLeft: - if (structs.isEmpty()) - newLine(); - break; - case Atom::ParaRight: - { - if (structs.isEmpty()) - newLine(); - else { - const StructDesc& d = structs.top(); - if (d.nested || (d.structType != BulletList)) { - Atom::Type t = next->next()->type(); - if ((t != Atom::ListItemRight) && - (t != Atom::TableItemRight)) - newLine(); - } - else - newLine(); - } - } - break; - case Atom::QuotationLeft: - break; - case Atom::QuotationRight: - break; - case Atom::RawString: - concatenate(next->string()); - break; - case Atom::SectionLeft: - // nothing. - break; - case Atom::SectionRight: - // nothing. - break; - case Atom::SectionHeadingLeft: - next = sectionHeading(next); - break; - case Atom::SectionHeadingRight: - newLine(); - break; - case Atom::SidebarLeft: - break; - case Atom::SidebarRight: - break; - case Atom::SnippetCommand: - newLine(); - concatenate("\\snippet "); - break; - case Atom::SnippetIdentifier: - newText += next->string(); - lineLength += next->string().size(); - newLine(); - break; - case Atom::SnippetLocation: - newText += next->string() + " "; - lineLength += next->string().size() + 1; - break; - case Atom::String: - wrap(next->string()); - break; - case Atom::TableLeft: - { - bool nested = false; - if (structs.isEmpty()) { - const Atom* i = next->next(); - while (i->type() != Atom::TableRight) { - if ((i->type() == Atom::ListLeft) || - (i->type() == Atom::TableLeft)) { - nested = true; - break; - } - i = i->next(); - } - } - else - nested = true; - StructDesc d(Table,nested); - structs.push(d); - if (next->string().isEmpty()) - concatenate("<table>"); - else { - QString attrs = "width=\"" + next->string() + "\""; - attrs += " align=\"center\""; - concatenate("<table " + attrs + ">"); - } - newLine(); - } - break; - case Atom::TableRight: - concatenate("</table>"); - if (!structs.isEmpty()) - structs.pop(); - newLine(); - break; - case Atom::TableHeaderLeft: - concatenate("<tr>"); - if (!structs.isEmpty()) - structs.top().inTableHeader = true; - newLine(); - break; - case Atom::TableHeaderRight: - concatenate("</tr>"); - if (!structs.isEmpty()) - structs.top().inTableHeader = false; - newLine(); - break; - case Atom::TableRowLeft: - if (!structs.isEmpty()) { - structs.top().inTableRow = true; - concatenate("<tr valign=\"top\" class=\""); - if (structs.top().odd) - concatenate("odd\">"); - else - concatenate("even\">"); - structs.top().odd = !structs.top().odd; - } - newLine(); - break; - case Atom::TableRowRight: - concatenate("</tr>"); - if (!structs.isEmpty()) - structs.top().inTableRow = false; - newLine(); - break; - case Atom::TableItemLeft: - if (!structs.isEmpty()) { - structs.top().inTableItem = true; - concatenate("<td>"); - if (structs.top().inTableHeader) - concatenate("<b> "); - } - break; - case Atom::TableItemRight: - if (!structs.isEmpty()) { - structs.top().inTableItem = false; - if (structs.top().inTableHeader) - concatenate(" </b>"); - concatenate("</td>"); - } - newLine(); - break; - case Atom::TableOfContents: - break; - case Atom::Target: - { - QString text = next->string(); - text.remove(ws_rx); - newLine(); - concatenate("\\anchor "); - newText += text; - lineLength += text.size(); - newLine(); - } - break; - case Atom::UnhandledFormat: - unhandled(next); - break; - case Atom::UnknownCommand: - unhandled(next); - break; - default: - //next->dump(); - break; - } - prev = next; - next = next->next(); - } -} - -/*! - - Pass one looks for topic commands and target and section - commands, and maybe other stuff. These are serialized to - text files, which are read back in by pass2(). - */ -void DoxWriter::pass1() -{ - QCommandMap& metaCmdMap = priv->metaCommandMap; - if (!metaCmdMap.isEmpty()) { - int c; - QCommandMap::iterator cmd; - if ((cmd = metaCmdMap.find("enum")) != metaCmdMap.end()) { - commentType = EnumComment; - currentEnum = cmd.value()[0]; - if ((c = currentEnum.lastIndexOf("::")) > 0) { - currentClass = currentEnum.left(c); - currentEnum = currentEnum.right(currentEnum.size()-c-2); - qDebug() << "currentEnum =" << currentEnum; - qDebug() << "currentClass =" << currentClass; - if (enums.contains(currentEnum,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate enum:" - << currentClass << currentEnum; - } - else - enums.insert(currentEnum,currentClass); - } - } - else if ((cmd = metaCmdMap.find("property")) != metaCmdMap.end()) { - commentType = PropertyComment; - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentProperty = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentProperty =" << currentProperty; - qDebug() << "currentClass =" << currentClass; - if (properties.contains(currentProperty,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate property:" - << currentClass << currentProperty; - } - else - properties.insert(currentProperty,currentClass); - } - } - else if ((cmd = metaCmdMap.find("variable")) != metaCmdMap.end()) { - commentType = VariableComment; - currentClass = cmd.value()[0]; - if ((c = currentClass.lastIndexOf("::")) > 0) { - currentVariable = currentClass.right(currentClass.size()-c-2); - currentClass = currentClass.left(c); - qDebug() << "currentVariable =" << currentVariable; - qDebug() << "currentClass =" << currentClass; - if (variables.contains(currentVariable,currentClass)) { - qWarning() << "DoxWriter::pass1():" - << "Duplicate variable:" - << currentClass << currentVariable; - } - else - variables.insert(currentVariable,currentClass); - } - } - } - - /* - */ - const Atom* next = priv->text.firstAtom(); - while (next != 0) { - switch (next->type()) { - case Atom::SectionHeadingLeft: - { - QString text; - next = next->next(); - while (next) { - if (next->type() == Atom::SectionHeadingRight) - break; - else - text += next->string(); - next = next->next(); - } - //text.remove(ws_rx); - insertAnchor(text); - } - break; - case Atom::Target: - { - QString text = next->string(); - //text.remove(ws_rx); - insertAnchor(text); - } - default: - break; - } - next = next->next(); - } -} - -/*! - Output a parsed, tokenized qdoc comment as a doxygen - comment in diff format for input to the patch command. - */ -void DoxWriter::pass2() -{ - if (!conversionRequired()) { - qDebug() << "NO CONVERSION - FILE:" << priv->start_loc.fileName() - << "START:" << priv->start_loc.lineNo() - << "END:" << priv->end_loc.lineNo() - 1; - return; - } - - /* - Transformation to doxygen required... - */ - newText = "\n/*! \n"; - convertMetaCommands(); - convertText(); - if (newText[newText.size()-1] == ' ') - newText.remove(newText.size()-1,1); - newText += " */\n"; - qDebug() << "CONVERTED COMMENT - FILE:" << priv->start_loc.fileName() - << "START:" << priv->start_loc.lineNo() - << "END:" << priv->end_loc.lineNo() - 1; - qDebug() << newText; -} - -/*! - Unparse the second parameter of a "\l" command. - */ -const Atom* DoxWriter::link(const Atom* atom) -{ - QString first_text = atom->string(); - QString second_text; - const QString* value = 0; - - const Atom* next = atom->next(Atom::FormattingLeft,Atom::LINK_); - if (next) { - next->dump(); - while (1) { - next = next->next(); - next->dump(); - if (next->type() == Atom::FormattingRight) { - if (next->string() == Atom::LINK_) - break; - else { - // ignore it. - } - } - else - second_text += next->string(); - } - int i = first_text.indexOf('#'); - if (i >= 0) - first_text = first_text.right(first_text.size() - i - 1); - //newLine(); - if ((value = getExternalPage(first_text))) { - //qDebug() << "USED AN EXTERNAL PAGE TITLE" << first_text; - QString href = "<a href=\""+*value+"\">"+first_text+"</a>"; - concatenate(href); - } - else if (first_text.startsWith("http:",Qt::CaseInsensitive)) { - if (first_text == second_text) { - concatenate(first_text); - } - else { - QString href = "<a href=\""+first_text+"\">"+second_text+"</a>"; - concatenate(href); - } - } - else if ((value = getPageFile(first_text))) { - //qDebug() << "USED A PAGE TITLE" << first_text; - QStringList parts = (*value).split('.'); - QString ref = "\\ref " + parts[0] + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getGroup(first_text))) { - //qDebug() << "USED A GROUP TITLE" << first_text; - concatenate("\\ref " + *value + " \"" + second_text + "\""); - } - else if ((value = getModule(first_text))) { - //qDebug() << "USED A MODULE TITLE" << first_text; - concatenate("\\ref " + *value + " \"" + second_text + "\""); - } - else if ((value = getExamplePath(first_text))) { - //qDebug() << "USED AN EXAMPLE TITLE" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getFile(first_text))) { - //qDebug() << "USED A FILE TITLE" << first_text; - // I think this command is no longer available. - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getHeaderFile(first_text))) { - //qDebug() << "USED A HEADER FILE TITLE" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if (isAnchor(first_text)) { - //qDebug() << "USED AN ANCHOR" << first_text; - first_text.remove(ws_rx); - QString ref = "\\ref " + first_text + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getPageTitle(first_text))) { - //qDebug() << "USED AN INVERSE PAGE TITLE" << first_text; - QStringList parts = first_text.split('.'); - QString ref = "\\ref " + parts[0] + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getExampleTitle(first_text))) { - //qDebug() << "USED AN INVERSE EXAMPLE TITLE" << first_text; - QString title = *value; - title.remove(ws_rx); - QString ref = "\\ref " + title + " \"" + second_text + "\""; - concatenate(ref); - } - else if ((value = getGroupTitle(first_text))) { - //qDebug() << "USED AN INVERSE GROUP TITLE" << first_text; - concatenate("\\ref " + first_text + " \"" + second_text + "\""); - } - else if ((value = getModuleTitle(first_text))) { - //qDebug() << "USED AN INVERSE MODULE TITLE" << first_text; - concatenate("\\ref " + first_text + " \"" + second_text + "\""); - } - else if ((value = getFileTitle(first_text))) { - qDebug() << "USED AN INVERSE FILE TITLE" << first_text; - } - else if ((value = getHeaderFileTitle(first_text))) { - qDebug() << "USED AN INVERSE HEADER FILE TITLE" << first_text; - } - else if ((first_text.indexOf("::") >= 0) || - (first_text.indexOf("()") >= 0) || - (first_text[0] == 'Q')) { - //qDebug() << "AUTO-LINKABLE" << first_text; - if (first_text == second_text) - concatenate(first_text); - else { - QString link = first_text + " " + second_text; - concatenate("\\link " + link + "\\endlink"); - } - } - else { - QString link; - QStringList propertyClasses; - QStringList variableClasses; - QStringList enumClasses; - bool p = isProperty(first_text,propertyClasses); - bool v = isVariable(first_text,variableClasses); - bool e = isEnum(first_text,enumClasses); - if (e) { - if (enumClasses.size() == 1) - link = enumClasses[0]; - else if (enumClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified enum name: " + first_text; - QString details = "Classes: " + enumClasses.join(", "); - priv->start_loc.error(msg,details); - } - if (!link.isEmpty()) - qDebug() << "FOUND ENUM" << link << first_text; - } - else if (p && v) { - if (propertyClasses.size() == 1) { - if (variableClasses.size() == 1) { - if (propertyClasses[0] == variableClasses[0]) - link = propertyClasses[0]; - } - } - if (link.isEmpty()) { - if (propertyClasses.contains(currentClass) || - variableClasses.contains(currentClass)) - link = currentClass; - else { - propertyClasses += variableClasses; - QString msg = "Unqualified property or variable name: " - + first_text; - QString details = "Classes: " + - propertyClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - } - else if (p) { - if (propertyClasses.size() == 1) - link = propertyClasses[0]; - else if (propertyClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified property name: " + first_text; - QString details = "Classes: " + propertyClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - else if (v) { - if (variableClasses.size() == 1) - link = variableClasses[0]; - else if (variableClasses.contains(currentClass)) - link = currentClass; - else { - QString msg = "Unqualified variable name: " + first_text; - QString details = "Classes: " + variableClasses.join(", "); - priv->start_loc.error(msg,details); - } - } - else { - qDebug() << "NOT AUTO-LINKABLE" << first_text; - QString s = first_text + " " + second_text; - concatenate("\\link " + s + "\\endlink"); - } - if (!link.isEmpty()) { - link += "::" + first_text + " " + second_text; - concatenate("\\link " + link + "\\endlink"); - } - } - } - else - qDebug() << "LINK with no second parameter!!!!"; - return next? next : atom; -} - -/*! - If the current line length is 0, the current line is - indented according to the context. - */ -void DoxWriter::indentLine() -{ - if (lineLength == 0) { - newText += DOXYGEN_INDENT_STRING; - lineLength = DOXYGEN_INDENT; - if (!structs.isEmpty()) { - for (int i=1; i<structs.size(); ++i) { - newText += DOXYGEN_TAB_STRING; - lineLength += DOXYGEN_TAB_SIZE; - } - } - } -} - -/*! - Concatenates a newline to the doxygen text, increments the - line count, and resets the line length to 0. - */ -void DoxWriter::newLine() -{ - newText += "\n"; - ++lineCount; - lineLength = 0; -} - -static const int maxLineLength = 70; - -/*! - Concatenate the \a text to the doxygen comment currently - under construction and increment the current line length - by the size of the \a text. - - If incrementing the current line length by the \a text size - would make the current line length longer than the maximum - line length, then call newLine() and indentLine() \e before - concatenating the \a text. - */ -void DoxWriter::concatenate(QString text) -{ - if ((lineLength + text.size()) > maxLineLength) - newLine(); - indentLine(); - newText += text; - lineLength += text.size(); -} - -static bool punctuation(QChar c) -{ - switch (c.toAscii()) { - case '.': - case ',': - case ':': - case ';': - case '/': - case '+': - case '-': - case '?': - case '!': - case '\"': - return true; - default: - break; - } - return false; -} - -/*! - Concatenate the \a text string to the doxygen text, doing - line wrapping where necessary. - */ -void DoxWriter::wrap(QString text) -{ - int from = 0; - int to = -1; - - if ((lineLength == 0) || (lineLength >= maxLineLength)) { - if (!text.isEmpty() && (text[0] == ' ')) - text = text.right(text.size() - 1); - } - - indentLine(); - while (text.size()) { - int avail = maxLineLength - lineLength; - from = text.indexOf(' ',from); - if (from >= 0) { - if (from < avail) - to = from++; - else if (from == 1 && punctuation(text[0])) - to = from++; - else { - if (to >= 0) { - newText += text.left(to+1); - lineLength += to + 1; - text = text.right(text.size() - to - 1); - } - else { - newLine(); - indentLine(); - newText += text.left(from+1); - lineLength += from + 1; - text = text.right(text.size() - from - 1); - } - from = 0; - to = -1; - if (text.size() && (lineLength > maxLineLength)) { - newLine(); - indentLine(); - } - } - } - else - break; - } - if (text.size()) { - if (lineLength >= maxLineLength) { - newLine(); - indentLine(); - } - newText += text; - lineLength += text.size(); - } -} - -/*! - This will output something, but it depends on what the - \a atom string and the \a next atom string are. - */ -void DoxWriter::formattingLeft(const Atom* atom, const Atom* next) -{ - if (atom->string() == "parameter") { - concatenate("\\a "); - return; - } - else if (atom->string() == "underline") { - concatenate("<u>"); - return; - } - else if (atom->string() == "superscript") { - concatenate("<sup>"); - return; - } - else if (atom->string() == "subscript") { - concatenate("<sub>"); - return; - } - int ws = -1; - if (next) - ws = next->string().indexOf(ws_rx); - if (atom->string() == "bold") { - if (ws < 0) - concatenate("\\b "); - else - concatenate("<b>"); - } - else if (atom->string() == "italic") { - if (ws < 0) - concatenate("\\e "); - else - concatenate("<i>"); - } - else if (atom->string() == "teletype") { - if (ws < 0) - concatenate("\\c "); - else - concatenate("<tt>"); - } - else - qDebug() << "UNHANDLED FormattingLeft: " << atom->string(); -} - -/*! - This will output something, but it depends on what the - \a atom string and the \a prev atom string are. - */ -void DoxWriter::formattingRight(const Atom* atom, const Atom* prev) -{ - if (atom->string() == "parameter") - return; - else if (atom->string() == "underline") { - concatenate("</u>"); - return; - } - else if (atom->string() == "superscript") { - concatenate("</sup>"); - return; - } - else if (atom->string() == "subscript") { - concatenate("</sub>"); - return; - } - int ws = -1; - if (prev) - ws = prev->string().indexOf(ws_rx); - if (ws < 0) - return; - if (atom->string() == "bold") - concatenate("</b>"); - else if (atom->string() == "italic") - concatenate("</i>"); - else if (atom->string() == "teletype") - concatenate("</tt>"); - else - qDebug() << "UNHANDLED FormattingRight: " << atom->string(); -} - -/*! - Output a \c or a <tt>...</tt>. - */ -void DoxWriter::tt(const Atom* atom) -{ - if (atom->string().indexOf(ws_rx) < 0) { - concatenate("\\c "); - concatenate(atom->string()); - } - else { - concatenate("<tt>"); - concatenate(atom->string()); - concatenate("</tt>"); - } -} - -/*! - */ -void DoxWriter::formatIf(const Atom* atom) -{ - if (atom->string() == "HTML") { - newLine(); - concatenate("\\htmlonly"); - newLine(); - } -} - -/*! - */ -void DoxWriter::formatEndif() -{ - newLine(); - concatenate("\\endhtmlonly"); - newLine(); -} - -/*! - */ -void DoxWriter::formatElse() -{ - // nothing. -} - -/*! - Pass 1: Construct a section identifier and insert it into - the anchor set. - - Pass 2: Convert section1, section2, and section3 commands - to section, subsection, and subsubsection respectively. - Warn if a section command higher than 3 is seen. - */ -const Atom* DoxWriter::sectionHeading(const Atom* atom) -{ - QString heading_level = atom->string(); - QString heading_text; - const Atom* next = atom->next(); - while (next) { - next->dump(); - if (next->type() == Atom::SectionHeadingRight) { - if (next->string() == heading_level) - break; - else { - qDebug() << "WRONG SectionHeading number!!!!"; - } - } - else - heading_text += next->string(); - next = next->next(); - } - - QString heading_identifier = heading_text; - heading_identifier.remove(ws_rx); - - newLine(); - if (heading_level == "1") - heading_level = "\\section "; - else if (heading_level == "2") - heading_level = "\\subsection "; - else if (heading_level == "3") - heading_level = "\\subsubsection "; - else if (heading_level == "4") { - heading_level = "\\subsubsection "; - qDebug() << "WARNING section4 converted to \\subsubsection"; - } - else { - heading_level = "\\subsubsection "; - qDebug() << "WARNING section5 converted to \\subsubsection"; - } - concatenate(heading_level); - newText += heading_identifier + " "; - lineLength += heading_identifier.size() + 1; - newText += heading_text; - lineLength += heading_text.size(); - newLine(); - return next? next : atom; -} - -/*! - Report an unhandled atom. - */ -void DoxWriter::unhandled(const Atom* atom) -{ - qDebug() << "UNHANDLED ATOM"; - atom->dump(); -} - -/*! - Output a code/endcode block. - */ -void DoxWriter::code(const Atom* atom) -{ - newLine(); - concatenate("\\code"); - writeCode(atom->string()); - concatenate("\\endcode"); - newLine(); -} - -/*! - Output a code/endcode block depending on the - CodeQuote Command and CodeQuoteArgument parameters. - */ -const Atom* DoxWriter::codeQuoteCommand(const Atom* atom) -{ - QString command = atom->string(); - atom = atom->next(); - concatenate("\\code"); - if (command == "codeline") { - newLine(); - concatenate(atom->string()); - newLine(); - } - else if (command == "dots") { - newLine(); - concatenate(atom->string()); - newLine(); - } - else { - writeCode(atom->string()); - } - concatenate("\\endcode"); - return atom; -} - -/*! - Appends a block of code to the comment. - */ -void DoxWriter::writeCode(QString text) -{ - int cr_count = text.count('\n') - 1; - if (cr_count >= 0) { - int last_cr = text.lastIndexOf('\n'); - newText += text.left(last_cr); - lineCount += cr_count; - } - else - newText += text; - newLine(); -} - -/*! - Inserts \a text into the anchor set. This function is called - during doxygen pass 1. - */ -void DoxWriter::insertAnchor(const QString& text) -{ - anchors.insert(text); -} - -/*! - Returns true if \a text identifies an anchor, section, - subsection, subsubsection, or page. - */ -bool DoxWriter::isAnchor(const QString& text) -{ - return anchors.contains(text); -} - -/*! - Write the set of anchors to a file, one per line. - */ -void DoxWriter::writeAnchors() -{ - QFile file("anchors.txt"); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning("Unable to open anchors.txt for writing."); - return; - } - - QTextStream out(&file); - QSet<QString>::const_iterator i = anchors.constBegin(); - while (i != anchors.constEnd()) { - out << *i << "\n"; - ++i; - } - file.close(); -} - -/*! - Read the set of anchors from the anchors file, one per line, - and insert each one into the anchor set. - */ -void DoxWriter::readAnchors() -{ - QFile file("anchors.txt"); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning("Unable to open anchors.txt for reading."); - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString line = in.readLine(); - anchors.insert(line); - } - file.close(); -#if 0 - QSet<QString>::const_iterator i = anchors.constBegin(); - while (i != anchors.constEnd()) { - qDebug() << *i; - ++i; - } -#endif -} - -/*! - Inserts \a title into one of the title maps. \a title is - mapped to the \a node name. This function is called during - doxygen pass 1. - */ -void DoxWriter::insertTitle(FakeNode* node, const QString& title) -{ - switch (node->subType()) { - case FakeNode::Example: - if (exampleTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate example title:" - << title; - } - else { - exampleTitles[title] = node->name(); - exampleTitlesInverse[node->name()] = title; - } - break; - case FakeNode::HeaderFile: - if (headerFileTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate header file title:" - << title; - } - else { - headerFileTitles[title] = node->name(); - headerFileTitlesInverse[node->name()] = title; - } - break; - case FakeNode::File: - if (fileTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate file title:" - << title; - } - else { - fileTitles[title] = node->name(); - fileTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Group: - if (groupTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate group title:" - << title; - } - else { - groupTitles[title] = node->name(); - groupTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Module: - if (moduleTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate module title:" - << title; - } - else { - moduleTitles[title] = node->name(); - moduleTitlesInverse[node->name()] = title; - } - break; - case FakeNode::Page: - if (pageTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate page title:" - << title; - } - else { - pageTitles[title] = node->name(); - pageTitlesInverse[node->name()] = title; - } - break; - case FakeNode::ExternalPage: - if (externalPageTitles.contains(title)) { - qWarning() << "DoxWriter::insertTitle():" - << "Duplicate external page title:" - << title; - } - else { - externalPageTitles[title] = node->name(); - externalPageTitlesInverse[node->name()] = title; - } - break; - default: - break; - } -} - -/*! - */ -const QString* DoxWriter::getPageFile(const QString& title) -{ - QStringMapEntry entry = pageTitles.find(title); - return (entry == pageTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExamplePath(const QString& title) -{ - QStringMapEntry entry = exampleTitles.find(title); - return (entry == exampleTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getFile(const QString& title) -{ - QStringMapEntry entry = fileTitles.find(title); - return (entry == fileTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getHeaderFile(const QString& title) -{ - QStringMapEntry entry = headerFileTitles.find(title); - return (entry == headerFileTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getGroup(const QString& title) -{ - QStringMapEntry entry = groupTitles.find(title); - return (entry == groupTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getModule(const QString& title) -{ - QStringMapEntry entry = moduleTitles.find(title); - return (entry == moduleTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExternalPage(const QString& title) -{ - QStringMapEntry entry = externalPageTitles.find(title); - return (entry == externalPageTitles.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getPageTitle(const QString& text) -{ - QStringMapEntry entry = pageTitlesInverse.find(text); - return (entry == pageTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExampleTitle(const QString& text) -{ - QStringMapEntry entry = exampleTitlesInverse.find(text); - return (entry == exampleTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getFileTitle(const QString& text) -{ - QStringMapEntry entry = fileTitlesInverse.find(text); - return (entry == fileTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getHeaderFileTitle(const QString& text) -{ - QStringMapEntry entry = headerFileTitlesInverse.find(text); - return (entry == headerFileTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getGroupTitle(const QString& text) -{ - QStringMapEntry entry = groupTitlesInverse.find(text); - return (entry == groupTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getModuleTitle(const QString& text) -{ - QStringMapEntry entry = moduleTitlesInverse.find(text); - return (entry == moduleTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - */ -const QString* DoxWriter::getExternalPageTitle(const QString& text) -{ - QStringMapEntry entry = externalPageTitlesInverse.find(text); - return (entry == externalPageTitlesInverse.end()) ? 0 : &entry.value(); -} - -/*! - Serialize \a map to file \a name. - */ -void DoxWriter::writeMap(const QStringMap& map, const QString& name) -{ - - QFile file(name); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for writing."; - return; - } - - QTextStream out(&file); - QStringMap::const_iterator i = map.constBegin(); - while (i != map.constEnd()) { - out << i.key() << "\n"; - out << i.value() << "\n"; - ++i; - } - file.close(); -} - -/*! - Read file \a name into the \a map. - */ -void DoxWriter::readMap(QStringMap& map, QStringMap& inverseMap, const QString& name) -{ - QFile file(name); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for reading."; - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString title = in.readLine(); - QString value = in.readLine(); - map[title] = value; - inverseMap[value] = title; - } - file.close(); -} - -/*! - Write the sets of titles to text files, one per line. - */ -void DoxWriter::writeTitles() -{ - if (!pageTitles.isEmpty()) - writeMap(pageTitles,"pagetitles.txt"); - if (!fileTitles.isEmpty()) - writeMap(fileTitles,"filetitles.txt"); - if (!headerFileTitles.isEmpty()) - writeMap(headerFileTitles,"headerfiletitles.txt"); - if (!exampleTitles.isEmpty()) - writeMap(exampleTitles,"exampletitles.txt"); - if (!moduleTitles.isEmpty()) - writeMap(moduleTitles,"moduletitles.txt"); - if (!groupTitles.isEmpty()) - writeMap(groupTitles,"grouptitles.txt"); - if (!externalPageTitles.isEmpty()) - writeMap(externalPageTitles,"externalpagetitles.txt"); -} - -/*! - Read the sets of titles from the titles files, one per line, - and insert each one into the appropriate title set. - */ -void DoxWriter::readTitles() -{ - readMap(pageTitles,pageTitlesInverse,"pagetitles.txt"); - readMap(fileTitles,fileTitlesInverse,"filetitles.txt"); - readMap(headerFileTitles,headerFileTitlesInverse,"headerfiletitles.txt"); - readMap(exampleTitles,exampleTitlesInverse,"exampletitles.txt"); - readMap(moduleTitles,moduleTitlesInverse,"moduletitles.txt"); - readMap(groupTitles,groupTitlesInverse,"grouptitles.txt"); - readMap(externalPageTitles, - externalPageTitlesInverse, - "externalpagetitles.txt"); -} - -/*! - Serialize \a map to file \a name. - */ -void DoxWriter::writeMultiMap(const QStringMultiMap& map, const QString& name) -{ - - QFile file(name); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for writing."; - return; - } - - QTextStream out(&file); - QStringMultiMap::const_iterator i = map.constBegin(); - while (i != map.constEnd()) { - out << i.key() << "\n"; - out << i.value() << "\n"; - ++i; - } - file.close(); -} - -/*! - Write the4 property names and variable names to text files. - */ -void DoxWriter::writeMembers() -{ - if (!variables.isEmpty()) - writeMultiMap(variables,"variables.txt"); - if (!properties.isEmpty()) - writeMultiMap(properties,"properties.txt"); - if (!enums.isEmpty()) - writeMultiMap(enums,"enums.txt"); -} - -/*! - Read file \a name into the \a map. - */ -void DoxWriter::readMultiMap(QStringMultiMap& map, const QString& name) -{ - QFile file(name); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Unable to open" << name << "for reading."; - return; - } - - QTextStream in(&file); - while (!in.atEnd()) { - QString member = in.readLine(); - QString className = in.readLine(); - map.insert(member,className); - } - file.close(); -} - -/*! - Read the property names and variable names from the test files. - */ -void DoxWriter::readMembers() -{ - readMultiMap(variables,"variables.txt"); - readMultiMap(properties,"properties.txt"); - readMultiMap(enums,"enums.txt"); -} - -/*! - Return true if \a name is a property. Loads \a classes with - the names of all the classes in which \a name is a property. - */ -bool DoxWriter::isProperty(const QString& name, QStringList& classes) -{ - classes = properties.values(name); - return !classes.isEmpty(); -} - -/*! - Return true if \a name is a variable. Loads \a classes with - the names of all the classes in which \a name is a variable. - */ -bool DoxWriter::isVariable(const QString& name, QStringList& classes) -{ - classes = variables.values(name); - return !classes.isEmpty(); -} - -/*! - Return true if \a name is an enum type. Loads \a classes with - the names of all the classes in which \a name is an enum type. - */ -bool DoxWriter::isEnum(const QString& name, QStringList& classes) -{ - classes = enums.values(name); - return !classes.isEmpty(); -} -#endif - QT_END_NAMESPACE diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h index 6cb6f0a..2c1d29e 100644 --- a/tools/qdoc3/doc.h +++ b/tools/qdoc3/doc.h @@ -133,183 +133,6 @@ class Doc DocPrivate *priv; }; -#ifdef QDOC2DOX - -class DoxWriter -{ - public: - DoxWriter(const QString& source, DocPrivate* docPrivate) - : commentType(OtherComment), - lineLength(0), - lineCount(0), - priv(docPrivate), - oldText(source) {} - ~DoxWriter() {} - - void pass1(); - void pass2(); - - static void setDoxPass(int pass); - static bool isDoxPass(int pass); - static bool isDoxPass(); - static void insertTitle(FakeNode* node, const QString& title); - static void writeTitles(); - static void readTitles(); - static void writeMembers(); - static void readMembers(); - static void writeAnchors(); - static void readAnchors(); - - private: - void indentLine(); - void newLine(); - void concatenate(QString text); - void wrap(QString text); - bool conversionRequired() const; - void convertMetaCommands(); - void convertText(); - const Atom* link(const Atom* atom); - void formattingLeft(const Atom* atom, const Atom* next); - void formattingRight(const Atom* atom, const Atom* prev); - void tt(const Atom* atom); - void formatIf(const Atom* atom); - void formatEndif(); - void formatElse(); - const Atom* sectionHeading(const Atom* atom); - void unhandled(const Atom* atom); - void code(const Atom* atom); - const Atom* codeQuoteCommand(const Atom* atom); - void writeCode(QString text); - void writeCommand(QCommandMap::const_iterator cmd); - - static void insertAnchor(const QString& text); - static bool isAnchor(const QString& text); - - static const QString* getPageFile(const QString& title); - static const QString* getFile(const QString& title); - static const QString* getExamplePath(const QString& title); - static const QString* getHeaderFile(const QString& title); - static const QString* getGroup(const QString& title); - static const QString* getModule(const QString& title); - static const QString* getExternalPage(const QString& title); - static const QString* getPageTitle(const QString& text); - static const QString* getFileTitle(const QString& text); - static const QString* getExampleTitle(const QString& text); - static const QString* getHeaderFileTitle(const QString& text); - static const QString* getGroupTitle(const QString& text); - static const QString* getModuleTitle(const QString& text); - static const QString* getExternalPageTitle(const QString& text); - - static bool isProperty(const QString& title, QStringList& classes); - static bool isVariable(const QString& title, QStringList& classes); - static bool isEnum(const QString& title, QStringList& classes); - - private: - static void writeMap(const QStringMap& map, const QString& name); - static void readMap(QStringMap& map, - QStringMap& inverseMap, - const QString& name); - static void writeMultiMap(const QStringMultiMap& map, const QString& name); - static void readMultiMap(QStringMultiMap& map, const QString& name); - - public: // VS 6, SunCC need this to be public - enum StructType { BulletList, NumericList, ValueList, Table }; - private: - struct StructDesc { - StructType structType; - int count; - bool nested; - bool inTableHeader; - bool inTableRow; - bool inTableItem; - bool odd; - - StructDesc() - : structType(BulletList), - count(0), - nested(false), - inTableHeader(false), - inTableRow(false), - inTableItem(false), - odd(true) { } - - StructDesc(StructType t, bool n) - : structType(t), - count(0), - nested(n), - inTableHeader(false), - inTableRow(false), - inTableItem(false), - odd(true) { } - }; - - typedef QStack<StructDesc> StructStack; - - enum CommentType { - ClassComment, - EnumComment, - ExampleComment, - FnComment, - GroupComment, - HeaderFileComment, - MacroComment, - ModuleComment, - PageComment, - PropertyComment, - ServiceComment, - TypedefComment, - VariableComment, - OtherComment - }; - - private: - CommentType commentType; - int lineLength; - int lineCount; - DocPrivate* priv; - QString oldText; - QString newText; - StructStack structs; - - QString currentPage; - QString currentFn; - QString currentTitle; - QString currentEnum; - QString currentProperty; - QString currentVariable; - QString currentExample; - QString currentGroup; - QString currentModule; - QString currentMacro; - QString currentService; - QString currentTypedef; - QString currentHeaderFile; - static QString currentClass; - - static int doxPass; - static QSet<QString> anchors; - static QStringMap exampleTitles; - static QStringMap headerFileTitles; - static QStringMap fileTitles; - static QStringMap groupTitles; - static QStringMap moduleTitles; - static QStringMap pageTitles; - static QStringMap externalPageTitles; - static QStringMap exampleTitlesInverse; - static QStringMap headerFileTitlesInverse; - static QStringMap fileTitlesInverse; - static QStringMap groupTitlesInverse; - static QStringMap moduleTitlesInverse; - static QStringMap pageTitlesInverse; - static QStringMap externalPageTitlesInverse; - - static QStringMultiMap variables; - static QStringMultiMap properties; - static QStringMultiMap enums; -}; - -#endif - QT_END_NAMESPACE #endif diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 798cbb5..e2e6950 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2207,18 +2207,14 @@ void HtmlGenerator::generateSectionList(const Section& section, else { if (twoColumn && i == (int) (section.members.count() + 1) / 2) out() << "</ul></td><td valign=\"top\"><ul>\n"; - out() << "<li><div class=\"fn\"></div>"; + out() << "<li><div class=\"fn\">"; } - if (style == CodeMarker::Accessors) - out() << "<b>"; generateSynopsis(*m, relative, marker, style, name_alignment); - if (style == CodeMarker::Accessors) - out() << "</b>"; if (name_alignment) out() << "</td></tr>\n"; else - out() << "</li>\n"; + out() << "</div></li>\n"; i++; ++m; } @@ -2283,8 +2279,10 @@ void HtmlGenerator::generateSynopsis(const Node *node, marked.replace("<@param>", "<i>"); marked.replace("</@param>", "</i>"); - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); + if (style == CodeMarker::Summary) { + marked.replace("<@name>", ""); // was "<b>" + marked.replace("</@name>", ""); // was "</b>" + } if (style == CodeMarker::SeparateList) { QRegExp extraRegExp("<@extra>.*</@extra>"); @@ -3090,7 +3088,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, section.members += property->resetters(); if (!section.members.isEmpty()) { - out() << "<p>Access functions:</p>\n"; + out() << "<p><b>Access functions:</b></p>\n"; generateSectionList(section, node, marker, CodeMarker::Accessors); } } diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 3e6f832..514d06e 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -43,6 +43,7 @@ main.cpp */ +#include <qglobal.h> #include <QtCore> #include <stdlib.h> #include "apigenerator.h" @@ -97,8 +98,6 @@ static bool slow = false; static QStringList defines; static QHash<QString, Tree *> trees; -//static int doxygen = 0; - /*! Find the Tree for language \a lang and return a pointer to it. If there is no Tree for language \a lang in the Tree table, add @@ -136,7 +135,8 @@ static void printHelp() */ static void printVersion() { - Location::information(tr("qdoc version 4.4.1")); + QString s = QString(tr("qdoc version ")) + QString(QT_VERSION_STR); + Location::information(s); } /*! @@ -222,18 +222,6 @@ static void processQdocconfFile(const QString &fileName) QString lang = config.getString(CONFIG_LANGUAGE); Location langLocation = config.lastLocation(); -#ifdef QDOC2DOX - // qdoc -> doxygen - if (doxygen == 2) { - qDebug() << "READING anchors.txt"; - DoxWriter::readAnchors(); - qDebug() << "READING title maps"; - DoxWriter::readTitles(); - qDebug() << "READING member multimaps"; - DoxWriter::readMembers(); - } -#endif - /* Initialize the tree where all the parsed sources will be stored. The tree gets built as the source files are parsed, and then the @@ -320,17 +308,6 @@ static void processQdocconfFile(const QString &fileName) tree->resolveGroups(); tree->resolveTargets(); -#ifdef QDOC2DOX - // qdoc -> doxygen - if (doxygen == 1) { - DoxWriter::writeAnchors(); - DoxWriter::writeTitles(); - DoxWriter::writeMembers(); - } - - if (doxygen == 0) { -#endif - /* Now the tree has been built, and all the stuff that needed resolving has been resolved. Now it is time to traverse @@ -355,11 +332,6 @@ static void processQdocconfFile(const QString &fileName) tree->setVersion(""); Generator::terminate(); - -#ifdef QDOC2DOX - } -#endif - CodeParser::terminate(); CodeMarker::terminate(); CppToQsConverter::terminate(); @@ -454,26 +426,6 @@ int main(int argc, char **argv) else if (opt == "-slow") { slow = true; } - -#ifdef QDOC2DOX - else if (opt == "-doxygen1") { - // qdoc -> doxygen - // Don't use this; it isn't ready yet. - // Now it's a fossil. - qDebug() << "doxygen pass 1"; - doxygen = 1; - DoxWriter::setDoxPass(1); - } - else if (opt == "-doxygen2") { - // qdoc -> doxygen - // Don't use this; it isn't ready yet. - // Now it's a fossil. - qDebug() << "doxygen pass 2"; - doxygen = 2; - DoxWriter::setDoxPass(2); - } -#endif - else { qdocFiles.append(opt); } diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 22f1668..a6c2652 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -125,10 +125,10 @@ table.annotated td { table tr pre { - padding-top: none; - padding-bottom: none; - padding-left: none; - padding-right: none; + padding-top: 0px; + padding-bottom: 0px; + padding-left: 0px; + padding-right: 0px; border: none; background: none } diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.cpp b/tools/shared/qttoolbardialog/qttoolbardialog.cpp index f15c4bc..9c54e75 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.cpp +++ b/tools/shared/qttoolbardialog/qttoolbardialog.cpp @@ -637,10 +637,10 @@ QToolBar *QtFullToolBarManager::createToolBar(const QString &toolBarName) return 0; QToolBar *toolBar = new QToolBar(toolBarName, mainWindow()); int i = 1; - const QString prefix = QLatin1String("_Custom_Toolbar_"); - QString name = QString(QLatin1String("%1%2")).arg(prefix).arg(i); + const QString prefix = QLatin1String("_Custom_Toolbar_%1"); + QString name = prefix.arg(i); while (d_ptr->toolBarByName(name)) - name = QString(QLatin1String("%1%2")).arg(prefix).arg(++i); + name = prefix.arg(++i); toolBar->setObjectName(name); mainWindow()->addToolBar(toolBar); d_ptr->customToolBars.append(toolBar); diff --git a/translations/assistant_da.ts b/translations/assistant_da.ts new file mode 100644 index 0000000..8d134fc --- /dev/null +++ b/translations/assistant_da.ts @@ -0,0 +1,1166 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="da"> +<context> + <name>AboutDialog</name> + <message> + <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/> + <source>&Close</source> + <translation>&Luk</translation> + </message> +</context> +<context> + <name>AboutLabel</name> + <message> + <location line="-14"/> + <source>Warning</source> + <translation>Advarsel</translation> + </message> + <message> + <location line="+1"/> + <source>Unable to launch external application. +</source> + <translation>Kunne ikke starte ekstern applikation. +</translation> + </message> + <message> + <location line="+1"/> + <source>OK</source> + <translation></translation> + </message> +</context> +<context> + <name>BookmarkDialog</name> + <message> + <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+185"/> + <location line="+18"/> + <location line="+36"/> + <location line="+24"/> + <location line="+32"/> + <source>Bookmarks</source> + <translation>Favoritter</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/> + <source>Add Bookmark</source> + <translation>Føj til Favoritter</translation> + </message> + <message> + <location/> + <source>Bookmark:</source> + <translation>Favorit:</translation> + </message> + <message> + <location/> + <source>Add in Folder:</source> + <translation>Føj til mappen:</translation> + </message> + <message> + <location/> + <source>+</source> + <translation></translation> + </message> + <message> + <location/> + <source>New Folder</source> + <translation>Ny mappe</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="-69"/> + <source>Delete Folder</source> + <translation>Slet mappe</translation> + </message> + <message> + <location line="+1"/> + <source>Rename Folder</source> + <translation>Omdøb mappe</translation> + </message> +</context> +<context> + <name>BookmarkManager</name> + <message> + <location line="+450"/> + <source>Bookmarks</source> + <translation>Favoritter</translation> + </message> + <message> + <location line="+36"/> + <source>Remove</source> + <translation>Fjern</translation> + </message> + <message> + <location line="+1"/> + <source>You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue?</source> + <translation>Ved at slette denne mappe fjernes hele mappens<br>indhold. Ønsker du alligevel at slette?</translation> + </message> + <message> + <location line="+109"/> + <location line="+9"/> + <source>New Folder</source> + <translation>Ny mappe</translation> + </message> + <message> + <source>You are about to delete a folder which means that its content<br>will also be removed. Do you want to continue?</source> + <translation type="obsolete">Ved at slette denne mappe fjernes hele mappens indhold.<br>Ønsker du alligevel at slette?</translation> + </message> +</context> +<context> + <name>BookmarkWidget</name> + <message> + <location line="-391"/> + <source>Filter:</source> + <translation>Filter:</translation> + </message> + <message> + <location line="+32"/> + <source>Remove</source> + <translation>Fjern</translation> + </message> + <message> + <location line="-78"/> + <source>Delete Folder</source> + <translation>Slet mappe</translation> + </message> + <message> + <location line="+1"/> + <source>Rename Folder</source> + <translation>Omdøb mappe</translation> + </message> + <message> + <location line="+2"/> + <source>Show Bookmark</source> + <translation>Vis favorit</translation> + </message> + <message> + <location line="+1"/> + <source>Show Bookmark in New Tab</source> + <translation>Vis favorit på ny fane</translation> + </message> + <message> + <location line="+3"/> + <source>Delete Bookmark</source> + <translation>Slet favorit</translation> + </message> + <message> + <location line="+1"/> + <source>Rename Bookmark</source> + <translation>Omdøb favorit</translation> + </message> + <message> + <source>Search for:</source> + <translation type="obsolete">Søg efter:</translation> + </message> + <message> + <location line="+61"/> + <source>Add</source> + <translation>Tilføj</translation> + </message> +</context> +<context> + <name>CentralWidget</name> + <message> + <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+208"/> + <source>Add new page</source> + <translation>Tilføj ny side</translation> + </message> + <message> + <location line="+9"/> + <source>Close current page</source> + <translation>Luk nuværende side</translation> + </message> + <message> + <location line="+282"/> + <source>Print Document</source> + <translation>Udskriv dokument</translation> + </message> + <message> + <location line="+148"/> + <location line="+2"/> + <source>unknown</source> + <translation>ukendt</translation> + </message> + <message> + <location line="+91"/> + <source>Add New Page</source> + <translation>Tilføj ny side</translation> + </message> + <message> + <location line="+3"/> + <source>Close This Page</source> + <translation>Luk denne side</translation> + </message> + <message> + <location line="+3"/> + <source>Close Other Pages</source> + <translation>Luk de andre sider</translation> + </message> + <message> + <location line="+5"/> + <source>Add Bookmark for this Page...</source> + <translation>Føj denne side til Favoritter...</translation> + </message> + <message> + <location line="+259"/> + <source>Search</source> + <translation>Søg</translation> + </message> +</context> +<context> + <name>ContentWindow</name> + <message> + <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+155"/> + <source>Open Link</source> + <translation>Åbn link</translation> + </message> + <message> + <location line="+1"/> + <source>Open Link in New Tab</source> + <translation>Åbn link på ny fane</translation> + </message> +</context> +<context> + <name>FilterNameDialogClass</name> + <message> + <source>FilterNameDialog</source> + <translation type="obsolete">FilterNavnDialog</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/filternamedialog.ui"/> + <source>Filter Name:</source> + <translation>Filternavn:</translation> + </message> + <message> + <location/> + <source>Add Filter Name</source> + <translation>Tilføj filternavn</translation> + </message> +</context> +<context> + <name>FindWidget</name> + <message> + <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-876"/> + <source><img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped</source> + <translation><img src=":/trolltech/assistant/images/wrap.png">&nbsp;Søgning gentaget fra start</translation> + </message> + <message> + <location line="-23"/> + <source>Previous</source> + <translation>Forrige</translation> + </message> + <message> + <location line="+4"/> + <source>Next</source> + <translation>Næste</translation> + </message> + <message> + <location line="+4"/> + <source>Case Sensitive</source> + <translation>Der skelnes mellem store og små bogstaver</translation> + </message> + <message> + <location line="+3"/> + <source>Whole words</source> + <translation>Hele ord</translation> + </message> + <message> + <source><img src="%1">&nbsp;Search wrapped</source> + <oldsource><img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped</oldsource> + <translation type="obsolete"><img src="%1">&nbsp;Søgning startet forfra</translation> + </message> +</context> +<context> + <name>FontPanel</name> + <message> + <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/> + <source>Font</source> + <translation>Skrifttype</translation> + </message> + <message> + <location line="+11"/> + <source>&Writing system</source> + <translation>&Skrivesystem</translation> + </message> + <message> + <location line="+3"/> + <source>&Family</source> + <translation>&Familie</translation> + </message> + <message> + <location line="+4"/> + <source>&Style</source> + <translation>&Stil</translation> + </message> + <message> + <location line="+4"/> + <source>&Point size</source> + <translation>&Punktstørrelse</translation> + </message> +</context> +<context> + <name>HelpViewer</name> + <message> + <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+492"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="+1"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location line="-62"/> + <source><title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div></source> + <translation><title>Fejl 404...</title><div align="center"><br><br><h1>Siden blev ikke fundet</h1><br><h3>'%1'</h3></div></translation> + </message> + <message> + <location line="+125"/> + <source>Copy &Link Location</source> + <translation>Kopiér &linkets placering</translation> + </message> + <message> + <location line="+3"/> + <source>Open Link in New Tab Ctrl+LMB</source> + <translation>Åbn link på ny fane Ctrl+LMB</translation> + </message> + <message> + <location line="-275"/> + <source>Open Link in New Tab</source> + <translation>Åbn link på ny fane</translation> + </message> + <message> + <source><b>Page not found:<p>%1.</p></b></source> + <translation type="obsolete"><b>Kunne ikke finde siden:<p>%1.</p></b></translation> + </message> + <message> + <location line="+209"/> + <source>Unable to launch external application. +</source> + <translation>Kunne ikke starte ekstern applikation. +</translation> + </message> +</context> +<context> + <name>IndexWindow</name> + <message> + <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/> + <source>&Look for:</source> + <translation>&Søg efter:</translation> + </message> + <message> + <location line="+68"/> + <source>Open Link</source> + <translation>Åbn link</translation> + </message> + <message> + <location line="+1"/> + <source>Open Link in New Tab</source> + <translation>Åbn link på ny fane</translation> + </message> +</context> +<context> + <name>InstallDialog</name> + <message> + <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+75"/> + <location filename="../tools/assistant/tools/assistant/installdialog.ui"/> + <source>Install Documentation</source> + <translation>Installér dokumentation</translation> + </message> + <message> + <location line="+30"/> + <source>Downloading documentation info...</source> + <translation>Downloader dokumentationsinformation...</translation> + </message> + <message> + <location line="+48"/> + <source>Download canceled.</source> + <translation>Download blev annulleret.</translation> + </message> + <message> + <location line="+26"/> + <location line="+78"/> + <location line="+27"/> + <source>Done.</source> + <translation>Færdig.</translation> + </message> + <message> + <location line="-90"/> + <source>The file %1 already exists. Do you want to overwrite it?</source> + <translation>Filen %1 findes allerede. Ønsker du at overskrive?</translation> + </message> + <message> + <location line="+11"/> + <source>Unable to save the file %1: %2.</source> + <translation>Kunne ikke gemme filen %1: %2.</translation> + </message> + <message> + <location line="+8"/> + <source>Downloading %1...</source> + <translation>Downloader %1...</translation> + </message> + <message> + <location line="+19"/> + <location line="+42"/> + <location line="+38"/> + <source>Download failed: %1.</source> + <translation>Download mislykkedes: %1.</translation> + </message> + <message> + <location line="-70"/> + <source>Documentation info file is corrupt!</source> + <translation>Dokumentationsinformationsfilen er ødelagt!</translation> + </message> + <message> + <location line="+37"/> + <source>Download failed: Downloaded file is corrupted.</source> + <translation>Download mislykkedes: Den downloadede fil er ødelagt.</translation> + </message> + <message> + <location line="+2"/> + <source>Installing documentation %1...</source> + <translation>Installerer dokumentation %1...</translation> + </message> + <message> + <location line="+22"/> + <source>Error while installing documentation: +%1</source> + <translation>Der opstod fejl under installation af dokumentation: +%1</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/installdialog.ui"/> + <source>Available Documentation:</source> + <translation>Tilgængeligt dokumentation:</translation> + </message> + <message> + <location/> + <source>Install</source> + <translation>Installér</translation> + </message> + <message> + <location/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location/> + <source>Installation Path:</source> + <translation>Installationssti:</translation> + </message> + <message> + <location/> + <source>...</source> + <translation></translation> + </message> +</context> +<context> + <name>MainWindow</name> + <message> + <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+108"/> + <location line="+354"/> + <source>Index</source> + <translation>Indeks</translation> + </message> + <message> + <location line="-348"/> + <location line="+346"/> + <source>Contents</source> + <translation>Indhold</translation> + </message> + <message> + <location line="-341"/> + <location line="+345"/> + <source>Bookmarks</source> + <translation>Favoritter</translation> + </message> + <message> + <location line="+2"/> + <source>Search</source> + <translation>Søg</translation> + </message> + <message> + <location line="-335"/> + <location line="+208"/> + <location line="+476"/> + <source>Qt Assistant</source> + <translation></translation> + </message> + <message> + <location line="-508"/> + <location line="+5"/> + <source>Unfiltered</source> + <translation>Ufiltreret</translation> + </message> + <message> + <location line="+84"/> + <source>Page Set&up...</source> + <translation>Side&opsætning...</translation> + </message> + <message> + <location line="+2"/> + <source>Print Preview...</source> + <translation>Vis udskrift...</translation> + </message> + <message> + <location line="+3"/> + <source>&Print...</source> + <translation>&Udskriv...</translation> + </message> + <message> + <source>CTRL+P</source> + <translation type="obsolete">Ctrl+U</translation> + </message> + <message> + <location line="+6"/> + <source>New &Tab</source> + <translation>&Ny Fane</translation> + </message> + <message> + <source>CTRL+T</source> + <translation type="obsolete">Ctrl+N</translation> + </message> + <message> + <location line="+3"/> + <source>&Close Tab</source> + <translation>&Luk fane</translation> + </message> + <message> + <source>CTRL+W</source> + <translation type="obsolete">Ctrl+L</translation> + </message> + <message> + <location line="+4"/> + <source>&Quit</source> + <translation>&Afslut</translation> + </message> + <message> + <location line="+1"/> + <source>CTRL+Q</source> + <translation>Ctrl+A</translation> + </message> + <message> + <location line="+4"/> + <source>&Copy selected Text</source> + <translation>&Kopiér markeret tekst</translation> + </message> + <message> + <source>Ctrl+C</source> + <translation type="obsolete">Ctrl+K</translation> + </message> + <message> + <location line="+6"/> + <source>&Find in Text...</source> + <translation>&Find i tekst...</translation> + </message> + <message> + <location line="+5"/> + <source>Find &Next</source> + <translation>Find N&æste</translation> + </message> + <message> + <location line="+4"/> + <source>Find &Previous</source> + <translation>Find fo&rrige</translation> + </message> + <message> + <location line="+5"/> + <source>Preferences...</source> + <translation>Indstillinger...</translation> + </message> + <message> + <location line="+4"/> + <source>Zoom &in</source> + <translation>Zoom &ind</translation> + </message> + <message> + <location line="+5"/> + <source>Zoom &out</source> + <translation>Zoom u&d</translation> + </message> + <message> + <location line="+5"/> + <source>Normal &Size</source> + <translation>Normal &størrelse</translation> + </message> + <message> + <location line="+3"/> + <source>Ctrl+0</source> + <translation></translation> + </message> + <message> + <location line="+5"/> + <source>ALT+C</source> + <translation></translation> + </message> + <message> + <location line="+2"/> + <source>ALT+I</source> + <translation></translation> + </message> + <message> + <location line="+4"/> + <source>ALT+S</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>&Home</source> + <translation>&Hjem</translation> + </message> + <message> + <location line="+1"/> + <source>Ctrl+Home</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>&Back</source> + <translation>&Tilbage</translation> + </message> + <message> + <location line="+5"/> + <source>&Forward</source> + <translation>Fr&em</translation> + </message> + <message> + <location line="+5"/> + <source>Sync with Table of Contents</source> + <translation>Synkronisér med Indholdsfortegnelse</translation> + </message> + <message> + <location line="+6"/> + <source>Next Page</source> + <translation>Næste side</translation> + </message> + <message> + <location line="+1"/> + <source>Ctrl+Alt+Right</source> + <translation>Ctrl+Alt+Højre</translation> + </message> + <message> + <location line="+3"/> + <source>Previous Page</source> + <translation>Forrige side</translation> + </message> + <message> + <location line="+1"/> + <source>Ctrl+Alt+Left</source> + <translation>Ctrl+Alt+Venstre</translation> + </message> + <message> + <location line="+4"/> + <source>Add Bookmark...</source> + <translation>Føj til Favoritter...</translation> + </message> + <message> + <location line="+4"/> + <source>About...</source> + <translation>Om...</translation> + </message> + <message> + <location line="+3"/> + <source>Navigation Toolbar</source> + <translation>Navigationsværktøjslinie</translation> + </message> + <message> + <location line="+76"/> + <source>Toolbars</source> + <translation>Værktøjslinier</translation> + </message> + <message> + <location line="+15"/> + <source>Filter Toolbar</source> + <translation>Filtrer værktøjslinie</translation> + </message> + <message> + <location line="+2"/> + <source>Filtered by:</source> + <translation>Filtreret efter:</translation> + </message> + <message> + <location line="+23"/> + <source>Address Toolbar</source> + <translation>Adresseværktøjslinie</translation> + </message> + <message> + <location line="+4"/> + <source>Address:</source> + <translation>Adresse:</translation> + </message> + <message> + <location line="+114"/> + <source>Could not find the associated content item.</source> + <translation>Det tilhørende indholdselement kunne ikke findes.</translation> + </message> + <message> + <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source> + <translation type="obsolete">Denne version af Qt Assistant er en del af Qt Open Source Edition til brug med henblik på udvikling af Open Source-applikationer. Qt er et omfattende C++ framework for cross-platform applikationsudvikling.</translation> + </message> + <message> + <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source> + <translation type="obsolete">Dette program er omfattet af Qt Commercial License Agreement. Se filen LICENCE, der var vedlagt denne software-distribution, for yderligere detaljer.</translation> + </message> + <message> + <location line="+81"/> + <source>About %1</source> + <translation>Om %1</translation> + </message> + <message> + <location line="+113"/> + <source>Updating search index</source> + <translation>Opdaterer søgeindeks</translation> + </message> + <message> + <location line="-601"/> + <source>Looking for Qt Documentation...</source> + <translation>Søger efter Qt-dokumentation...</translation> + </message> + <message> + <location line="+195"/> + <source>&Window</source> + <translation>&Vindue</translation> + </message> + <message> + <location line="+3"/> + <source>Minimize</source> + <translation>Minimér</translation> + </message> + <message> + <location line="+1"/> + <source>Ctrl+M</source> + <translation>Ctrl+M</translation> + </message> + <message> + <location line="-2"/> + <source>Zoom</source> + <translation></translation> + </message> + <message> + <location line="-136"/> + <source>&File</source> + <translation>&Filer</translation> + </message> + <message> + <location line="+24"/> + <source>&Edit</source> + <translation>&Redigér</translation> + </message> + <message> + <location line="+24"/> + <source>&View</source> + <translation>&Vis</translation> + </message> + <message> + <location line="+27"/> + <source>&Go</source> + <translation>&Gå til</translation> + </message> + <message> + <location line="+29"/> + <source>&Bookmarks</source> + <translation>F&avoritter</translation> + </message> + <message> + <location line="+4"/> + <source>&Help</source> + <translation>&Hjælp</translation> + </message> + <message> + <location line="-37"/> + <source>ALT+O</source> + <translation>Alt+F</translation> + </message> + <message> + <location line="+35"/> + <source>CTRL+D</source> + <translation>Ctrl+Ø</translation> + </message> + <message> + <source>Ctrl+P</source> + <translation type="obsolete">Ctrl+U</translation> + </message> + <message> + <source>Ctrl+T</source> + <translation type="obsolete">Ctrl+N</translation> + </message> + <message> + <source>Ctrl+W</source> + <translation type="obsolete">Ctrl+L</translation> + </message> + <message> + <source>Ctrl+Q</source> + <translation type="obsolete">Ctrl+A</translation> + </message> + <message> + <source>Alt+C</source> + <translation type="obsolete">Alt+L</translation> + </message> + <message> + <source>Alt+O</source> + <translation type="obsolete">Alt+F</translation> + </message> + <message> + <source>Ctrl+D</source> + <translation type="obsolete">Ctrl+Ø</translation> + </message> +</context> +<context> + <name>PreferencesDialog</name> + <message> + <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+256"/> + <location line="+43"/> + <source>Add Documentation</source> + <translation>Tilføj dokumentation</translation> + </message> + <message> + <location line="-43"/> + <source>Qt Compressed Help Files (*.qch)</source> + <translation>Qt komprimeret hjælpefil (*.qch)</translation> + </message> + <message> + <location line="+37"/> + <source>The specified file is not a valid Qt Help File!</source> + <translation>Den anførte fil er ikke en gyldig Qt hjælpefil!</translation> + </message> + <message> + <location line="-8"/> + <source>The namespace %1 is already registered!</source> + <translation>Navnerummet %1 er allerede registreret!</translation> + </message> + <message> + <location line="+31"/> + <source>Remove Documentation</source> + <translation>Fjern dokumentation</translation> + </message> + <message> + <location line="+1"/> + <source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source> + <translation>Nogle dokumenter der pt er åbne i Assistant refererer til den dokumentation du prøver at fjerne. Fjernelse af dokumentation vil resultere i lukning af disse dokumenter.</translation> + </message> + <message> + <location line="+2"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location line="+1"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location line="+86"/> + <source>Use custom settings</source> + <translation>Benyt brugerdefineret opsætning</translation> + </message> +</context> +<context> + <name>PreferencesDialogClass</name> + <message> + <location filename="../tools/assistant/tools/assistant/preferencesdialog.ui"/> + <source>Preferences</source> + <translation>Indstillinger</translation> + </message> + <message> + <location/> + <source>Fonts</source> + <translation>Skrifttyper</translation> + </message> + <message> + <location/> + <source>Font settings:</source> + <translation>Indstillinger for skrifttype:</translation> + </message> + <message> + <location/> + <source>Browser</source> + <translation></translation> + </message> + <message> + <location/> + <source>Application</source> + <translation>Applikation</translation> + </message> + <message> + <location/> + <source>Filters</source> + <translation>Filtre</translation> + </message> + <message> + <location/> + <source>Filter:</source> + <translation>Filter:</translation> + </message> + <message> + <location/> + <source>Attributes:</source> + <translation>Attributter:</translation> + </message> + <message> + <location/> + <source>1</source> + <translation></translation> + </message> + <message> + <location/> + <source>Add</source> + <translation>Tilføj</translation> + </message> + <message> + <location/> + <source>Remove</source> + <translation>Fjern</translation> + </message> + <message> + <location/> + <source>Documentation</source> + <translation>Dokumentation</translation> + </message> + <message> + <location/> + <source>Registered Documentation:</source> + <translation>Registreret dokumentation:</translation> + </message> + <message> + <location/> + <source>Add...</source> + <translation>Tilføj...</translation> + </message> + <message> + <source>Network</source> + <translation type="obsolete">Netværk</translation> + </message> + <message> + <source>Use Http Proxy</source> + <translation type="obsolete">Benyt Http Proxy</translation> + </message> + <message> + <location/> + <source>Options</source> + <translation>Indstillinger</translation> + </message> + <message> + <location/> + <source>Homepage</source> + <translation>Hjemmeside</translation> + </message> + <message> + <location/> + <source>Current Page</source> + <translation>Nuværende side</translation> + </message> + <message> + <location/> + <source>Restore to default</source> + <translation>Nulstil til default</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/> + <source>The specified collection file does not exist!</source> + <translation>Den angivne hjælpesamling findes ikke!</translation> + </message> + <message> + <location line="+4"/> + <source>Missing collection file!</source> + <translation>Hjælpesamling mangler!</translation> + </message> + <message> + <location line="+9"/> + <source>Invalid URL!</source> + <translation>Ugyldig URL!</translation> + </message> + <message> + <location line="+4"/> + <source>Missing URL!</source> + <translation>URL mangler!</translation> + </message> + <message> + <location line="+17"/> + <location line="+19"/> + <location line="+19"/> + <source>Unknown widget: %1</source> + <translation>Ukendt widget: %1</translation> + </message> + <message> + <location line="-34"/> + <location line="+19"/> + <location line="+19"/> + <source>Missing widget!</source> + <translation>Widget mangler!</translation> + </message> + <message> + <location line="+7"/> + <location line="+12"/> + <source>The specified Qt help file does not exist!</source> + <translation>Den angivne Qt-hjælpefil findes ikke! </translation> + </message> + <message> + <location line="-7"/> + <location line="+12"/> + <source>Missing help file!</source> + <translation>Hjælpefilen mangler! </translation> + </message> + <message> + <location line="+7"/> + <source>Missing filter argument!</source> + <translation>Manglende filterargument!</translation> + </message> + <message> + <location line="+12"/> + <source>Unknown option: %1</source> + <translation>Ukendt parameter: %1 </translation> + </message> + <message> + <location line="+30"/> + <location line="+2"/> + <source>Qt Assistant</source> + <translation></translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/main.cpp" line="+203"/> + <source>Could not register documentation file +%1 + +Reason: +%2</source> + <translation>Kunne ikke registrere dokumentationsfil +%1 + +Årsag: +%2</translation> + </message> + <message> + <location line="+4"/> + <source>Documentation successfully registered.</source> + <translation>Dokumentationen blev registreret.</translation> + </message> + <message> + <location line="+11"/> + <source>Could not unregister documentation file +%1 + +Reason: +%2</source> + <translation>Kunne ikke afregistrere dokumentationsfil +%1 + +Årsag: +%2</translation> + </message> + <message> + <location line="-3"/> + <source>Documentation successfully unregistered.</source> + <translation>Dokumentationen blev afregistreret.</translation> + </message> + <message> + <location line="+40"/> + <source>Cannot load sqlite database driver!</source> + <translation>Kan ikke indlæse sqlite database-driver!</translation> + </message> + <message> + <location line="+9"/> + <source>The specified collection file could not be read!</source> + <translation>Den angivne hjælpesamling kunne ikke læses!</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+167"/> + <location line="+1"/> + <source>Bookmark</source> + <translation>Favorit</translation> + </message> +</context> +<context> + <name>QtDocInstaller</name> + <message> + <source>The file %1 could not be registered successfully! + +Reason: %2</source> + <translation type="obsolete">Filen %1 kunne ikke registreres! + +Årsag: %2</translation> + </message> +</context> +<context> + <name>RemoteControl</name> + <message> + <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+157"/> + <source>Debugging Remote Control</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Received Command: %1 %2</source> + <translation>Modtaget kommando: %1 %2</translation> + </message> +</context> +<context> + <name>SearchWidget</name> + <message> + <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+195"/> + <source>&Copy</source> + <translation>&Kopiér</translation> + </message> + <message> + <location line="+4"/> + <source>Copy &Link Location</source> + <translation>Kopiér &linkets placering</translation> + </message> + <message> + <location line="+4"/> + <source>Open Link in New Tab</source> + <translation>Åbn link på ny fane</translation> + </message> + <message> + <location line="+8"/> + <source>Select All</source> + <translation>Markér alt</translation> + </message> + <message> + <source>Open Link</source> + <translation type="obsolete">Åbn link</translation> + </message> +</context> +<context> + <name>TopicChooser</name> + <message> + <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/> + <source>Choose a topic for <b>%1</b>:</source> + <translation>Vælg et emne for <b>%1</b>:</translation> + </message> + <message> + <location filename="../tools/assistant/tools/assistant/topicchooser.ui"/> + <source>Choose Topic</source> + <translation>Vælg emne</translation> + </message> + <message> + <location/> + <source>&Topics</source> + <translation>&Emner</translation> + </message> + <message> + <location/> + <source>&Display</source> + <translation>&Vis</translation> + </message> + <message> + <location/> + <source>&Close</source> + <translation>&Luk</translation> + </message> + <message> + <source>TopicChooser</source> + <translation type="obsolete">Emnevælger</translation> + </message> + <message> + <source>unnamed</source> + <translation type="obsolete">unavngivet</translation> + </message> +</context> +</TS> diff --git a/translations/linguist_ja.qm b/translations/linguist_ja.qm Binary files differindex cdb7c1c..a377318 100644 --- a/translations/linguist_ja.qm +++ b/translations/linguist_ja.qm diff --git a/translations/linguist_ja.ts b/translations/linguist_ja.ts index 7af3ebb..685af88 100644 --- a/translations/linguist_ja.ts +++ b/translations/linguist_ja.ts @@ -6,7 +6,7 @@ <message> <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+59"/> <source>(New Entry)</source> - <translation type="unfinished"></translation> + <translation>(新しい項目)</translation> </message> </context> <context> @@ -48,74 +48,74 @@ <message> <location line="-37"/> <source>Batch Translation of '%1' - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>'%1' の一括翻訳 - Qt Linguist</translation> </message> <message numerus="yes"> <location line="+80"/> <source>Batch translated %n entries</source> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform>%n 項目が一括翻訳されました</numerusform> </translation> </message> <message> <location filename="../tools/linguist/linguist/batchtranslation.ui"/> <source>Qt Linguist - Batch Translation</source> - <translation type="unfinished">Qt Linguist - 一括翻訳</translation> + <translation>Qt Linguist - 一括翻訳</translation> </message> <message> <location/> <source>Options</source> - <translation type="unfinished">オプション</translation> + <translation>オプション</translation> </message> <message> <location/> <source>Set translated entries to finished</source> - <translation type="unfinished">翻訳された項目を完了にする</translation> + <translation>翻訳された項目を完了にする</translation> </message> <message> <location/> <source>Retranslate entries with existing translation</source> - <translation type="unfinished"></translation> + <translation>訳語がある項目を再度翻訳する</translation> </message> <message> <location/> <source>Note that the modified entries will be reset to unfinished if 'Set translated entries to finished' above is unchecked.</source> - <translation type="unfinished"></translation> + <translation>注意:'翻訳された項目を完了にする'にチェックがついていない場合、翻訳された項目は未完了になります.</translation> </message> <message> <location/> <source>Translate also finished entries</source> - <translation type="unfinished"></translation> + <translation>完了している項目も翻訳する</translation> </message> <message> <location/> <source>Phrase book preference</source> - <translation type="unfinished">フレーズブックの優先度</translation> + <translation>フレーズブックの設定</translation> </message> <message> <location/> <source>Move up</source> - <translation type="unfinished">上に移動</translation> + <translation>上に移動</translation> </message> <message> <location/> <source>Move down</source> - <translation type="unfinished">下に移動</translation> + <translation>下に移動</translation> </message> <message> <location/> <source>The batch translator will search through the selected phrase books in the order given above.</source> - <translation type="unfinished"></translation> + <translation>一括翻訳機能は、上記で選択された順にフレーズブックを検索します。</translation> </message> <message> <location/> <source>&Run</source> - <translation type="unfinished">実行(&R)</translation> + <translation>実行(&R)</translation> </message> <message> <location/> <source>Cancel</source> - <translation type="unfinished">キャンセル</translation> + <translation>キャンセル</translation> </message> </context> <context> @@ -138,38 +138,39 @@ <message> <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+214"/> <source><qt>Duplicate messages found in '%1':</source> - <translation type="unfinished"></translation> + <translation><qt>'%1' に重複したメッセージが見つかりました:</translation> </message> <message> <location line="+4"/> <source><p>[more duplicates omitted]</source> - <translation type="unfinished"></translation> + <translation><p>[さらに重複している部分は省略されました]</translation> </message> <message> <location line="+3"/> <source><p>* Context: %1<br>* Source: %2</source> - <translation type="unfinished"></translation> + <translation><p>* コンテキスト: %1<br>* ソーステキスト: %2</translation> </message> <message> <location line="+3"/> <source><br>* Comment: %3</source> - <translation type="unfinished"></translation> + <translation><br>* コメント: %3</translation> </message> <message> <location line="+70"/> <source>Linguist does not know the plural rules for '%1'. Will assume a single universal form.</source> - <translation type="unfinished"></translation> + <translation>Linguist は'%1'の複数のルールを知りません。 +単一の共通形式とみなします。</translation> </message> <message> <location line="+56"/> <source>Cannot create '%2': %1</source> - <translation type="unfinished"></translation> + <translation>'%2' を作成できません: %1</translation> </message> <message> <location line="+56"/> <source>Universal Form</source> - <translation type="unfinished"></translation> + <translation>共通形式</translation> </message> </context> <context> @@ -200,37 +201,37 @@ Will assume a single universal form.</source> <message> <location filename="../tools/linguist/linguist/errorsview.cpp" line="+76"/> <source>Accelerator possibly superfluous in translation.</source> - <translation type="unfinished">訳に余分なアクセラレータがついています。</translation> + <translation>訳に余分なアクセラレータがついています。</translation> </message> <message> <location line="+3"/> <source>Accelerator possibly missing in translation.</source> - <translation type="unfinished">訳にアクセラレータが欠けています。</translation> + <translation>訳にアクセラレータが欠けています。</translation> </message> <message> <location line="+3"/> <source>Translation does not end with the same punctuation as the source text.</source> - <translation type="unfinished">訳がソーステキストと同じ句読点で終わっていません。</translation> + <translation>訳がソーステキストと同じ句読点で終わっていません。</translation> </message> <message> <location line="+3"/> <source>A phrase book suggestion for '%1' was ignored.</source> - <translation type="unfinished">'%1' についてのフレーズブックの示唆を無視しています。</translation> + <translation>'%1' についてのフレーズブックの示唆を無視しています。</translation> </message> <message> <location line="+3"/> <source>Translation does not refer to the same place markers as in the source text.</source> - <translation type="unfinished">訳語にはソーステキストと同じ数の "%" がありません。</translation> + <translation>訳語にはソーステキストと同じ数の "%" がありません。</translation> </message> <message> <location line="+3"/> <source>Translation does not contain the necessary %n place marker.</source> - <translation type="unfinished"></translation> + <translation>訳語に必要な %n 個のプレースマーカー "%" がありません。</translation> </message> <message> <location line="+3"/> <source>Unknown error</source> - <translation type="unfinished"></translation> + <translation>未知のエラー</translation> </message> </context> <context> @@ -248,37 +249,37 @@ Will assume a single universal form.</source> <message> <location/> <source>Find</source> - <translation type="unfinished"></translation> + <translation>検索</translation> </message> <message> <location/> <source>&Find what:</source> - <translation type="unfinished"></translation> + <translation>検索する文字列(&F):</translation> </message> <message> <location/> <source>&Source texts</source> - <translation type="unfinished"></translation> + <translation>ソーステキスト(&S)</translation> </message> <message> <location/> <source>&Translations</source> - <translation type="unfinished"></translation> + <translation>訳語(&T)</translation> </message> <message> <location/> <source>&Match case</source> - <translation type="unfinished"></translation> + <translation>大/小文字の区別(&M)</translation> </message> <message> <location/> <source>&Comments</source> - <translation type="unfinished"></translation> + <translation>コメント(&C)</translation> </message> <message> <location/> <source>Ignore &accelerators</source> - <translation type="unfinished"></translation> + <translation>アクセラレータを無視(&A)</translation> </message> <message> <location/> @@ -388,16 +389,18 @@ Will assume a single universal form.</source> <location filename="../tools/linguist/shared/qm.cpp" line="+715"/> <source> Generated %n translation(s) (%1 finished and %2 unfinished) </source> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform> %n 件の訳語 (%1 件が完了、 %2 件が未完了) を生成しました +</numerusform> </translation> </message> <message numerus="yes"> <location line="+4"/> <source> Ignored %n untranslated source text(s) </source> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform> %n 件の未翻訳のソーステキストを無視しました +</numerusform> </translation> </message> </context> @@ -413,12 +416,12 @@ Will assume a single universal form.</source> <message> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>About Qt</source> - <translation>Qt について(&Q)</translation> + <translation>Qt について</translation> </message> <message> <location/> <source>About Qt Linguist</source> - <translation>Qt Linguist について(&A)</translation> + <translation>Qt Linguist について</translation> </message> <message> <location/> @@ -476,7 +479,7 @@ Will assume a single universal form.</source> <message> <location/> <source>Create a new phrase book.</source> - <translation>新しいフレーズブックを作成</translation> + <translation>新しいフレーズブックを作成します。</translation> </message> <message> <location/> @@ -545,12 +548,12 @@ Will assume a single universal form.</source> <message> <location/> <source>Open Read-O&nly...</source> - <translation type="unfinished"></translation> + <translation>読取専用で開く(&N)...</translation> </message> <message> <location/> <source>&Save All</source> - <translation type="unfinished"></translation> + <translation>全て保存(&S)</translation> </message> <message> <location/> @@ -584,7 +587,7 @@ Will assume a single universal form.</source> <message> <location/> <source>Recently Opened &Files</source> - <translation type="unfinished"></translation> + <translation>最近使ったファイル(&F)</translation> </message> <message> <location/> @@ -625,7 +628,7 @@ Will assume a single universal form.</source> <message> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>&Edit Phrase Book</source> - <translation>フレーズブックを編集(&E)...</translation> + <translation>フレーズブックを編集(&E)</translation> </message> <message> <location/> @@ -696,7 +699,7 @@ Will assume a single universal form.</source> <message> <location/> <source>MainWindow</source> - <translation>メインウィンドウ</translation> + <translation>MainWindow</translation> </message> <message> <location/> @@ -753,7 +756,7 @@ Will assume a single universal form.</source> <message> <location/> <source>Open a Qt translation source file (TS file) for editing</source> - <translation>Qt 翻訳ソースファイル (TS ファイル) を編集用に開きます。</translation> + <translation>Qt 翻訳ソースファイル (TS ファイル) を編集用に開きます</translation> </message> <message> <source>&Open Phrase Book</source> @@ -810,7 +813,7 @@ Will assume a single universal form.</source> <message> <location/> <source>&Print Phrase Book</source> - <translation>フレーズブックを印刷(&P)...</translation> + <translation>フレーズブックを印刷(&P)</translation> </message> <message> <source>Re&cently opened files</source> @@ -856,172 +859,176 @@ Will assume a single universal form.</source> <message> <location line="+195"/> <source>Source text</source> - <translation type="unfinished">ソーステキスト</translation> + <translation>ソーステキスト</translation> </message> <message> <location line="+1"/> <location line="+25"/> <source>Index</source> - <translation type="unfinished"></translation> + <translation>インデックス</translation> </message> <message> <location line="-2"/> <location line="+61"/> <source>Context</source> - <translation type="unfinished">コンテキスト</translation> + <translation>コンテキスト</translation> </message> <message> <location line="-60"/> <source>Items</source> - <translation type="unfinished">項目数</translation> + <translation>項目数</translation> </message> <message> <location line="+77"/> <source>This panel lists the source contexts.</source> - <translation type="unfinished">このパネルではソースのコンテキストを一覧表示しています。</translation> + <translation>このパネルではソースのコンテキストを一覧表示しています。</translation> </message> <message> <location line="+15"/> <source>Strings</source> - <translation type="unfinished"></translation> + <translation>文字列</translation> </message> <message> <location line="+39"/> <source>Phrases and guesses</source> - <translation type="unfinished"></translation> + <translation>フレーズと推測</translation> </message> <message> <location line="+10"/> <source>Sources and Forms</source> - <translation type="unfinished"></translation> + <translation>ソースとフォーム</translation> </message> <message> <location line="+15"/> <source>Warnings</source> - <translation type="unfinished"></translation> + <translation>警告</translation> </message> <message> <location line="+59"/> <source> MOD </source> <comment>status bar: file(s) modified</comment> - <translation type="unfinished"></translation> + <translation> MOD </translation> </message> <message> <location line="+125"/> <source>Loading...</source> - <translation type="unfinished">ロードしています...</translation> + <translation>ロードしています...</translation> </message> <message> <location line="+32"/> <location line="+22"/> <source>Loading File - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>ロードしています - Qt Linguist</translation> </message> <message> <location line="-21"/> <source>The file '%1' does not seem to be related to the currently open file(s) '%2'. Close the open file(s) first?</source> - <translation type="unfinished"></translation> + <translation>ファイル '%1' は、既に開いているファイル '%2' とは関連していないようです。 + +先に開いたファイルを閉じますか?</translation> </message> <message> <location line="+22"/> <source>The file '%1' does not seem to be related to the file '%2' which is being loaded as well. Skip loading the first named file?</source> - <translation type="unfinished"></translation> + <translation>ファイル '%1' は、既にロードされているファイル '%2' とは関連していないようです。 + +ファイルのロードをスキップしますか?</translation> </message> <message numerus="yes"> <location line="+61"/> <source>%n translation unit(s) loaded.</source> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform>%n 件の翻訳項目をロードしました。</numerusform> </translation> </message> <message> <location line="+93"/> <source>Related files (%1);;</source> - <translation type="unfinished"></translation> + <translation>%1 に関連したファイル;;</translation> </message> <message> <location line="+4"/> <source>Open Translation Files</source> - <translation type="unfinished"></translation> + <translation>翻訳ファイルを開く</translation> </message> <message> <location line="+10"/> <location line="+31"/> <source>File saved.</source> - <translation type="unfinished">ファイルが保存されました。</translation> + <translation>ファイルが保存されました。</translation> </message> <message> <location line="+15"/> <location line="+1164"/> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>Release</source> - <translation type="unfinished">リリース</translation> + <translation>リリース</translation> </message> <message> <location line="-1163"/> <source>Qt message files for released applications (*.qm) All files (*)</source> - <translation type="unfinished">リリースされたアプリケーション用の Qt メッセージファイル (*.qm) + <translation>リリースされたアプリケーション用の Qt メッセージファイル (*.qm) すべてのファイル (*)</translation> </message> <message> <location line="+3"/> <location line="+12"/> <source>File created.</source> - <translation type="unfinished">ファイルが作成されました。</translation> + <translation>ファイルが作成されました。</translation> </message> <message> <location line="+27"/> <location line="+355"/> <source>Printing...</source> - <translation type="unfinished">印刷中...</translation> + <translation>印刷中...</translation> </message> <message> <location line="-347"/> <source>Context: %1</source> - <translation type="unfinished">コンテキスト: %1</translation> + <translation>コンテキスト: %1</translation> </message> <message> <location line="+32"/> <source>finished</source> - <translation type="unfinished">完了</translation> + <translation>完了</translation> </message> <message> <location line="+3"/> <source>unresolved</source> - <translation type="unfinished">未解決</translation> + <translation>未解決</translation> </message> <message> <location line="+3"/> <source>obsolete</source> - <translation type="unfinished">このバージョンでは使われていない</translation> + <translation>このバージョンでは使われていない</translation> </message> <message> <location line="+15"/> <location line="+307"/> <source>Printing... (page %1)</source> - <translation type="unfinished">印刷中... (%1 ページ)</translation> + <translation>印刷中... (%1 ページ)</translation> </message> <message> <location line="-300"/> <location line="+307"/> <source>Printing completed</source> - <translation type="unfinished">印刷完了</translation> + <translation>印刷完了</translation> </message> <message> <location line="-305"/> <location line="+307"/> <source>Printing aborted</source> - <translation type="unfinished">印刷中止</translation> + <translation>印刷中止</translation> </message> <message> <location line="-232"/> <source>Search wrapped.</source> - <translation type="unfinished">検索が一通り終わりました。</translation> + <translation>検索が一通り終わりました。</translation> </message> <message> <location line="+17"/> @@ -1035,13 +1042,13 @@ All files (*)</source> <location line="+40"/> <location line="+10"/> <source>Qt Linguist</source> - <translation type="unfinished">Qt Linguist</translation> + <translation>Qt Linguist</translation> </message> <message> <location line="-1204"/> <location line="+102"/> <source>Cannot find the string '%1'.</source> - <translation type="unfinished">文字列 '%1' が見つかりません。</translation> + <translation>文字列 '%1' が見つかりません。</translation> </message> <message> <source>Translate</source> @@ -1056,58 +1063,58 @@ All files (*)</source> <message> <location line="-82"/> <source>Search And Translate in '%1' - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>'%1' 内で検索して翻訳 - Qt Linguist</translation> </message> <message> <location line="+34"/> <location line="+23"/> <location line="+24"/> <source>Translate - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>翻訳 - Qt Linguist</translation> </message> <message numerus="yes"> <location line="-46"/> <source>Translated %n entry(s)</source> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform>%n 項目が翻訳済みです</numerusform> </translation> </message> <message> <location line="+23"/> <source>No more occurrences of '%1'. Start over?</source> - <translation type="unfinished"></translation> + <translation>'%1' は、これ以上見つかりません。先頭に戻りますか?</translation> </message> <message> <location line="+30"/> <source>Create New Phrase Book</source> - <translation type="unfinished">新しいフレーズブックを作成</translation> + <translation>新しいフレーズブックを作成</translation> </message> <message> <location line="+1"/> <source>Qt phrase books (*.qph) All files (*)</source> - <translation type="unfinished">Qt フレーズブック (*.qph) -すべてのファイル (*)</translation> + <translation>Qt フレーズブック (*.qph) +全てのファイル (*)</translation> </message> <message> <location line="+11"/> <source>Phrase book created.</source> - <translation type="unfinished">フレーズブックが作成されました。</translation> + <translation>フレーズブックが作成されました。</translation> </message> <message> <location line="+17"/> <source>Open Phrase Book</source> - <translation type="unfinished">フレーズブックを開く</translation> + <translation>フレーズブックを開く</translation> </message> <message> <location line="+1"/> <source>Qt phrase books (*.qph);;All files (*)</source> - <translation type="unfinished"></translation> + <translation>Qt フレーズブック (*.qph);;すべてのファイル (*)</translation> </message> <message numerus="yes"> <location line="+7"/> <source>%n phrase(s) loaded.</source> - <translation type="unfinished"> + <translation> <numerusform>%n 項目のフレーズがロードされました。</numerusform> </translation> </message> @@ -1116,32 +1123,32 @@ All files (*)</source> <location line="+3"/> <location line="+7"/> <source>Add to phrase book</source> - <translation type="unfinished"></translation> + <translation>フレーズブックに追加</translation> </message> <message> <location line="-9"/> <source>No appropriate phrasebook found.</source> - <translation type="unfinished"></translation> + <translation>適切なフレーズブックが見つかりません。</translation> </message> <message> <location line="+3"/> <source>Adding entry to phrasebook %1</source> - <translation type="unfinished"></translation> + <translation>フレーズブック %1 に項目を追加</translation> </message> <message> <location line="+7"/> <source>Select phrase book to add to</source> - <translation type="unfinished"></translation> + <translation>追加先のフレーズブックを選択してください</translation> </message> <message> <location line="+29"/> <source>Unable to launch Qt Assistant (%1)</source> - <translation type="unfinished"></translation> + <translation>Qt Assistant (%1) を起動できません</translation> </message> <message> <location line="+17"/> <source>Version %1</source> - <translation type="unfinished">バージョン %1</translation> + <translation>バージョン %1</translation> </message> <message> <source> Open Source Edition</source> @@ -1158,83 +1165,83 @@ All files (*)</source> <message> <location line="+6"/> <source><center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</p></source> - <translation type="unfinished"><center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist は、Qt アプリケーションの翻訳を行うツールです。</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 全ての権利は保護されています。</p><p>このプログラムは、「設計」、「市場性」および「特定の目的への適合性」も含む、あらゆる種類の「保証がなく」、「そのままで」提供されます。</p></translation> + <translation><center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist は、Qt アプリケーションの翻訳を行うツールです。</p><p>%2</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 全ての権利は保護されています。</p><p>このプログラムは、「設計」、「市場性」および「特定の目的への適合性」も含む、あらゆる種類の「保証がなく」、「そのままで」提供されます。</p></translation> </message> <message> <location line="+41"/> <source>Do you want to save the modified files?</source> - <translation type="unfinished"></translation> + <translation>変更されたファイルを保存しますか?</translation> </message> <message> <location line="+22"/> <source>Do you want to save '%1'?</source> - <translation type="unfinished">'%1' を保存しますか?</translation> + <translation>'%1' を保存しますか?</translation> </message> <message> <location line="+43"/> <source>Qt Linguist[*]</source> - <translation type="unfinished"></translation> + <translation>Qt Linguist[*]</translation> </message> <message> <location line="+2"/> <source>%1[*] - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>%1[*] - Qt Linguist</translation> </message> <message> <location line="+267"/> <location line="+12"/> <source>No untranslated translation units left.</source> - <translation type="unfinished"></translation> + <translation>未訳項目は残っていません。</translation> </message> <message> <location line="+176"/> <source>&Window</source> - <translation type="unfinished">ウィンドウ(&W)</translation> + <translation>ウィンドウ(&W)</translation> </message> <message> <location line="+2"/> <source>Minimize</source> - <translation type="unfinished">最小化</translation> + <translation>最小化</translation> </message> <message> <location line="+1"/> <source>Ctrl+M</source> - <translation type="unfinished">Ctrl+M</translation> + <translation>Ctrl+M</translation> </message> <message> <location line="+12"/> <source>Display the manual for %1.</source> - <translation type="unfinished">%1 のマニュアルを表示します。</translation> + <translation>%1 のマニュアルを表示します。</translation> </message> <message> <location line="+1"/> <source>Display information about %1.</source> - <translation type="unfinished">%1 についての情報を表示します。</translation> + <translation>%1 についての情報を表示します。</translation> </message> <message> <location line="+70"/> <source>&Save '%1'</source> - <translation type="unfinished"></translation> + <translation>'%1' を保存する(&S)</translation> </message> <message> <location line="+1"/> <source>Save '%1' &As...</source> - <translation type="unfinished"></translation> + <translation>'%1' を名前を付けて保存(&A)...</translation> </message> <message> <location line="+1"/> <source>Release '%1'</source> - <translation type="unfinished"></translation> + <translation>'%1' をリリース</translation> </message> <message> <location line="+1"/> <source>Release '%1' As...</source> - <translation type="unfinished"></translation> + <translation>'%1' を名前を付けてリリース...</translation> </message> <message> <location line="+1"/> <source>&Close '%1'</source> - <translation type="unfinished"></translation> + <translation>'%1' を閉じる(&C)</translation> </message> <message> <location line="+2"/> @@ -1253,78 +1260,78 @@ All files (*)</source> <location line="-8"/> <location line="+13"/> <source>&Close</source> - <translation type="unfinished">閉じる(&C)</translation> + <translation>閉じる(&C)</translation> </message> <message> <location line="-10"/> <source>Save All</source> - <translation type="unfinished"></translation> + <translation>全て保存</translation> </message> <message> <location line="+1"/> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>&Release All</source> - <translation type="unfinished"></translation> + <translation>全てリリース(&R)</translation> </message> <message> <location line="+1"/> <source>Close All</source> - <translation type="unfinished">すべて閉じる</translation> + <translation>すべて閉じる</translation> </message> <message> <location line="+23"/> <source>Translation File &Settings for '%1'...</source> - <translation type="unfinished"></translation> + <translation>'%1' の翻訳ファイルの設定(&S)...</translation> </message> <message> <location line="+1"/> <source>&Batch Translation of '%1'...</source> - <translation type="unfinished"></translation> + <translation>'%1' の一括翻訳(&B)...</translation> </message> <message> <location line="+1"/> <source>Search And &Translate in '%1'...</source> - <translation type="unfinished"></translation> + <translation>'%1' 内を検索して翻訳(&T)...</translation> </message> <message> <location line="+4"/> <source>Search And &Translate...</source> - <translation type="unfinished"></translation> + <translation>検索して訳語を置換(&T)...</translation> </message> <message> <location line="+161"/> <source>Cannot read from phrase book '%1'.</source> - <translation type="unfinished">フレーズブック '%1' から読み出せません。</translation> + <translation>フレーズブック '%1' から読み出せません。</translation> </message> <message> <location line="+15"/> <source>Close this phrase book.</source> - <translation type="unfinished">このフレーズブックを閉じます。</translation> + <translation>このフレーズブックを閉じます。</translation> </message> <message> <location line="+4"/> <source>Enables you to add, modify, or delete entries in this phrase book.</source> - <translation type="unfinished"></translation> + <translation>このフレーズブックで項目の追加、変更、削除ができます。</translation> </message> <message> <location line="+5"/> <source>Print the entries in this phrase book.</source> - <translation type="unfinished"></translation> + <translation>このフレーズブックの項目を印刷します。</translation> </message> <message> <location line="+16"/> <source>Cannot create phrase book '%1'.</source> - <translation type="unfinished">フレーズブック '%1' を作成できません。</translation> + <translation>フレーズブック '%1' を作成できません。</translation> </message> <message> <location line="+10"/> <source>Do you want to save phrase book '%1'?</source> - <translation type="unfinished"></translation> + <translation>フレーズブック '%1' を保存しますか?</translation> </message> <message> <location line="+314"/> <source>All</source> - <translation type="unfinished"></translation> + <translation>すべて</translation> </message> <message> <location filename="../tools/linguist/linguist/mainwindow.ui"/> @@ -1468,194 +1475,194 @@ All files (*)</source> <message> <location/> <source>&Open...</source> - <translation type="unfinished"></translation> + <translation>開く(&O)...</translation> </message> <message> <location/> <source>Save</source> - <translation type="unfinished"></translation> + <translation>保存</translation> </message> <message> <location/> <source>&Print...</source> - <translation type="unfinished"></translation> + <translation>印刷(&P)...</translation> </message> <message> <location/> <source>Print a list of all the translation units in the current translation source file.</source> - <translation type="unfinished"></translation> + <translation>現在の Qt 翻訳ソースファイルの全ての訳語の一覧を印刷します。</translation> </message> <message> <location/> <source>Undo the last editing operation performed on the current translation.</source> - <translation type="unfinished"></translation> + <translation>現在の翻訳ファイルで最後に行った編集操作を取り消します。</translation> </message> <message> <location/> <source>&Find...</source> - <translation type="unfinished"></translation> + <translation>検索(&F)...</translation> </message> <message> <location/> <source>Previous unfinished item.</source> - <translation type="unfinished"></translation> + <translation>前の未訳の項目へ移動します。</translation> </message> <message> <location/> <source>Move to the previous unfinished item.</source> - <translation type="unfinished"></translation> + <translation>前の未完了の項目へ移動します。</translation> </message> <message> <location/> <source>Next unfinished item.</source> - <translation type="unfinished"></translation> + <translation>次の未訳の項目へ移動します。</translation> </message> <message> <location/> <source>Move to the next unfinished item.</source> - <translation type="unfinished"></translation> + <translation>次の未完了の項目へ移動します。</translation> </message> <message> <location/> <source>Move to previous item.</source> - <translation type="unfinished"></translation> + <translation>前の項目へ移動します。</translation> </message> <message> <location/> <source>Move to the previous item.</source> - <translation type="unfinished"></translation> + <translation>前の項目へ移動します。</translation> </message> <message> <location/> <source>Next item.</source> - <translation type="unfinished"></translation> + <translation>次の項目へ移動します。</translation> </message> <message> <location/> <source>Move to the next item.</source> - <translation type="unfinished"></translation> + <translation>次の項目へ移動します。</translation> </message> <message> <location/> <source>Mark item as done and move to the next unfinished item.</source> - <translation type="unfinished"></translation> + <translation>この項目に完了のマークをつけ、次の未完了の項目へ移動します。</translation> </message> <message> <location/> <source>Mark this item as done and move to the next unfinished item.</source> - <translation type="unfinished"></translation> + <translation>この項目に完了のマークをつけ、次の未完了の項目へ移動します。</translation> </message> <message> <location/> <source>Copy from source text</source> - <translation type="unfinished"></translation> + <translation>ソーステキストからコピー</translation> </message> <message> <location/> <source>Toggle the validity check of accelerators.</source> - <translation type="unfinished"></translation> + <translation>アクセラレータのチェックを有効にするかどうかを切り替えます。</translation> </message> <message> <location/> <source>Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.</source> - <translation type="unfinished"></translation> + <translation>ソーステキストと訳語のアクセラレータの個数が同じか否かのチェックを有効にするかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージは表示されます。</translation> </message> <message> <location/> <source>Toggle the validity check of ending punctuation.</source> - <translation type="unfinished"></translation> + <translation>末尾の句読点のチェックを有効にするかどうかを切り替えます。</translation> </message> <message> <location/> <source>Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.</source> - <translation type="unfinished"></translation> + <translation>末尾の句読点のチェックを有効にするかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージが表示されます。</translation> </message> <message> <location/> <source>Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.</source> - <translation type="unfinished"></translation> + <translation>フレーズの示唆を使うかどうかのチェックを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージが表示されます。</translation> </message> <message> <location/> <source>Toggle the validity check of place markers.</source> - <translation type="unfinished"></translation> + <translation>"%" の数や番号のチェックを行うかどうかを切り替えます。</translation> </message> <message> <location/> <source>Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.</source> - <translation type="unfinished"></translation> + <translation>ソーステキストと訳語の"%1"や"%2"等のプレースマーカーの整合が取れているか否かのチェックを行うかどうかを切り替えます。チェックが無効になっていても、警告ウィンドウにメッセージは表示されます。</translation> </message> <message> <location/> <source>&New Phrase Book...</source> - <translation type="unfinished"></translation> + <translation>新しいフレーズブック(&N)...</translation> </message> <message> <location/> <source>&Open Phrase Book...</source> - <translation type="unfinished"></translation> + <translation>フレーズブックを開く(&O)...</translation> </message> <message> <location/> <source>&Reset Sorting</source> - <translation type="unfinished"></translation> + <translation>ソート順序をリセット(&R)</translation> </message> <message> <location/> <source>Display translation statistics.</source> - <translation type="unfinished"></translation> + <translation>翻訳の統計を表示します。</translation> </message> <message> <location/> <source>&Search And Translate...</source> - <translation type="unfinished"></translation> + <translation>検索して訳語を置換(&S)...</translation> </message> <message> <location/> <source>Close</source> - <translation type="unfinished">閉じる</translation> + <translation>閉じる</translation> </message> <message> <location/> <source>&Close All</source> - <translation type="unfinished"></translation> + <translation>全て閉じる(&C)</translation> </message> <message> <location/> <source>Ctrl+W</source> - <translation type="unfinished"></translation> + <translation>Ctrl+W</translation> </message> <message> <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-71"/> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>&Batch Translation...</source> - <translation type="unfinished"></translation> + <translation>一括翻訳(&B)...</translation> </message> <message> <location line="-1"/> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>Translation File &Settings...</source> - <translation type="unfinished"></translation> + <translation>翻訳ファイルの設定(&S)...</translation> </message> <message> <location filename="../tools/linguist/linguist/mainwindow.ui"/> <source>&Add to Phrase Book</source> - <translation type="unfinished"></translation> + <translation>フレーズブックに追加(&A)</translation> </message> <message> <location/> <source>Ctrl+T</source> - <translation type="unfinished"></translation> + <translation>Ctrl+T</translation> </message> <message> <location/> <source>Ctrl+J</source> - <translation type="unfinished"></translation> + <translation>Ctrl+J</translation> </message> <message> <location/> <source>Ctrl+Shift+J</source> - <translation type="unfinished"></translation> + <translation>Ctrl+Shift+J</translation> </message> </context> <context> @@ -1707,82 +1714,82 @@ All files (*)</source> <message> <location filename="../tools/linguist/linguist/messageeditor.cpp" line="+72"/> <source>German</source> - <translation type="unfinished"></translation> + <translation>German</translation> </message> <message> <location line="+1"/> <source>Japanese</source> - <translation type="unfinished"></translation> + <translation>Japanese</translation> </message> <message> <location line="+1"/> <source>French</source> - <translation type="unfinished"></translation> + <translation>French</translation> </message> <message> <location line="+1"/> <source>Polish</source> - <translation type="unfinished"></translation> + <translation>Polish</translation> </message> <message> <location line="+1"/> <source>Chinese</source> - <translation type="unfinished"></translation> + <translation>Chinese</translation> </message> <message> <location line="+75"/> <source>Source text</source> - <translation type="unfinished">ソーステキスト</translation> + <translation>ソーステキスト</translation> </message> <message> <location line="+5"/> <source>Source text (Plural)</source> - <translation type="unfinished"></translation> + <translation>ソーステキスト(複数)</translation> </message> <message> <location line="+2"/> <source>This area shows the plural form of the source text.</source> - <translation type="unfinished"></translation> + <translation>この領域は複数のソーステキストを表示します。</translation> </message> <message> <location line="+3"/> <source>Developer comments</source> - <translation type="unfinished"></translation> + <translation>開発者のコメント</translation> </message> <message> <location line="+3"/> <source>This area shows a comment that may guide you, and the context in which the text occurs.</source> - <translation type="unfinished">この領域は、手助けとなるコメントと、テキストが出てくるコンテキストを表示します。</translation> + <translation>この領域は、手助けとなるコメントと、テキストが出てくるコンテキストを表示します。</translation> </message> <message> <location line="+59"/> <source>Here you can enter comments for your own use. They have no effect on the translated applications.</source> - <translation type="unfinished"></translation> + <translation>ここはあなたが自分自身の為にコメントを入力できます。翻訳されたアプリケーションには何の影響も与えません。</translation> </message> <message> <location line="+205"/> <source>%1 translation (%2)</source> - <translation type="unfinished"></translation> + <translation>%1 翻訳 (%2)</translation> </message> <message> <location line="+19"/> <source>This is where you can enter or modify the translation of the above source text.</source> - <translation type="unfinished"></translation> + <translation>ソーステキストの訳を入力したり変更したりできるところです。</translation> </message> <message> <location line="+5"/> <source>%1 translation</source> - <translation type="unfinished"></translation> + <translation>%1 訳</translation> </message> <message> <location line="+1"/> <source>%1 translator comments</source> - <translation type="unfinished"></translation> + <translation>%1 翻訳者のコメント</translation> </message> <message> <location line="-300"/> <source>This area shows the source text.</source> - <translation type="unfinished">この領域はソーステキストを表示します。</translation> + <translation>この領域はソーステキストを表示します。</translation> </message> <message> <source>This is where you can enter or modify the translation of some source text.</source> @@ -1801,7 +1808,8 @@ All files (*)</source> <location line="+465"/> <source>'%1' Line: %2</source> - <translation type="unfinished"></translation> + <translation>'%1' +行番号: %2</translation> </message> </context> <context> @@ -1821,22 +1829,22 @@ Line: %2</source> <message> <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/> <source>Completion status for %1</source> - <translation type="unfinished"></translation> + <translation>%1 の翻訳完了状況</translation> </message> <message> <location line="+15"/> <source><file header></source> - <translation type="unfinished"></translation> + <translation><ファイル ヘッダー></translation> </message> <message> <location line="+2"/> <source><context comment></source> - <translation type="unfinished"></translation> + <translation><コンテキスト コメント></translation> </message> <message> <location line="+71"/> <source><unnamed context></source> - <translation type="unfinished"></translation> + <translation><無名のコンテキスト></translation> </message> </context> <context> @@ -1871,7 +1879,7 @@ Line: %2</source> <message> <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+8"/> <source>%1[*] - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>%1[*] - Qt Linguist</translation> </message> <message> <location line="+91"/> @@ -1886,27 +1894,27 @@ Line: %2</source> <message> <location/> <source>&New Entry</source> - <translation type="unfinished"></translation> + <translation>新しい項目(&N)</translation> </message> <message> <location/> <source>Click here to remove the entry from the phrase book.</source> - <translation type="unfinished"></translation> + <translation>フレーズブックからフレーズを消去するにはここをクリックしてください。</translation> </message> <message> <location/> <source>&Remove Entry</source> - <translation type="unfinished"></translation> + <translation>項目を削除(&R)</translation> </message> <message> <location/> <source>Settin&gs...</source> - <translation type="unfinished"></translation> + <translation>設定(&G)...</translation> </message> <message> <location/> <source>Click here to close this window.</source> - <translation>このウィンドウを閉じるにはここをクリックしてください。</translation> + <translation>このウィンドウを閉じるにはここをクリックします。</translation> </message> <message> <source>Click here to remove the phrase from the phrase book.</source> @@ -1958,7 +1966,7 @@ Line: %2</source> <message> <location/> <source>This window allows you to add, modify, or delete entries in a phrase book.</source> - <translation type="unfinished"></translation> + <translation>このウィンドウでフレーズブックにフレーズを追加、変更、削除できます。</translation> </message> <message> <location/> @@ -2006,7 +2014,7 @@ Line: %2</source> <message> <location line="+2"/> <source>Translation</source> - <translation>訳</translation> + <translation>翻訳</translation> </message> </context> <context> @@ -2014,22 +2022,22 @@ Line: %2</source> <message> <location filename="../tools/linguist/linguist/phraseview.cpp" line="+121"/> <source>Insert</source> - <translation type="unfinished"></translation> + <translation>挿入</translation> </message> <message> <location line="+3"/> <source>Edit</source> - <translation type="unfinished">編集</translation> + <translation>編集</translation> </message> <message> <location line="+113"/> <source>Guess (%1)</source> - <translation type="unfinished">推測(%1)</translation> + <translation>推測(%1)</translation> </message> <message> <location line="+2"/> <source>Guess</source> - <translation type="unfinished">推測</translation> + <translation>推測</translation> </message> </context> <context> @@ -2037,17 +2045,17 @@ Line: %2</source> <message> <location filename="../tools/linguist/shared/qm.cpp" line="+12"/> <source>Compiled Qt translations</source> - <translation type="unfinished"></translation> + <translation>コンパイル済み Qt 翻訳ファイル</translation> </message> <message> <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1279"/> <source>Translation files (%1);;</source> - <translation type="unfinished"></translation> + <translation>翻訳ファイル (%1);;</translation> </message> <message> <location line="+5"/> <source>All files (*)</source> - <translation type="unfinished"></translation> + <translation>すべてのファイル (*)</translation> </message> <message> <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1118"/> @@ -2063,57 +2071,57 @@ Line: %2</source> <message> <location filename="../tools/linguist/shared/cpp.cpp" line="+1072"/> <source>C++ source files</source> - <translation type="unfinished"></translation> + <translation>C++ ソースファイル</translation> </message> <message> <location filename="../tools/linguist/shared/java.cpp" line="+646"/> <source>Java source files</source> - <translation type="unfinished"></translation> + <translation>Java ソースファイル</translation> </message> <message> <location filename="../tools/linguist/shared/po.cpp" line="+651"/> <source>GNU Gettext localization files</source> - <translation type="unfinished"></translation> + <translation>GNU Gettext 日本語化ファイル</translation> </message> <message> <location filename="../tools/linguist/shared/qscript.cpp" line="+2399"/> <source>Qt Script source files</source> - <translation type="unfinished"></translation> + <translation>Qt スクリプト ソースファイル</translation> </message> <message> <location filename="../tools/linguist/shared/ts.cpp" line="+752"/> <source>Qt translation sources (format 1.1)</source> - <translation type="unfinished"></translation> + <translation>Qt 翻訳ソース (1.1形式)</translation> </message> <message> <location line="+8"/> <source>Qt translation sources (format 2.0)</source> - <translation type="unfinished"></translation> + <translation>Qt 翻訳ソース (2.0形式)</translation> </message> <message> <location line="+9"/> <source>Qt translation sources (latest format)</source> - <translation type="unfinished"></translation> + <translation>Qt 翻訳ソース (最新の形式)</translation> </message> <message> <location filename="../tools/linguist/shared/ui.cpp" line="+213"/> <source>Qt Designer form files</source> - <translation type="unfinished"></translation> + <translation>Qt デザイナ フォームファイル</translation> </message> <message> <location line="+9"/> <source>Qt Jambi form files</source> - <translation type="unfinished"></translation> + <translation>Qt Jambi フォームファイル</translation> </message> <message> <location filename="../tools/linguist/shared/xliff.cpp" line="+817"/> <source>XLIFF localization files</source> - <translation type="unfinished"></translation> + <translation>XLIFF 日本語化ファイル</translation> </message> <message> <location filename="../tools/linguist/shared/qph.cpp" line="+192"/> <source>Qt Linguist 'Phrase Book'</source> - <translation type="unfinished"></translation> + <translation>Qt Linguist 'フレーズ ブック'</translation> </message> </context> <context> @@ -2147,17 +2155,17 @@ Line: %2</source> <message> <location filename="../tools/linguist/linguist/sourcecodeview.cpp" line="+70"/> <source><i>Source code not available</i></source> - <translation type="unfinished"></translation> + <translation><i>ソース コードは使用できません</i></translation> </message> <message> <location line="+33"/> <source><i>File %1 not available</i></source> - <translation type="unfinished"></translation> + <translation><i>ファイル %1 が使用できません</i></translation> </message> <message> <location line="+5"/> <source><i>File %1 not readable</i></source> - <translation type="unfinished"></translation> + <translation><i>ファイル %1 が読み込めません</i></translation> </message> </context> <context> @@ -2213,7 +2221,7 @@ Line: %2</source> <message> <location/> <source>Translation</source> - <translation>訳</translation> + <translation>翻訳</translation> </message> <message> <location/> @@ -2223,7 +2231,7 @@ Line: %2</source> <message> <location/> <source>Close</source> - <translation type="unfinished">閉じる</translation> + <translation>閉じる</translation> </message> </context> <context> @@ -2656,7 +2664,7 @@ All files (*)</source> <message> <location/> <source>Texts such as 'TeX' and 'tex' are considered as different when checked.</source> - <translation>これを選択すると、たとえば 'TeX' と 'tex' は異なるものと見なされます。</translation> + <translation>選択すると、たとえば 'TeX' と 'tex' は異なるものと見なされます。</translation> </message> <message> <location/> @@ -2714,27 +2722,27 @@ All files (*)</source> <location line="+11"/> <location line="+8"/> <source>Settings for '%1' - Qt Linguist</source> - <translation type="unfinished"></translation> + <translation>'%1' の設定 - Qt Linguist</translation> </message> <message> <location filename="../tools/linguist/linguist/translationsettings.ui"/> <source>Source language</source> - <translation type="unfinished"></translation> + <translation>翻訳元の言語</translation> </message> <message> <location/> <source>Language</source> - <translation type="unfinished">言語</translation> + <translation>言語</translation> </message> <message> <location/> <source>Country/Region</source> - <translation type="unfinished"></translation> + <translation>国/地域</translation> </message> <message> <location/> <source>Target language</source> - <translation type="unfinished">翻訳先の言語</translation> + <translation>翻訳先の言語</translation> </message> </context> <context> diff --git a/translations/qt_da.ts b/translations/qt_da.ts new file mode 100644 index 0000000..105b572 --- /dev/null +++ b/translations/qt_da.ts @@ -0,0 +1,7745 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="da_DK"> +<context> + <name>AudioOutput</name> + <message> + <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/> + <source><html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html></source> + <translation><html>Audio-playback-enheden<b>%1</b> virker ikke.<br/>Falder tilbage til <b>%2</b>.</html></translation> + </message> + <message> + <location line="+13"/> + <source><html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html></source> + <translation><html>Skifter til audio-playback-enheden, <b>%1</b><br/>der lige er blevet tilgængelig og har en højere præference.</html></translation> + </message> + <message> + <location line="+3"/> + <source>Revert back to device '%1'</source> + <translation>Gå tilbage til enheden '%1'</translation> + </message> +</context> +<context> + <name>CloseButton</name> + <message> + <location filename="../src/gui/widgets/qtabbar.cpp" line="+2252"/> + <source>Close Tab</source> + <translation>Luk fane</translation> + </message> +</context> +<context> + <name>Phonon::</name> + <message> + <location filename="../src/3rdparty/phonon/phonon/phononnamespace.cpp" line="+55"/> + <source>Notifications</source> + <translation>Meddelelser</translation> + </message> + <message> + <location line="+2"/> + <source>Music</source> + <translation>Musik</translation> + </message> + <message> + <location line="+2"/> + <source>Video</source> + <translation></translation> + </message> + <message> + <location line="+2"/> + <source>Communication</source> + <translation>Kommunikation</translation> + </message> + <message> + <location line="+2"/> + <source>Games</source> + <translation>Spil</translation> + </message> + <message> + <location line="+2"/> + <source>Accessibility</source> + <translation>Tilgængelighed</translation> + </message> +</context> +<context> + <name>Phonon::Gstreamer::Backend</name> + <message> + <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+171"/> + <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled.</source> + <translation>Advarsel: Det ser ikke ud til, at gstreamer0.10-plugins-good pakken er installeret. + Nogle videofunktioner er deaktiveret.</translation> + </message> + <message> + <location line="+5"/> + <source>Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled</source> + <translation>Advarsel: Det ser ikke ud til, at base GStreamer plugins er installeret. + Al audio- og videosupport er deaktiveret</translation> + </message> +</context> +<context> + <name>Phonon::Gstreamer::MediaObject</name> + <message> + <location filename="../src/3rdparty/phonon/gstreamer/mediaobject.cpp" line="+90"/> + <source>Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed.</source> + <translation>Kan ikke starte playback. + +Tjek Gstreamer-installationen og kontrollér, at +libgstreamer-plugins-base er installeret.</translation> + </message> + <message> + <location line="+113"/> + <source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source> + <translation>Der mangler et codec. Følgende codecs skal installeres for at afspille dette indhold: %0</translation> + </message> + <message> + <location line="+676"/> + <location line="+8"/> + <location line="+15"/> + <location line="+9"/> + <location line="+6"/> + <location line="+19"/> + <location line="+335"/> + <location line="+24"/> + <source>Could not open media source.</source> + <translation>Kunne ikke åbne mediekilden.</translation> + </message> + <message> + <location line="-403"/> + <source>Invalid source type.</source> + <translation>Ugyldig kilde.</translation> + </message> + <message> + <location line="+377"/> + <source>Could not locate media source.</source> + <translation>Kunne ikke lokalisere mediekilden.</translation> + </message> + <message> + <location line="+10"/> + <source>Could not open audio device. The device is already in use.</source> + <translation>Kunne ikke åbne lydenheden. Enheden er allerede i brug.</translation> + </message> + <message> + <location line="+13"/> + <source>Could not decode media source.</source> + <translation>Kunne ikke afkode mediekilden.</translation> + </message> +</context> +<context> + <name>Phonon::VolumeSlider</name> + <message> + <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+42"/> + <location line="+18"/> + <source>Volume: %1%</source> + <translation></translation> + </message> + <message> + <location line="-15"/> + <location line="+18"/> + <location line="+54"/> + <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source> + <translation>Anvend denne skyder til at indstille lydstyrken. Længst til venstre er 0% og længst til højre er %1%</translation> + </message> +</context> +<context> + <name>Q3Accel</name> + <message> + <location filename="../src/qt3support/other/q3accel.cpp" line="+481"/> + <source>%1, %2 not defined</source> + <translation>%1, %2 ikke definerede</translation> + </message> + <message> + <location line="+36"/> + <source>Ambiguous %1 not handled</source> + <translation>Tvetydig %1 ikke behandlet</translation> + </message> +</context> +<context> + <name>Q3DataTable</name> + <message> + <location filename="../src/qt3support/sql/q3datatable.cpp" line="+285"/> + <source>True</source> + <translation>Sandt</translation> + </message> + <message> + <location line="+1"/> + <source>False</source> + <translation>Falsk</translation> + </message> + <message> + <location line="+505"/> + <source>Insert</source> + <translation>Indsæt</translation> + </message> + <message> + <location line="+1"/> + <source>Update</source> + <translation>Opdater</translation> + </message> + <message> + <location line="+1"/> + <source>Delete</source> + <translation>Slet</translation> + </message> +</context> +<context> + <name>Q3FileDialog</name> + <message> + <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+865"/> + <source>Copy or Move a File</source> + <translation>Kopiér eller flyt en fil</translation> + </message> + <message> + <location line="+8"/> + <source>Read: %1</source> + <translation>Læs: %1</translation> + </message> + <message> + <location line="+6"/> + <location line="+30"/> + <source>Write: %1</source> + <translation>Skriv: %1</translation> + </message> + <message> + <location line="-22"/> + <location line="+1579"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location line="-157"/> + <location line="+49"/> + <location line="+2153"/> + <location filename="../src/qt3support/dialogs/q3filedialog_mac.cpp" line="+110"/> + <source>All Files (*)</source> + <translation>Alle filer (*)</translation> + </message> + <message> + <location line="-2089"/> + <source>Name</source> + <translation>Navn</translation> + </message> + <message> + <location line="+1"/> + <source>Size</source> + <translation>Størrelse</translation> + </message> + <message> + <location line="+2"/> + <source>Type</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Date</source> + <translation>Dato</translation> + </message> + <message> + <location line="+1"/> + <source>Attributes</source> + <translation>Attributter</translation> + </message> + <message> + <location line="+35"/> + <location line="+2031"/> + <source>&OK</source> + <translation>&OK</translation> + </message> + <message> + <location line="-1991"/> + <source>Look &in:</source> + <translation>Kig &i:</translation> + </message> + <message> + <location line="+1"/> + <location line="+1981"/> + <location line="+16"/> + <source>File &name:</source> + <translation>Fil&navn:</translation> + </message> + <message> + <location line="-1996"/> + <source>File &type:</source> + <translation>Fil&type:</translation> + </message> + <message> + <location line="+7"/> + <source>Back</source> + <translation>Tilbage</translation> + </message> + <message> + <location line="+7"/> + <source>One directory up</source> + <translation>En mappe op</translation> + </message> + <message> + <location line="+9"/> + <source>Create New Folder</source> + <translation>Opret ny folder</translation> + </message> + <message> + <location line="+18"/> + <source>List View</source> + <translation>Listevisning</translation> + </message> + <message> + <location line="+8"/> + <source>Detail View</source> + <translation>Detaljevisning</translation> + </message> + <message> + <location line="+9"/> + <source>Preview File Info</source> + <translation>Vis filinformation</translation> + </message> + <message> + <location line="+23"/> + <source>Preview File Contents</source> + <translation>Vis filindhold</translation> + </message> + <message> + <location line="+88"/> + <source>Read-write</source> + <translation>Læs-skriv</translation> + </message> + <message> + <location line="+1"/> + <source>Read-only</source> + <translation>Skrivebeskyttet</translation> + </message> + <message> + <location line="+1"/> + <source>Write-only</source> + <translation>Write-only</translation> + </message> + <message> + <location line="+1"/> + <source>Inaccessible</source> + <translation>Utilgængelig</translation> + </message> + <message> + <location line="+2"/> + <source>Symlink to File</source> + <translation>Symlink til Fil</translation> + </message> + <message> + <location line="+1"/> + <source>Symlink to Directory</source> + <translation>Symlink til katalog</translation> + </message> + <message> + <location line="+1"/> + <source>Symlink to Special</source> + <translation>Symlink til Speciel</translation> + </message> + <message> + <location line="+1"/> + <source>File</source> + <translation>Fil</translation> + </message> + <message> + <location line="+1"/> + <source>Dir</source> + <translation>Katalog</translation> + </message> + <message> + <location line="+1"/> + <source>Special</source> + <translation>Speciel</translation> + </message> + <message> + <location line="+704"/> + <location line="+2100"/> + <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+337"/> + <source>Open</source> + <translation>Åbn</translation> + </message> + <message> + <location line="-1990"/> + <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+84"/> + <source>Save As</source> + <translation>Gem som</translation> + </message> + <message> + <location line="+642"/> + <location line="+5"/> + <location line="+355"/> + <source>&Open</source> + <translation>&Åbn</translation> + </message> + <message> + <location line="-357"/> + <location line="+341"/> + <source>&Save</source> + <translation>&Gem</translation> + </message> + <message> + <location line="-334"/> + <source>&Rename</source> + <translation>&Omdøb</translation> + </message> + <message> + <location line="+1"/> + <source>&Delete</source> + <translation>&Slet</translation> + </message> + <message> + <location line="+20"/> + <source>R&eload</source> + <translation>Gen&indlæs</translation> + </message> + <message> + <location line="+4"/> + <source>Sort by &Name</source> + <translation>Sortér efter n&avn</translation> + </message> + <message> + <location line="+2"/> + <source>Sort by &Size</source> + <translation>Sortér efter s&tørrelse</translation> + </message> + <message> + <location line="+1"/> + <source>Sort by &Date</source> + <translation>Sortér efter &dato</translation> + </message> + <message> + <location line="+2"/> + <source>&Unsorted</source> + <translation>&Usorteret</translation> + </message> + <message> + <location line="+15"/> + <source>Sort</source> + <translation>Sortér</translation> + </message> + <message> + <location line="+4"/> + <source>Show &hidden files</source> + <translation>Vis s&kjulte filer</translation> + </message> + <message> + <location line="+31"/> + <source>the file</source> + <translation>filen</translation> + </message> + <message> + <location line="+2"/> + <source>the directory</source> + <translation>kataloget</translation> + </message> + <message> + <location line="+2"/> + <source>the symlink</source> + <translation>symlinket</translation> + </message> + <message> + <location line="+3"/> + <source>Delete %1</source> + <translation>Slet %1</translation> + </message> + <message> + <location line="+1"/> + <source><qt>Are you sure you wish to delete %1 "%2"?</qt></source> + <translation><qt>Er du sikker på, at du vil slette %1 "%2"?</qt></translation> + </message> + <message> + <location line="+2"/> + <source>&Yes</source> + <translation>&Ja</translation> + </message> + <message> + <location line="+0"/> + <source>&No</source> + <translation>&Nej</translation> + </message> + <message> + <location line="+36"/> + <source>New Folder 1</source> + <translation>Ny folder 1</translation> + </message> + <message> + <location line="+5"/> + <source>New Folder</source> + <translation>Ny folder</translation> + </message> + <message> + <location line="+5"/> + <source>New Folder %1</source> + <translation>Ny folder %1</translation> + </message> + <message> + <location line="+98"/> + <source>Find Directory</source> + <translation>Find katalog</translation> + </message> + <message> + <location line="+5"/> + <location line="+108"/> + <source>Directories</source> + <translation>Kataloger</translation> + </message> + <message> + <location line="-2"/> + <source>Directory:</source> + <translation>Katalog:</translation> + </message> + <message> + <location line="+40"/> + <location line="+1110"/> + <source>Error</source> + <translation>Fejl</translation> + </message> + <message> + <location line="-1109"/> + <source>%1 +File not found. +Check path and filename.</source> + <translation>%1 +Filen blev ikke fundet. +Kontrollér sti og filnavn.</translation> + </message> + <message> + <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="-289"/> + <source>All Files (*.*)</source> + <translation>Alle filer (*.*)</translation> + </message> + <message> + <location line="+375"/> + <source>Open </source> + <translation>Åbn</translation> + </message> + <message> + <location line="+155"/> + <source>Select a Directory</source> + <translation>Vælg et katalog</translation> + </message> +</context> +<context> + <name>Q3LocalFs</name> + <message> + <location filename="../src/qt3support/network/q3localfs.cpp" line="+130"/> + <location line="+10"/> + <source>Could not read directory +%1</source> + <translation>Kunne ikke læse katalog +%1</translation> + </message> + <message> + <location line="+45"/> + <source>Could not create directory +%1</source> + <translation>Kunne ikke oprette katalog +%1</translation> + </message> + <message> + <location line="+34"/> + <source>Could not remove file or directory +%1</source> + <translation>Kunne ikke fjerne fil eller katalog +%1</translation> + </message> + <message> + <location line="+27"/> + <source>Could not rename +%1 +to +%2</source> + <translation>Kunne ikke omdøbe +%1 +to +%2</translation> + </message> + <message> + <location line="+25"/> + <source>Could not open +%1</source> + <translation>Kunne ikke åbne +%1</translation> + </message> + <message> + <location line="+68"/> + <source>Could not write +%1</source> + <translation>Kunne ikke skrive +%1</translation> + </message> +</context> +<context> + <name>Q3MainWindow</name> + <message> + <location filename="../src/qt3support/widgets/q3mainwindow.cpp" line="+2051"/> + <source>Line up</source> + <translation>Linie op</translation> + </message> + <message> + <location line="+2"/> + <source>Customize...</source> + <translation>Tilpas...</translation> + </message> +</context> +<context> + <name>Q3NetworkProtocol</name> + <message> + <location filename="../src/qt3support/network/q3networkprotocol.cpp" line="+854"/> + <source>Operation stopped by the user</source> + <translation>Brugeren stoppede handlingen</translation> + </message> +</context> +<context> + <name>Q3ProgressDialog</name> + <message> + <location filename="../src/qt3support/dialogs/q3progressdialog.cpp" line="+224"/> + <location line="+61"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> +</context> +<context> + <name>Q3TabDialog</name> + <message> + <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+189"/> + <location line="+814"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location line="-356"/> + <source>Apply</source> + <translation>Udfør</translation> + </message> + <message> + <location line="+43"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="+45"/> + <source>Defaults</source> + <translation>Standarder</translation> + </message> + <message> + <location line="+50"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> +</context> +<context> + <name>Q3TextEdit</name> + <message> + <location filename="../src/qt3support/text/q3textedit.cpp" line="+5429"/> + <source>&Undo</source> + <translation>&Fortryd</translation> + </message> + <message> + <location line="+1"/> + <source>&Redo</source> + <translation>&Gendan</translation> + </message> + <message> + <location line="+5"/> + <source>Cu&t</source> + <translation>&Klip</translation> + </message> + <message> + <location line="+1"/> + <source>&Copy</source> + <translation>K&opiér</translation> + </message> + <message> + <location line="+2"/> + <source>&Paste</source> + <translation>&Sæt ind</translation> + </message> + <message> + <location line="+3"/> + <source>Clear</source> + <translation>Ryd</translation> + </message> + <message> + <location line="+4"/> + <location line="+2"/> + <source>Select All</source> + <translation>Markér alt</translation> + </message> +</context> +<context> + <name>Q3TitleBar</name> + <message> + <location filename="../src/plugins/accessible/compat/q3complexwidgets.cpp" line="+246"/> + <source>System</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Restore up</source> + <translation>Gendan op</translation> + </message> + <message> + <location line="+1"/> + <source>Minimize</source> + <translation>Minimer</translation> + </message> + <message> + <location line="+3"/> + <source>Restore down</source> + <translation>Gendan ned</translation> + </message> + <message> + <location line="+1"/> + <source>Maximize</source> + <translation>Maksimér</translation> + </message> + <message> + <location line="+2"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="+18"/> + <source>Contains commands to manipulate the window</source> + <translation>Indeholder kommandoer til indstilling af vinduet</translation> + </message> + <message> + <location line="+3"/> + <source>Puts a minimized back to normal</source> + <translation>Sætter et minimeret vindue til normal størrelse</translation> + </message> + <message> + <location line="+1"/> + <source>Moves the window out of the way</source> + <translation>Flytter vinduet væk</translation> + </message> + <message> + <location line="+3"/> + <source>Puts a maximized window back to normal</source> + <translation>Sætter et maksimeret vindue til normal størrelse</translation> + </message> + <message> + <location line="+1"/> + <source>Makes the window full screen</source> + <translation>Gør vinduet til fuld skærm</translation> + </message> + <message> + <location line="+2"/> + <source>Closes the window</source> + <translation>Lukker vinduet</translation> + </message> + <message> + <location line="+2"/> + <source>Displays the name of the window and contains controls to manipulate it</source> + <translation>Viser vinduets navn og indeholder kontroller til indstilling af vinduet</translation> + </message> +</context> +<context> + <name>Q3ToolBar</name> + <message> + <location filename="../src/qt3support/widgets/q3toolbar.cpp" line="+692"/> + <source>More...</source> + <translation>Mere...</translation> + </message> +</context> +<context> + <name>Q3UrlOperator</name> + <message> + <location filename="../src/qt3support/network/q3urloperator.cpp" line="+386"/> + <location line="+260"/> + <location line="+4"/> + <source>The protocol `%1' is not supported</source> + <translation>Protokollen '%1' understøttes ikke</translation> + </message> + <message> + <location line="-260"/> + <source>The protocol `%1' does not support listing directories</source> + <translation>Protokollen '%1' understøtter ikke opremsning af kataloger</translation> + </message> + <message> + <location line="+3"/> + <source>The protocol `%1' does not support creating new directories</source> + <translation>Protokollen '%1' understøtter ikke oprettelse af nye kataloger</translation> + </message> + <message> + <location line="+3"/> + <source>The protocol `%1' does not support removing files or directories</source> + <translation>Protokollen '%1' understøtter ikke, at filer eller kataloger fjernes</translation> + </message> + <message> + <location line="+3"/> + <source>The protocol `%1' does not support renaming files or directories</source> + <translation>Protokollen '%1' understøtter ikke, at filer eller kataloger omdøbes</translation> + </message> + <message> + <location line="+3"/> + <source>The protocol `%1' does not support getting files</source> + <translation>Protokollen '%1' understøtter ikke hentning af filer</translation> + </message> + <message> + <location line="+3"/> + <source>The protocol `%1' does not support putting files</source> + <translation>Protokollen '%1' understøtter ikke upload af filer</translation> + </message> + <message> + <location line="+243"/> + <location line="+4"/> + <source>The protocol `%1' does not support copying or moving files or directories</source> + <translation>Protokollen '%1' understøtter ikke kopiering eller flytning af filer eller kataloger</translation> + </message> + <message> + <location line="+237"/> + <location line="+1"/> + <source>(unknown)</source> + <translation>(ukendt)</translation> + </message> +</context> +<context> + <name>Q3Wizard</name> + <message> + <location filename="../src/qt3support/dialogs/q3wizard.cpp" line="+177"/> + <source>&Cancel</source> + <translation>&Annuller</translation> + </message> + <message> + <location line="+1"/> + <source>< &Back</source> + <translation>< &Tilbage</translation> + </message> + <message> + <location line="+1"/> + <source>&Next ></source> + <translation>&Næste ></translation> + </message> + <message> + <location line="+1"/> + <source>&Finish</source> + <translation>&Udfør</translation> + </message> + <message> + <location line="+1"/> + <source>&Help</source> + <translation>&Hjælp</translation> + </message> +</context> +<context> + <name>QAbstractSocket</name> + <message> + <location filename="../src/network/socket/qabstractsocket.cpp" line="+868"/> + <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+615"/> + <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+657"/> + <location line="+26"/> + <source>Host not found</source> + <translation>Host blev ikke fundet</translation> + </message> + <message> + <location line="+50"/> + <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+3"/> + <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+4"/> + <source>Connection refused</source> + <translation>Forbindelse afvist</translation> + </message> + <message> + <location line="+141"/> + <source>Connection timed out</source> + <translation>Forbindelsen timed out</translation> + </message> + <message> + <location line="-547"/> + <location line="+787"/> + <location line="+208"/> + <source>Operation on socket is not supported</source> + <translation>Socket-operation ikke understøttet</translation> + </message> + <message> + <location line="+137"/> + <source>Socket operation timed out</source> + <translation>Socket-operation timed out</translation> + </message> + <message> + <location line="+380"/> + <source>Socket is not connected</source> + <translation>Socket ikke forbundet</translation> + </message> + <message> + <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-8"/> + <source>Network unreachable</source> + <translation>Netværket er ikke tilgængeligt</translation> + </message> +</context> +<context> + <name>QAbstractSpinBox</name> + <message> + <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1199"/> + <source>&Step up</source> + <translation>&Trin op</translation> + </message> + <message> + <location line="+2"/> + <source>Step &down</source> + <translation>Trin &ned</translation> + </message> + <message> + <location line="-8"/> + <source>&Select All</source> + <translation>&Vælg alle</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+376"/> + <source>Activate</source> + <translation>Aktivér</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qmessagebox.h" line="+352"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>Eksekverbar '%1' kræver Qt %2, ikke fundet Qt %3.</translation> + </message> + <message> + <location line="+2"/> + <source>Incompatible Qt Library Error</source> + <translation>Inkompatibel Qt Library fejl</translation> + </message> + <message> + <location filename="../src/gui/kernel/qapplication.cpp" line="+2247"/> + <source>QT_LAYOUT_DIRECTION</source> + <comment>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.</comment> + <translation></translation> + </message> + <message> + <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+2"/> + <source>Activates the program's main window</source> + <translation>Aktiverer programmets hovedvindue</translation> + </message> +</context> +<context> + <name>QAxSelect</name> + <message> + <location filename="../src/activeqt/container/qaxselect.ui"/> + <source>Select ActiveX Control</source> + <translation>Vælg ActiveX-kontrol</translation> + </message> + <message> + <location/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location/> + <source>&Cancel</source> + <translation>&Annuller</translation> + </message> + <message> + <location/> + <source>COM &Object:</source> + <translation>COM &Objekt:</translation> + </message> +</context> +<context> + <name>QCheckBox</name> + <message> + <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+114"/> + <source>Uncheck</source> + <translation>Fjern markering</translation> + </message> + <message> + <location line="+3"/> + <source>Check</source> + <translation>Kryds af</translation> + </message> + <message> + <location line="+1"/> + <source>Toggle</source> + <translation>Slå til/fra</translation> + </message> +</context> +<context> + <name>QColorDialog</name> + <message> + <location filename="../src/gui/dialogs/qcolordialog.cpp" line="+1253"/> + <source>Hu&e:</source> + <translation>Ton&e:</translation> + </message> + <message> + <location line="+1"/> + <source>&Sat:</source> + <translation>&Mæt:</translation> + </message> + <message> + <location line="+1"/> + <source>&Val:</source> + <translation>&Vær:</translation> + </message> + <message> + <location line="+1"/> + <source>&Red:</source> + <translation>&Rød:</translation> + </message> + <message> + <location line="+1"/> + <source>&Green:</source> + <translation>&Grøn:</translation> + </message> + <message> + <location line="+1"/> + <source>Bl&ue:</source> + <translation>Bl&å:</translation> + </message> + <message> + <location line="+1"/> + <source>A&lpha channel:</source> + <translation>Al&fa-kanal:</translation> + </message> + <message> + <location line="+101"/> + <source>Select Color</source> + <translation>Vælg farve</translation> + </message> + <message> + <location line="+137"/> + <source>&Basic colors</source> + <translation>&Basisfarver</translation> + </message> + <message> + <location line="+1"/> + <source>&Custom colors</source> + <translation>&Egne farver</translation> + </message> + <message> + <location line="+1"/> + <source>&Add to Custom Colors</source> + <translation>&Føj til egne farver</translation> + </message> +</context> +<context> + <name>QComboBox</name> + <message> + <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+1771"/> + <location line="+65"/> + <source>Open</source> + <translation>Åbn</translation> + </message> + <message> + <location filename="../src/gui/itemviews/qitemeditorfactory.cpp" line="+544"/> + <source>False</source> + <translation>Falsk</translation> + </message> + <message> + <location line="+1"/> + <source>True</source> + <translation>Sandt</translation> + </message> + <message> + <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+0"/> + <source>Close</source> + <translation>Luk</translation> + </message> +</context> +<context> + <name>QCoreApplication</name> + <message> + <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="+119"/> + <source>%1: key is empty</source> + <comment>QSystemSemaphore</comment> + <translation>%1: nøgle er tom</translation> + </message> + <message> + <location line="+12"/> + <source>%1: unable to make key</source> + <comment>QSystemSemaphore</comment> + <translation>%1: kunne ikke lave nøgle</translation> + </message> + <message> + <location line="+9"/> + <source>%1: ftok failed</source> + <comment>QSystemSemaphore</comment> + <translation>%1: ftok mislykkedes</translation> + </message> +</context> +<context> + <name>QDB2Driver</name> + <message> + <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+1276"/> + <source>Unable to connect</source> + <translation>Kunne ikke skabe forbindelse</translation> + </message> + <message> + <location line="+303"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktion</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktion</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to set autocommit</source> + <translation>Kunne ikke aktivere autocommit</translation> + </message> +</context> +<context> + <name>QDB2Result</name> + <message> + <location line="-1043"/> + <location line="+243"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre statement</translation> + </message> + <message> + <location line="-206"/> + <source>Unable to prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> + <message> + <location line="+196"/> + <source>Unable to bind variable</source> + <translation>Kunne ikke binde variabel</translation> + </message> + <message> + <location line="+92"/> + <source>Unable to fetch record %1</source> + <translation>Kunne ikke hente post %1</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to fetch next</source> + <translation>Kunne ikke hente næste</translation> + </message> + <message> + <location line="+20"/> + <source>Unable to fetch first</source> + <translation>Kunne ikke hente første</translation> + </message> +</context> +<context> + <name>QDateTimeEdit</name> + <message> + <location filename="../src/gui/widgets/qdatetimeedit.cpp" line="+2295"/> + <source>AM</source> + <translation></translation> + </message> + <message> + <location line="+0"/> + <source>am</source> + <translation></translation> + </message> + <message> + <location line="+2"/> + <source>PM</source> + <translation></translation> + </message> + <message> + <location line="+0"/> + <source>pm</source> + <translation></translation> + </message> +</context> +<context> + <name>QDial</name> + <message> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+951"/> + <source>QDial</source> + <translation></translation> + </message> + <message> + <location line="+2"/> + <source>SpeedoMeter</source> + <translation>Speedometer</translation> + </message> + <message> + <location line="+2"/> + <source>SliderHandle</source> + <translation></translation> + </message> +</context> +<context> + <name>QDialog</name> + <message> + <location filename="../src/gui/dialogs/qdialog.cpp" line="+597"/> + <source>What's This?</source> + <translation>Hvad er dette?</translation> + </message> + <message> + <location line="-115"/> + <source>Done</source> + <translation>Udført</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1869"/> + <location line="+464"/> + <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+561"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+0"/> + <source>&OK</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>&Save</source> + <translation>&Gem</translation> + </message> + <message> + <location line="+0"/> + <source>Save</source> + <translation>Gem</translation> + </message> + <message> + <location line="+3"/> + <source>Open</source> + <translation>Åbn</translation> + </message> + <message> + <location line="+3"/> + <source>&Cancel</source> + <translation>&Annuller</translation> + </message> + <message> + <location line="+0"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location line="+3"/> + <source>&Close</source> + <translation>&Luk</translation> + </message> + <message> + <location line="+0"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="+3"/> + <source>Apply</source> + <translation>Udfør</translation> + </message> + <message> + <location line="+3"/> + <source>Reset</source> + <translation>Nulstil</translation> + </message> + <message> + <location line="+3"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="+4"/> + <source>Don't Save</source> + <translation>Gem ikke</translation> + </message> + <message> + <location line="+4"/> + <source>Discard</source> + <translation>Kassér</translation> + </message> + <message> + <location line="+3"/> + <source>&Yes</source> + <translation>&Ja</translation> + </message> + <message> + <location line="+3"/> + <source>Yes to &All</source> + <translation>Ja til &alle</translation> + </message> + <message> + <location line="+3"/> + <source>&No</source> + <translation>&Nej</translation> + </message> + <message> + <location line="+3"/> + <source>N&o to All</source> + <translation>Ne&j til alle</translation> + </message> + <message> + <location line="+3"/> + <source>Save All</source> + <translation>Gem alle</translation> + </message> + <message> + <location line="+3"/> + <source>Abort</source> + <translation>Afbryd</translation> + </message> + <message> + <location line="+3"/> + <source>Retry</source> + <translation>Prøv igen</translation> + </message> + <message> + <location line="+3"/> + <source>Ignore</source> + <translation>Ignorer</translation> + </message> + <message> + <location line="+3"/> + <source>Restore Defaults</source> + <translation>Gendan standardværdier</translation> + </message> + <message> + <location line="-29"/> + <source>Close without Saving</source> + <translation>Luk uden at gemme</translation> + </message> +</context> +<context> + <name>QDirModel</name> + <message> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+453"/> + <source>Name</source> + <translation>Navn</translation> + </message> + <message> + <location line="+1"/> + <source>Size</source> + <translation>Størrelse</translation> + </message> + <message> + <location line="+3"/> + <source>Kind</source> + <comment>Match OS X Finder</comment> + <translation>Type</translation> + </message> + <message> + <location line="+2"/> + <source>Type</source> + <comment>All other platforms</comment> + <translation></translation> + </message> + <message> + <location line="+6"/> + <source>Date Modified</source> + <translation>Ændringsdato</translation> + </message> +</context> +<context> + <name>QDockWidget</name> + <message> + <location filename="../src/plugins/accessible/widgets/qaccessiblewidgets.cpp" line="+1239"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="+2"/> + <source>Dock</source> + <translation>Låst</translation> + </message> + <message> + <location line="+1"/> + <source>Float</source> + <translation>Flydende</translation> + </message> +</context> +<context> + <name>QDoubleSpinBox</name> + <message> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-537"/> + <source>More</source> + <translation>Mere</translation> + </message> + <message> + <location line="+2"/> + <source>Less</source> + <translation>Mindre</translation> + </message> +</context> +<context> + <name>QErrorMessage</name> + <message> + <location filename="../src/gui/dialogs/qerrormessage.cpp" line="+192"/> + <source>Debug Message:</source> + <translation>Debug-besked:</translation> + </message> + <message> + <location line="+3"/> + <source>Warning:</source> + <translation>Advarsel:</translation> + </message> + <message> + <location line="+3"/> + <source>Fatal Error:</source> + <translation>Fatal fejl:</translation> + </message> + <message> + <location line="+193"/> + <source>&Show this message again</source> + <translation>&Vis denne besked igen</translation> + </message> + <message> + <location line="+1"/> + <source>&OK</source> + <translation></translation> + </message> +</context> +<context> + <name>QFile</name> + <message> + <location filename="../src/corelib/io/qfile.cpp" line="+708"/> + <location line="+141"/> + <source>Destination file exists</source> + <translation>Destinationsfil findes</translation> + </message> + <message> + <location line="-108"/> + <source>Cannot remove source file</source> + <translation>Kan ikke fjerne kildefil</translation> + </message> + <message> + <location line="+120"/> + <source>Cannot open %1 for input</source> + <translation>Kan ikke åbne %1 til input</translation> + </message> + <message> + <location line="+17"/> + <source>Cannot open for output</source> + <translation>Kan ikke åbne til output</translation> + </message> + <message> + <location line="+10"/> + <source>Failure to write block</source> + <translation>Kunne ikke skrive blok</translation> + </message> + <message> + <location line="+13"/> + <source>Cannot create %1 for output</source> + <translation>Kunne ikke oprette %1 til output</translation> + </message> +</context> +<context> + <name>QFileDialog</name> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+514"/> + <location line="+447"/> + <source>All Files (*)</source> + <translation>Alle filer (*)</translation> + </message> + <message> + <location line="+222"/> + <source>Directories</source> + <translation>Kataloger</translation> + </message> + <message> + <location line="-3"/> + <location line="+50"/> + <location line="+1467"/> + <location line="+75"/> + <source>&Open</source> + <translation>&Åbn</translation> + </message> + <message> + <location line="-1592"/> + <location line="+50"/> + <source>&Save</source> + <translation>&Gem</translation> + </message> + <message> + <location line="-733"/> + <source>Open</source> + <translation>Åbn</translation> + </message> + <message> + <location line="+1515"/> + <source>%1 already exists. +Do you want to replace it?</source> + <translation>%1 findes allerede. +Ønsker du at erstatte den?</translation> + </message> + <message> + <location line="+20"/> + <source>%1 +File not found. +Please verify the correct file name was given.</source> + <translation>%1 +Filen kunne ikke findes. +Kontrollér, at det rigtige filnavn er indtastet.</translation> + </message> + <message> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+402"/> + <source>My Computer</source> + <translation>Min computer</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-1504"/> + <source>&Rename</source> + <translation>&Omdøb</translation> + </message> + <message> + <location line="+1"/> + <source>&Delete</source> + <translation>&Slet</translation> + </message> + <message> + <location line="+1"/> + <source>Show &hidden files</source> + <translation>Vis s&kjulte filer</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.ui"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Back</source> + <translation>Tilbage</translation> + </message> + <message> + <location/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Parent Directory</source> + <translation>Ovenliggende katalog</translation> + </message> + <message> + <location/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>List View</source> + <translation>Listevisning</translation> + </message> + <message> + <location/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Detail View</source> + <translation>Detaljevisning</translation> + </message> + <message> + <location/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Files of type:</source> + <translation>Filer af typen:</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+6"/> + <location line="+651"/> + <source>Directory:</source> + <translation>Katalog:</translation> + </message> + <message> + <location line="+791"/> + <location line="+861"/> + <source>%1 +Directory not found. +Please verify the correct directory name was given.</source> + <translation>%1 +Katalog kunne ikke findes. +Kontrollér, at det rigtige katalognavn er indtastet.</translation> + </message> + <message> + <location line="-218"/> + <source>'%1' is write protected. +Do you want to delete it anyway?</source> + <translation>'%1' er skrivebeskyttet. +Ønsker du alligevel at slette?</translation> + </message> + <message> + <location line="+5"/> + <source>Are sure you want to delete '%1'?</source> + <translation>Er du sikker på, at '%1' skal slettes?</translation> + </message> + <message> + <location line="+15"/> + <source>Could not delete directory.</source> + <translation>Kunne ikke slette kataloget.</translation> + </message> + <message> + <location line="+407"/> + <source>Recent Places</source> + <translation>Aktuelle steder</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+160"/> + <source>All Files (*.*)</source> + <translation>Alle filer (*.*)</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2549"/> + <source>Save As</source> + <translation>Gem som</translation> + </message> + <message> + <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+411"/> + <source>Drive</source> + <translation>Drev</translation> + </message> + <message> + <location line="+3"/> + <location line="+1"/> + <source>File</source> + <translation>Fil</translation> + </message> + <message> + <location line="+29"/> + <source>Unknown</source> + <translation>Ukendt</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-4"/> + <source>Find Directory</source> + <translation>Find katalog</translation> + </message> + <message> + <location line="+29"/> + <source>Show </source> + <translation>Vis</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.ui"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Forward</source> + <translation>Frem</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+1969"/> + <source>New Folder</source> + <translation>Ny folder</translation> + </message> + <message> + <location line="-1962"/> + <source>&New Folder</source> + <translation>&Ny folder</translation> + </message> + <message> + <location line="+659"/> + <location line="+38"/> + <source>&Choose</source> + <translation>&Vælg</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qsidebar.cpp" line="+437"/> + <source>Remove</source> + <translation>Fjern</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-690"/> + <location line="+655"/> + <source>File &name:</source> + <translation>&Filnavn:</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.ui"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Look in:</source> + <translation>Søg i:</translation> + </message> + <message> + <location/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <source>Create New Folder</source> + <translation>Opret ny folder</translation> + </message> +</context> +<context> + <name>QFileSystemModel</name> + <message> + <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+828"/> + <source>Invalid filename</source> + <translation>Ugyldigt filnavn</translation> + </message> + <message> + <location line="+1"/> + <source><b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.</source> + <translation><b>Navnet, %1, kan ikke benyttes.</b><p>Brug et andet navn med færre tegn og ingen kommatering.</translation> + </message> + <message> + <location line="+63"/> + <source>Name</source> + <translation>Navn</translation> + </message> + <message> + <location line="+2"/> + <source>Size</source> + <translation>Størrelse</translation> + </message> + <message> + <location line="+4"/> + <source>Kind</source> + <comment>Match OS X Finder</comment> + <translation>Type</translation> + </message> + <message> + <location line="+2"/> + <source>Type</source> + <comment>All other platforms</comment> + <translation></translation> + </message> + <message> + <location line="+7"/> + <source>Date Modified</source> + <translation>Ændringsdato</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+242"/> + <source>My Computer</source> + <translation>Min computer</translation> + </message> + <message> + <location line="+2"/> + <source>Computer</source> + <translation></translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="-163"/> + <source>%1 TB</source> + <translation>%1 TB</translation> + </message> + <message> + <location line="+2"/> + <source>%1 GB</source> + <translation>%1 GB</translation> + </message> + <message> + <location line="+2"/> + <source>%1 MB</source> + <translation>%1 MB</translation> + </message> + <message> + <location line="+2"/> + <source>%1 KB</source> + <translation>%1 KB'</translation> + </message> + <message> + <location line="+1"/> + <source>%1 bytes</source> + <translation>%1 bytes</translation> + </message> +</context> +<context> + <name>QFontDatabase</name> + <message> + <location filename="../src/gui/text/qfontdatabase.cpp" line="+90"/> + <location line="+1176"/> + <source>Normal</source> + <translation></translation> + </message> + <message> + <location line="-1173"/> + <location line="+12"/> + <location line="+1149"/> + <source>Bold</source> + <translation>Fed</translation> + </message> + <message> + <location line="-1158"/> + <location line="+1160"/> + <source>Demi Bold</source> + <translation></translation> + </message> + <message> + <location line="-1157"/> + <location line="+18"/> + <location line="+1135"/> + <source>Black</source> + <translation>Sort</translation> + </message> + <message> + <location line="-1145"/> + <source>Demi</source> + <translation></translation> + </message> + <message> + <location line="+6"/> + <location line="+1145"/> + <source>Light</source> + <translation>Lys</translation> + </message> + <message> + <location line="-1004"/> + <location line="+1007"/> + <source>Italic</source> + <translation>Kursiv</translation> + </message> + <message> + <location line="-1004"/> + <location line="+1006"/> + <source>Oblique</source> + <translation>Skråt</translation> + </message> + <message> + <location line="+705"/> + <source>Any</source> + <translation>Alle</translation> + </message> + <message> + <location line="+3"/> + <source>Latin</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Greek</source> + <translation>Græsk</translation> + </message> + <message> + <location line="+3"/> + <source>Cyrillic</source> + <translation>Kyrillisk</translation> + </message> + <message> + <location line="+3"/> + <source>Armenian</source> + <translation>Armensk</translation> + </message> + <message> + <location line="+3"/> + <source>Hebrew</source> + <translation>Hebræisk</translation> + </message> + <message> + <location line="+3"/> + <source>Arabic</source> + <translation>Arabisk</translation> + </message> + <message> + <location line="+3"/> + <source>Syriac</source> + <translation>Syrisk</translation> + </message> + <message> + <location line="+3"/> + <source>Thaana</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Devanagari</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Bengali</source> + <translation>Bengalsk</translation> + </message> + <message> + <location line="+3"/> + <source>Gurmukhi</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Gujarati</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Oriya</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Tamil</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Telugu</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Kannada</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Malayalam</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Sinhala</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Thai</source> + <translation>Thailandsk</translation> + </message> + <message> + <location line="+3"/> + <source>Lao</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Tibetan</source> + <translation>Tibetansk</translation> + </message> + <message> + <location line="+3"/> + <source>Myanmar</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Georgian</source> + <translation>georgisk </translation> + </message> + <message> + <location line="+3"/> + <source>Khmer</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Simplified Chinese</source> + <translation>Forenklet kinesisk</translation> + </message> + <message> + <location line="+3"/> + <source>Traditional Chinese</source> + <translation>Traditionelt kinesisk</translation> + </message> + <message> + <location line="+3"/> + <source>Japanese</source> + <translation>Japansk</translation> + </message> + <message> + <location line="+3"/> + <source>Korean</source> + <translation>Koreansk</translation> + </message> + <message> + <location line="+3"/> + <source>Vietnamese</source> + <translation>Vietnamesisk</translation> + </message> + <message> + <location line="+3"/> + <source>Symbol</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Ogham</source> + <translation></translation> + </message> + <message> + <location line="+3"/> + <source>Runic</source> + <translation></translation> + </message> +</context> +<context> + <name>QFontDialog</name> + <message> + <location filename="../src/gui/dialogs/qfontdialog.cpp" line="+772"/> + <source>&Font</source> + <translation>S&krifttype</translation> + </message> + <message> + <location line="+1"/> + <source>Font st&yle</source> + <translation>S&til</translation> + </message> + <message> + <location line="+1"/> + <source>&Size</source> + <translation>&Størrelse</translation> + </message> + <message> + <location line="+1"/> + <source>Effects</source> + <translation>Effekter</translation> + </message> + <message> + <location line="+1"/> + <source>Stri&keout</source> + <translation>&Overstreget</translation> + </message> + <message> + <location line="+1"/> + <source>&Underline</source> + <translation>&Understreg</translation> + </message> + <message> + <location line="+1"/> + <source>Sample</source> + <translation>Eksempel</translation> + </message> + <message> + <location line="+1"/> + <source>Wr&iting System</source> + <translation>Skr&ivesystem</translation> + </message> + <message> + <location line="-604"/> + <location line="+247"/> + <source>Select Font</source> + <translation>Vælg skrifttype</translation> + </message> +</context> +<context> + <name>QFtp</name> + <message> + <location filename="../src/network/access/qftp.cpp" line="+826"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+683"/> + <source>Not connected</source> + <translation>Ingen forbindelse</translation> + </message> + <message> + <location line="+65"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+65"/> + <source>Host %1 not found</source> + <translation>Vært %1 ikke fundet</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+4"/> + <source>Connection refused to host %1</source> + <translation>Forbindelse til vært %1 afvist</translation> + </message> + <message> + <location line="+4"/> + <source>Connection timed out to host %1</source> + <translation>Forbindelsen timed out til host %1</translation> + </message> + <message> + <location line="+104"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+102"/> + <location line="+1451"/> + <source>Connected to host %1</source> + <translation>Tilsluttet vært %1</translation> + </message> + <message> + <location line="+219"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="-1290"/> + <source>Connection refused for data connection</source> + <translation>Dataforbindelse afvist</translation> + </message> + <message> + <location line="+178"/> + <location line="+29"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+195"/> + <location line="+728"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> + <message> + <location line="+889"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+77"/> + <source>Connecting to host failed: +%1</source> + <translation>Forbindelse til vært mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Login failed: +%1</source> + <translation>Login mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Listing directory failed: +%1</source> + <translation>Opremsning af katalogindhold mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Changing directory failed: +%1</source> + <translation>Ændring af katalog mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Downloading file failed: +%1</source> + <translation>Downloading af fil mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Uploading file failed: +%1</source> + <translation>Uploading af fil mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Removing file failed: +%1</source> + <translation>Det mislykkedes at fjerne fil: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Creating directory failed: +%1</source> + <translation>Oprettelse af katalog mislykkedes: +%1</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> + <source>Removing directory failed: +%1</source> + <translation>Det mislykkedes at fjerne katalog: +%1</translation> + </message> + <message> + <location line="+28"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+25"/> + <location line="+250"/> + <source>Connection closed</source> + <translation>Forbindelse lukket</translation> + </message> + <message> + <location filename="../src/qt3support/network/q3ftp.cpp" line="-11"/> + <source>Host %1 found</source> + <translation>Vært %1 fundet</translation> + </message> + <message> + <location line="+4"/> + <source>Connection to %1 closed</source> + <translation>Forbindelse til %1 lukket</translation> + </message> + <message> + <location line="+3"/> + <source>Host found</source> + <translation>Vært fundet</translation> + </message> + <message> + <location line="+2"/> + <source>Connected to host</source> + <translation>Tilsluttet vært</translation> + </message> +</context> +<context> + <name>QHostInfo</name> + <message> + <location filename="../src/network/kernel/qhostinfo_p.h" line="+183"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> +</context> +<context> + <name>QHostInfoAgent</name> + <message> + <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+178"/> + <location line="+9"/> + <location line="+64"/> + <location line="+31"/> + <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+180"/> + <location line="+9"/> + <location line="+40"/> + <location line="+27"/> + <source>Host not found</source> + <translation>Vært ikke fundet</translation> + </message> + <message> + <location line="-44"/> + <location line="+39"/> + <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-34"/> + <location line="+29"/> + <source>Unknown address type</source> + <translation>Ukendt adressetype</translation> + </message> + <message> + <location line="+8"/> + <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-19"/> + <location line="+27"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> +</context> +<context> + <name>QHttp</name> + <message> + <location filename="../src/network/access/qhttp.cpp" line="+1574"/> + <location line="+820"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+1160"/> + <location line="+567"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> + <message> + <location line="-568"/> + <location filename="../src/qt3support/network/q3http.cpp" line="-370"/> + <source>Request aborted</source> + <translation>Forespørgsel blev annulleret</translation> + </message> + <message> + <location line="+579"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+381"/> + <source>No server set to connect to</source> + <translation>Ingen server at forbinde til</translation> + </message> + <message> + <location line="+164"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+56"/> + <source>Wrong content length</source> + <translation>Forkert indholdslængde</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+4"/> + <source>Server closed connection unexpectedly</source> + <translation>Serveren afsluttede uventet forbindelsen</translation> + </message> + <message> + <location line="+179"/> + <source>Unknown authentication method</source> + <translation>Ukendt autentifikationsmetode</translation> + </message> + <message> + <location line="+183"/> + <source>Error writing response to device</source> + <translation>Skrivefejl mens der blev skrevet til enheden</translation> + </message> + <message> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+901"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+38"/> + <source>Connection refused</source> + <translation>Forbindelse afvist</translation> + </message> + <message> + <location filename="../src/network/access/qhttp.cpp" line="-304"/> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-4"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>Host %1 not found</source> + <translation>Vært %1 ikke fundet</translation> + </message> + <message> + <location line="+20"/> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+10"/> + <location line="+19"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>HTTP request failed</source> + <translation>HTTP anmodning mislykkedes</translation> + </message> + <message> + <location line="+73"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+69"/> + <source>Invalid HTTP response header</source> + <translation>Ugyldig HTTP-svar-header</translation> + </message> + <message> + <location line="+125"/> + <location line="+48"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+40"/> + <location line="+47"/> + <source>Invalid HTTP chunked body</source> + <translation>Ugyldig HTTP chunked body</translation> + </message> + <message> + <location filename="../src/qt3support/network/q3http.cpp" line="+294"/> + <source>Host %1 found</source> + <translation>Vært %1 fundet</translation> + </message> + <message> + <location line="+3"/> + <source>Connected to host %1</source> + <translation>Tilsluttet vært %1</translation> + </message> + <message> + <location line="+3"/> + <source>Connection to %1 closed</source> + <translation>Forbindelse til %1 lukket</translation> + </message> + <message> + <location line="+8"/> + <source>Host found</source> + <translation>Vært fundet</translation> + </message> + <message> + <location line="+3"/> + <source>Connected to host</source> + <translation>Tilsluttet vært</translation> + </message> + <message> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-22"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>Connection closed</source> + <translation>Forbindelse lukket</translation> + </message> + <message> + <location filename="../src/network/access/qhttp.cpp" line="-135"/> + <source>Proxy authentication required</source> + <translation>Kræver proxy-autentificering</translation> + </message> + <message> + <location line="+4"/> + <source>Authentication required</source> + <translation>Autentificering påkrævet</translation> + </message> + <message> + <location line="-138"/> + <source>Connection refused (or timed out)</source> + <translation>Forbindelse blev afvist (eller tid udløb)</translation> + </message> + <message> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+6"/> + <source>Proxy requires authentication</source> + <translation>Proxy kræver autentificering</translation> + </message> + <message> + <location line="+3"/> + <source>Host requires authentication</source> + <translation>Vært kræver autentificering</translation> + </message> + <message> + <location line="+3"/> + <source>Data corrupted</source> + <translation>Data er ødelagt</translation> + </message> + <message> + <location line="+3"/> + <source>Unknown protocol specified</source> + <translation>En ukendt protokol blev angivet</translation> + </message> + <message> + <location line="+3"/> + <source>SSL handshake failed</source> + <translation>SSL handshake mislykkedes</translation> + </message> + <message> + <location filename="../src/network/access/qhttp.cpp" line="-2263"/> + <source>HTTPS connection requested but SSL support not compiled in</source> + <translation>Der blevet anmodet om en HTTPS-forbindelse, men SSL understøttelse er ikke kompileret ind</translation> + </message> +</context> +<context> + <name>QHttpSocketEngine</name> + <message> + <location filename="../src/network/socket/qhttpsocketengine.cpp" line="-89"/> + <source>Did not receive HTTP response from proxy</source> + <translation>Modtog ikke HTTP-svar fra proxy</translation> + </message> + <message> + <location line="+25"/> + <source>Error parsing authentication request from proxy</source> + <translation>Fejl under fortolking af autentificeringsanmodning fra proxy</translation> + </message> + <message> + <location line="+31"/> + <source>Authentication required</source> + <translation>Autentificering påkrævet</translation> + </message> + <message> + <location line="+27"/> + <source>Proxy denied connection</source> + <translation>Proxy nægtede forbindelse</translation> + </message> + <message> + <location line="+10"/> + <source>Error communicating with HTTP proxy</source> + <translation>Fejl under kommunikation med HTTP-proxy</translation> + </message> + <message> + <location line="+23"/> + <source>Proxy server not found</source> + <translation>Proxy-server kunne ikke findes</translation> + </message> + <message> + <location line="+2"/> + <source>Proxy connection refused</source> + <translation>Proxy-forbindelse nægtede</translation> + </message> + <message> + <location line="+2"/> + <source>Proxy server connection timed out</source> + <translation>Proxy-serverforbindelse timed out</translation> + </message> + <message> + <location line="+2"/> + <source>Proxy connection closed prematurely</source> + <translation>Proxy-forbindelse afsluttede i utide</translation> + </message> +</context> +<context> + <name>QIBaseDriver</name> + <message> + <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1435"/> + <source>Error opening database</source> + <translation>Der opstod fejl ved åbning af database</translation> + </message> + <message> + <location line="+54"/> + <source>Could not start transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+13"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+13"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktionen</translation> + </message> +</context> +<context> + <name>QIBaseResult</name> + <message> + <location line="-1097"/> + <source>Unable to create BLOB</source> + <translation>Kunne ikke oprette BLOB</translation> + </message> + <message> + <location line="+6"/> + <source>Unable to write BLOB</source> + <translation>Kunne ikke skrive BLOB</translation> + </message> + <message> + <location line="+14"/> + <source>Unable to open BLOB</source> + <translation>Kunne ikke åbne BLOB</translation> + </message> + <message> + <location line="+16"/> + <source>Unable to read BLOB</source> + <translation>Kunne ikke læse BLOB</translation> + </message> + <message> + <location line="+125"/> + <location line="+189"/> + <source>Could not find array</source> + <translation>Kunne ikke finde array</translation> + </message> + <message> + <location line="-157"/> + <source>Could not get array data</source> + <translation>Kunne ikke hente arraydata</translation> + </message> + <message> + <location line="+212"/> + <source>Could not get query info</source> + <translation>Kunne ikke hente forespørgselsinfo</translation> + </message> + <message> + <location line="+20"/> + <source>Could not start transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+19"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+33"/> + <source>Could not allocate statement</source> + <translation>Kunne ikke allokere statement</translation> + </message> + <message> + <location line="+5"/> + <source>Could not prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> + <message> + <location line="+5"/> + <location line="+7"/> + <source>Could not describe input statement</source> + <translation>Kunne ikke beskrive input-statement</translation> + </message> + <message> + <location line="+10"/> + <source>Could not describe statement</source> + <translation>Kunne ikke beskrive statement</translation> + </message> + <message> + <location line="+115"/> + <source>Unable to close statement</source> + <translation>Kunne ikke lukke udsagn</translation> + </message> + <message> + <location line="+8"/> + <source>Unable to execute query</source> + <translation>Kunne ikke udføre forespørgsel</translation> + </message> + <message> + <location line="+46"/> + <source>Could not fetch next item</source> + <translation>Kunne ikke hente næste element</translation> + </message> + <message> + <location line="+160"/> + <source>Could not get statement info</source> + <translation>Kunne ikke hente udsagnsinformation</translation> + </message> +</context> +<context> + <name>QIODevice</name> + <message> + <location filename="../src/corelib/global/qglobal.cpp" line="+1869"/> + <source>Permission denied</source> + <translation>Tilladelse nægtet</translation> + </message> + <message> + <location line="+3"/> + <source>Too many open files</source> + <translation>Der er for mange åbne filer</translation> + </message> + <message> + <location line="+3"/> + <source>No such file or directory</source> + <translation>Fil eller katalog findes ikke</translation> + </message> + <message> + <location line="+3"/> + <source>No space left on device</source> + <translation>Ingen plads tilbage på enheden</translation> + </message> + <message> + <location filename="../src/corelib/io/qiodevice.cpp" line="+1536"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> +</context> +<context> + <name>QInputContext</name> + <message> + <location filename="../src/gui/inputmethod/qinputcontextfactory.cpp" line="+242"/> + <source>XIM</source> + <translation></translation> + </message> + <message> + <location line="+23"/> + <source>XIM input method</source> + <translation>XIM input-metode</translation> + </message> + <message> + <location line="+4"/> + <source>Windows input method</source> + <translation>Windows input-metode</translation> + </message> + <message> + <location line="+4"/> + <source>Mac OS X input method</source> + <translation>Mac OS X input-metode</translation> + </message> +</context> +<context> + <name>QInputDialog</name> + <message> + <location filename="../src/gui/dialogs/qinputdialog.cpp" line="+223"/> + <source>Enter a value:</source> + <translation>Indtast en værdi:</translation> + </message> +</context> +<context> + <name>QLibrary</name> + <message> + <location filename="../src/corelib/plugin/qlibrary.cpp" line="+378"/> + <source>Could not mmap '%1': %2</source> + <translation></translation> + </message> + <message> + <location line="+22"/> + <source>Plugin verification data mismatch in '%1'</source> + <translation>Plugin-verifikationsdata er sat forkert sammen i '%1'</translation> + </message> + <message> + <location line="+6"/> + <source>Could not unmap '%1': %2</source> + <translation>Der var ikke muligt at lave unmap på '%1': %2 </translation> + </message> + <message> + <location line="+302"/> + <source>The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]</source> + <translation>Plugin '%1' bruger inkompatibelt Qt-bibliotek. (%2.%3.%4) [%5]</translation> + </message> + <message> + <location line="+20"/> + <source>The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"</source> + <translation>Plugin '%1' bruger inkompatibelt Qt-bibliotek. Forventet build key "%2", hentede "%3"'</translation> + </message> + <message> + <location line="+340"/> + <source>Unknown error</source> + <translation>Ukendt fejl'</translation> + </message> + <message> + <location line="-377"/> + <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+280"/> + <source>The shared library was not found.</source> + <translation>DSO blev ikke fundet.</translation> + </message> + <message> + <location line="+2"/> + <source>The file '%1' is not a valid Qt plugin.</source> + <translation>Filen '%1' er ikke et gyldigt Qt-plugin.</translation> + </message> + <message> + <location line="+43"/> + <source>The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)</source> + <translation>Plugin '%1' bruger inkompatibelt Qt-bibliotek. (Ikke muligt at mikse debug og release-biblioteker)</translation> + </message> + <message> + <location filename="../src/corelib/plugin/qlibrary_unix.cpp" line="+209"/> + <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+99"/> + <source>Cannot load library %1: %2</source> + <translation>Kan ikke indlæse bibliotek %1: %2</translation> + </message> + <message> + <location line="+16"/> + <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+26"/> + <source>Cannot unload library %1: %2</source> + <translation>Kan ikke afregistrere bibliotek %1: %2</translation> + </message> + <message> + <location line="+31"/> + <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+15"/> + <source>Cannot resolve symbol "%1" in %2: %3</source> + <translation>Kan ikke løse symbol "%1" i %2: %3</translation> + </message> +</context> +<context> + <name>QLineEdit</name> + <message> + <location filename="../src/gui/widgets/qlineedit.cpp" line="+2680"/> + <source>&Undo</source> + <translation>&Fortryd</translation> + </message> + <message> + <location line="+4"/> + <source>&Redo</source> + <translation>&Gendan</translation> + </message> + <message> + <location line="+7"/> + <source>Cu&t</source> + <translation>K&lip</translation> + </message> + <message> + <location line="+4"/> + <source>&Copy</source> + <translation>&Kopiér</translation> + </message> + <message> + <location line="+4"/> + <source>&Paste</source> + <translation>&Sæt ind</translation> + </message> + <message> + <location line="+5"/> + <source>Delete</source> + <translation>Slet</translation> + </message> + <message> + <location line="+6"/> + <source>Select All</source> + <translation>Markér alt</translation> + </message> +</context> +<context> + <name>QLocalServer</name> + <message> + <location filename="../src/network/socket/qlocalserver.cpp" line="+226"/> + <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+233"/> + <source>%1: Name error</source> + <translation>%1: Navnefejl</translation> + </message> + <message> + <location filename="../src/network/socket/qlocalserver_unix.cpp" line="-8"/> + <source>%1: Permission denied</source> + <translation>%1: Tilladelse nægtet</translation> + </message> + <message> + <location line="+12"/> + <source>%1: Address in use</source> + <translation>%1: Adresse i brug</translation> + </message> + <message> + <location line="+5"/> + <location filename="../src/network/socket/qlocalserver_win.cpp" line="+158"/> + <source>%1: Unknown error %2</source> + <translation>%1: Ukendt fejl %2</translation> + </message> +</context> +<context> + <name>QLocalSocket</name> + <message> + <location filename="../src/network/socket/qlocalsocket_tcp.cpp" line="+132"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+134"/> + <source>%1: Connection refused</source> + <translation>%1: Forbindelse afvist</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: Remote closed</source> + <translation>%1: Den anden ende lukkede</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+80"/> + <location line="+43"/> + <source>%1: Invalid name</source> + <translation>%1: Ugyldigt navn</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: Socket access error</source> + <translation>%1: Fejl i socket-adgang</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: Socket resource error</source> + <translation>%1: Fejl i socket-ressource</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: Socket operation timed out</source> + <translation>%1: Socket-handling timed out</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: Datagram too large</source> + <translation>%1: Datagram er for stort</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <location filename="../src/network/socket/qlocalsocket_win.cpp" line="-48"/> + <source>%1: Connection error</source> + <translation>%1: Forbindelsesfejl</translation> + </message> + <message> + <location line="+3"/> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> + <source>%1: The socket operation is not supported</source> + <translation>%1: Socket-handlingen understøttes ikke</translation> + </message> + <message> + <location line="+4"/> + <source>%1: Unknown error</source> + <translation>%1: Ukendt fejl</translation> + </message> + <message> + <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+4"/> + <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+10"/> + <source>%1: Unknown error %2</source> + <translation>%1: Ukendt fejl %2</translation> + </message> +</context> +<context> + <name>QMYSQLDriver</name> + <message> + <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1252"/> + <source>Unable to open database '</source> + <translation>Kunne ikke åbne databasen '</translation> + </message> + <message> + <location line="+7"/> + <source>Unable to connect</source> + <translation>Kunne ikke forbinde</translation> + </message> + <message> + <location line="+127"/> + <source>Unable to begin transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktionen</translation> + </message> +</context> +<context> + <name>QMYSQLResult</name> + <message> + <location line="-935"/> + <source>Unable to fetch data</source> + <translation>Kunne ikke hente data</translation> + </message> + <message> + <location line="+183"/> + <source>Unable to execute query</source> + <translation>Kunne ikke udføre forespørgsel</translation> + </message> + <message> + <location line="+6"/> + <source>Unable to store result</source> + <translation>Kunne ikke gemme resultatet</translation> + </message> + <message> + <location line="+194"/> + <location line="+8"/> + <source>Unable to prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> + <message> + <location line="+36"/> + <source>Unable to reset statement</source> + <translation>Kunne ikke nulstille udsagn</translation> + </message> + <message> + <location line="+87"/> + <source>Unable to bind value</source> + <translation>Kunne ikke tildele værdi</translation> + </message> + <message> + <location line="+11"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre udsagn</translation> + </message> + <message> + <location line="+14"/> + <location line="+21"/> + <source>Unable to bind outvalues</source> + <translation>Kunne ikke binde udværdier</translation> + </message> + <message> + <location line="-12"/> + <source>Unable to store statement results</source> + <translation>Kunne ikke gemme udsagnsresultater</translation> + </message> + <message> + <location line="-257"/> + <source>Unable to execute next query</source> + <translation>Kunne ikke udføre næste forespørgsel</translation> + </message> + <message> + <location line="+10"/> + <source>Unable to store next result</source> + <translation>Kunne ikke gemme næste resultat</translation> + </message> +</context> +<context> + <name>QMdiArea</name> + <message> + <location filename="../src/gui/widgets/qmdiarea.cpp" line="+290"/> + <source>(Untitled)</source> + <translation>(Uden titel)</translation> + </message> +</context> +<context> + <name>QMdiSubWindow</name> + <message> + <location filename="../src/gui/widgets/qmdisubwindow.cpp" line="+280"/> + <source>%1 - [%2]</source> + <translation></translation> + </message> + <message> + <location line="+72"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="-18"/> + <source>Minimize</source> + <translation>Minimér</translation> + </message> + <message> + <location line="+13"/> + <source>Restore Down</source> + <translation>Gendan Ned</translation> + </message> + <message> + <location line="+707"/> + <source>&Restore</source> + <translation>&Gendan</translation> + </message> + <message> + <location line="+3"/> + <source>&Move</source> + <translation>&Flyt</translation> + </message> + <message> + <location line="+1"/> + <source>&Size</source> + <translation>&Størrelse</translation> + </message> + <message> + <location line="+1"/> + <source>Mi&nimize</source> + <translation>Mi&nimér</translation> + </message> + <message> + <location line="+2"/> + <source>Ma&ximize</source> + <translation>Ma&ksimér</translation> + </message> + <message> + <location line="+2"/> + <source>Stay on &Top</source> + <translation>Bliv &oppe</translation> + </message> + <message> + <location line="+3"/> + <source>&Close</source> + <translation>&Luk</translation> + </message> + <message> + <location line="-787"/> + <source>- [%1]</source> + <translation></translation> + </message> + <message> + <location line="+58"/> + <source>Maximize</source> + <translation>Maksimér</translation> + </message> + <message> + <location line="+3"/> + <source>Unshade</source> + <translation>Fjern skygge</translation> + </message> + <message> + <location line="+3"/> + <source>Shade</source> + <translation>Skygge</translation> + </message> + <message> + <location line="+6"/> + <source>Restore</source> + <translation>Gendan</translation> + </message> + <message> + <location line="+6"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="+3"/> + <source>Menu</source> + <translation></translation> + </message> +</context> +<context> + <name>QMenu</name> + <message> + <location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/> + <location line="+225"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="-224"/> + <location line="+225"/> + <source>Open</source> + <translation>Åbn</translation> + </message> + <message> + <location line="-223"/> + <location line="+225"/> + <location line="+51"/> + <source>Execute</source> + <translation>Udfør</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../src/gui/dialogs/qmessagebox.cpp" line="-1111"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="-853"/> + <location line="+852"/> + <location filename="../src/gui/dialogs/qmessagebox.h" line="-52"/> + <location line="+8"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location line="+475"/> + <source><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></source> + <translation><h3>Om Qt</h3><p>Dette program anvender Qt version %1.</p><p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p>Qt er tilgængeligt under tre forskellige licenser skabt med henblik på at imødekomme forskellige brugeres behov.</p><p>Qt licenseret under vores kommercielle licensaftale er passende for udvikling af proprietær/kommerciel software, hvor du ikke ønsker at dele sourcekode med tredie part, eller på anden vis ikke kan tiltræde vilkårerne i GNU LGPL version 2.1 eller GNU GPL version 3.0</p><p>Qt licenseret under GLU General Public License version 3.0 er passende for udvikling af Qt applikationer, hvor du ønsker at bruge softwaren i kombination med software under vilkårerne i GNU GPL version 3.0, eller hvor du ellers er villig til at overholde vilkårerne i GNU GPL version 3.0</p><p>See venligst <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> for et overblik over Qt licensforhold.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p></translation> + </message> + <message> + <location line="+34"/> + <source>About Qt</source> + <translation>Om Qt</translation> + </message> + <message> + <source><p>This program uses Qt version %1.</p></source> + <translation type="obsolete"><p>Dette program bruger Qt-version %1.</p></translation> + </message> + <message> + <location line="-1608"/> + <source>Show Details...</source> + <translation>Vis detaljer...</translation> + </message> + <message> + <location line="+1"/> + <source>Hide Details...</source> + <translation>Skjul detaljer...</translation> + </message> + <message> + <source><h3>About Qt</h3>%1<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 a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p></source> + <translation type="obsolete"><h3>Om Qt</h3>%1<p>Qt er et C++ toolkit til cross-platform applikationsudvikling.</p><p>Qt tilbyder single-source portabilitet til MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, og alle større kommercielle Unix-varianter. Qt er også tilgængeligt til indlejrede systemer som Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt er et Nokia produkt. Se <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for yderligere information.</p></translation> + </message> + <message> + <source><p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p></source> + <translation type="obsolete"><p>Dette program bruger Qt Open Source Edition version %1.</p><p>Qt Open Source Edition er beregnet til udvikling af Open Source applikationer. En kommerciel Qt licens er nødvendig til udvikling af proprietære (lukket sourcekode) applikationer.</p><p>Se venligst <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for et overblik over Qt licensforhold.</p></translation> + </message> +</context> +<context> + <name>QMultiInputContext</name> + <message> + <location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp" line="+88"/> + <source>Select IM</source> + <translation>Markér IM</translation> + </message> +</context> +<context> + <name>QMultiInputContextPlugin</name> + <message> + <location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp" line="+95"/> + <source>Multiple input method switcher</source> + <translation>Multiple input metode-switcher</translation> + </message> + <message> + <location line="+7"/> + <source>Multiple input method switcher that uses the context menu of the text widgets</source> + <translation>Multiple input metode-switcher, der benytter tekstkontrollernes kontekstmenuer</translation> + </message> +</context> +<context> + <name>QNativeSocketEngine</name> + <message> + <location filename="../src/network/socket/qnativesocketengine.cpp" line="+206"/> + <source>The remote host closed the connection</source> + <translation>Fjern-hosten lukkede forbindelsen</translation> + </message> + <message> + <location line="+3"/> + <source>Network operation timed out</source> + <translation>Netværksoperationen timed out</translation> + </message> + <message> + <location line="+3"/> + <source>Out of resources</source> + <translation>Ikke flere ressourcer</translation> + </message> + <message> + <location line="+3"/> + <source>Unsupported socket operation</source> + <translation>Socket-operation ikke understøttet</translation> + </message> + <message> + <location line="+3"/> + <source>Protocol type not supported</source> + <translation>Protokoltypen understøttes ikke</translation> + </message> + <message> + <location line="+3"/> + <source>Invalid socket descriptor</source> + <translation>Ugyldig socket-deskriptor</translation> + </message> + <message> + <location line="+6"/> + <source>Network unreachable</source> + <translation>Netværket er ikke tilgængeligt</translation> + </message> + <message> + <location line="+3"/> + <source>Permission denied</source> + <translation>Tilladelse nægtet</translation> + </message> + <message> + <location line="+3"/> + <source>Connection timed out</source> + <translation>Forbindelsen timed out</translation> + </message> + <message> + <location line="+3"/> + <source>Connection refused</source> + <translation>Forbindelse afvist</translation> + </message> + <message> + <location line="+3"/> + <source>The bound address is already in use</source> + <translation>Den bundne adresse er allerede i brug</translation> + </message> + <message> + <location line="+3"/> + <source>The address is not available</source> + <translation>Adressen er ikke tilgængelig</translation> + </message> + <message> + <location line="+3"/> + <source>The address is protected</source> + <translation>Adressen er beskyttet</translation> + </message> + <message> + <location line="+6"/> + <source>Unable to send a message</source> + <translation>Kunne ikke sende en besked</translation> + </message> + <message> + <location line="+3"/> + <source>Unable to receive a message</source> + <translation>Kunne ikke modtage en besked</translation> + </message> + <message> + <location line="+3"/> + <source>Unable to write</source> + <translation>Kunne ikke skrive</translation> + </message> + <message> + <location line="+3"/> + <source>Network error</source> + <translation>Netværksfejl</translation> + </message> + <message> + <location line="+3"/> + <source>Another socket is already listening on the same port</source> + <translation>En anden socket lytter allerede på samme port</translation> + </message> + <message> + <location line="-66"/> + <source>Unable to initialize non-blocking socket</source> + <translation>Kunne ikke initialisere non-blocking socket</translation> + </message> + <message> + <location line="+3"/> + <source>Unable to initialize broadcast socket</source> + <translation>Kunne ikke initialisere broadcast-socket</translation> + </message> + <message> + <location line="+3"/> + <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source> + <translation>Forsøg på at bruge IPv6-socket på en platform uden IPv6-support</translation> + </message> + <message> + <location line="+21"/> + <source>Host unreachable</source> + <translation>Vært er ikke tilgængelig</translation> + </message> + <message> + <location line="+24"/> + <source>Datagram was too large to send</source> + <translation>Datagrammet var for stort til at blive sendt</translation> + </message> + <message> + <location line="+18"/> + <source>Operation on non-socket</source> + <translation>Handling på non-socket</translation> + </message> + <message> + <location line="+6"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> + <message> + <location line="-3"/> + <source>The proxy type is invalid for this operation</source> + <translation>Proxytypen er ugyldig til denne handling</translation> + </message> +</context> +<context> + <name>QNetworkAccessCacheBackend</name> + <message> + <location filename="../src/network/access/qnetworkaccesscachebackend.cpp" line="+65"/> + <source>Error opening %1</source> + <translation>Der opstod fejl i at åbne %1</translation> + </message> +</context> +<context> + <name>QNetworkAccessFileBackend</name> + <message> + <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+99"/> + <source>Request for opening non-local file %1</source> + <translation>Anmodning om at åbne ikke-lokal fil %1</translation> + </message> + <message> + <location line="+42"/> + <source>Error opening %1: %2</source> + <translation>Der opstod fejl i at åbne %1: %2</translation> + </message> + <message> + <location line="+56"/> + <source>Write error writing to %1: %2</source> + <translation>Skrivefejl mens der blev skrevet til %1: %2</translation> + </message> + <message> + <location line="+33"/> + <source>Cannot open %1: Path is a directory</source> + <translation>Kan ikke åbne %1: Stien er et katalog</translation> + </message> + <message> + <location line="+21"/> + <source>Read error reading from %1: %2</source> + <translation>Læsefejl mens der blev læst fra %1: %2</translation> + </message> +</context> +<context> + <name>QNetworkAccessFtpBackend</name> + <message> + <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+165"/> + <source>No suitable proxy found</source> + <translation>Ingen passende proxy blev fundet</translation> + </message> + <message> + <location line="+14"/> + <source>Cannot open %1: is a directory</source> + <translation>Kan ikke åbne %1: Er et katalog</translation> + </message> + <message> + <location line="+130"/> + <source>Logging in to %1 failed: authentication required</source> + <translation>Der opstod fejl i at logge på %1: Autentificering kræves</translation> + </message> + <message> + <location line="+39"/> + <source>Error while downloading %1: %2</source> + <translation>Der opstod fejl i at downloade %1: %2</translation> + </message> + <message> + <location line="+2"/> + <source>Error while uploading %1: %2</source> + <translation>Der opstod fejl i at uploade %1: %2</translation> + </message> +</context> +<context> + <name>QNetworkAccessHttpBackend</name> + <message> + <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+597"/> + <source>No suitable proxy found</source> + <translation>Ingen passende proxy blev fundet</translation> + </message> +</context> +<context> + <name>QNetworkReply</name> + <message> + <location line="+128"/> + <source>Error downloading %1 - server replied: %2</source> + <translation>Der opstod fejl i at downloade %1 - serveren svarede: %2</translation> + </message> + <message> + <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+68"/> + <source>Protocol "%1" is unknown</source> + <translation>Protokollen "%1" er ukendt</translation> + </message> +</context> +<context> + <name>QNetworkReplyImpl</name> + <message> + <location line="+432"/> + <location line="+22"/> + <source>Operation canceled</source> + <translation>Handling blev annulleret</translation> + </message> +</context> +<context> + <name>QOCIDriver</name> + <message> + <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2069"/> + <source>Unable to logon</source> + <translation>Kunne ikke logge på</translation> + </message> + <message> + <location line="-144"/> + <source>Unable to initialize</source> + <comment>QOCIDriver</comment> + <translation>Kunne ikke initialisere</translation> + </message> + <message> + <location line="+215"/> + <source>Unable to begin transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+19"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+19"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktionen</translation> + </message> +</context> +<context> + <name>QOCIResult</name> + <message> + <location line="-963"/> + <location line="+161"/> + <location line="+15"/> + <source>Unable to bind column for batch execute</source> + <translation>Kunne ikke tildele kolonne til batch-udførsel</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to execute batch statement</source> + <translation>Kunne ikke udføre batch-udsagn</translation> + </message> + <message> + <location line="+302"/> + <source>Unable to goto next</source> + <translation>Kunne ikke gå til den næste</translation> + </message> + <message> + <location line="+59"/> + <source>Unable to alloc statement</source> + <translation>Kunne ikke allokere udsagn</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> + <message> + <location line="+36"/> + <source>Unable to bind value</source> + <translation>Kunne ikke tildele værdi</translation> + </message> + <message> + <source>Unable to execute select statement</source> + <translation type="obsolete">Kunne ikke udføre det valgte udsagn</translation> + </message> + <message> + <location line="+19"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre udsagn</translation> + </message> +</context> +<context> + <name>QODBCDriver</name> + <message> + <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1781"/> + <source>Unable to connect</source> + <translation>Kunne ikke forbinde</translation> + </message> + <message> + <location line="+6"/> + <source>Unable to connect - Driver doesn't support all needed functionality</source> + <translation>Kunne ikke forbinde. Driveren understøtter ikke alle de nødvendige funktionaliteter</translation> + </message> + <message> + <location line="+242"/> + <source>Unable to disable autocommit</source> + <translation>Kunne ikke slå auto-udfør fra</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktionen</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to enable autocommit</source> + <translation>Kunne ikke slå auto-udfør til</translation> + </message> +</context> +<context> + <name>QODBCResult</name> + <message> + <location line="-1218"/> + <location line="+349"/> + <source>QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration</source> + <translation>QODBCResult::reset: Kunne ikke indstille 'SQL_CURSOR_STATIC' til udsagnsattribut. Kontrollér ODBC-driver-konfigurationen</translation> + </message> + <message> + <location line="-332"/> + <location line="+626"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre udsagn</translation> + </message> + <message> + <location line="-555"/> + <source>Unable to fetch next</source> + <translation>Kunne ikke hente den næste</translation> + </message> + <message> + <location line="+279"/> + <source>Unable to prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> + <message> + <location line="+268"/> + <source>Unable to bind variable</source> + <translation>Kunne ikke tildele variabel</translation> + </message> + <message> + <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+194"/> + <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-475"/> + <location line="+578"/> + <source>Unable to fetch last</source> + <translation>Kunne ikke hente den sidste</translation> + </message> + <message> + <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-672"/> + <source>Unable to fetch</source> + <translation>Kunne ikke hente</translation> + </message> + <message> + <location line="+44"/> + <source>Unable to fetch first</source> + <translation>Kunne ikke hente den første</translation> + </message> + <message> + <location line="+19"/> + <source>Unable to fetch previous</source> + <translation>Kunne ikke hente den forrige</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../src/gui/util/qdesktopservices_mac.cpp" line="+165"/> + <source>Home</source> + <translation>Hjem</translation> + </message> + <message> + <location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+74"/> + <source>Operation not supported on %1</source> + <translation>Handling blev ikke understøttet på %1</translation> + </message> + <message> + <location line="+53"/> + <source>Invalid URI: %1</source> + <translation>Ugyldig URI: %1</translation> + </message> + <message> + <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+175"/> + <source>Write error writing to %1: %2</source> + <translation>Skrivefejl mens der blev skrevet til %1: %2</translation> + </message> + <message> + <location line="+57"/> + <source>Read error reading from %1: %2</source> + <translation>Læsefejl mens der blev læst fra %1: %2</translation> + </message> + <message> + <location line="+31"/> + <source>Socket error on %1: %2</source> + <translation>Socket-fejl på %1: %2</translation> + </message> + <message> + <location line="+15"/> + <source>Remote host closed the connection prematurely on %1</source> + <translation>Fjern-host lukkede forbindelsen for tidligt på %1</translation> + </message> + <message> + <location line="+53"/> + <source>Protocol error: packet of size 0 received</source> + <translation>Protokolfejl: Pakke på størrelsen 0 modtaget</translation> + </message> + <message> + <location filename="../src/network/kernel/qhostinfo.cpp" line="+177"/> + <location line="+57"/> + <source>No host name given</source> + <translation>Hostnavn mangler</translation> + </message> +</context> +<context> + <name>QPPDOptionsModel</name> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/> + <source>Name</source> + <translation>Navn</translation> + </message> + <message> + <location line="+2"/> + <source>Value</source> + <translation>Værdi</translation> + </message> +</context> +<context> + <name>QPSQLDriver</name> + <message> + <location filename="../src/sql/drivers/psql/qsql_psql.cpp" line="+763"/> + <source>Unable to connect</source> + <translation>Kunne ikke skabe forbindelse</translation> + </message> + <message> + <location line="+49"/> + <source>Could not begin transaction</source> + <translation>Kunne ikke påbegynde transaktion</translation> + </message> + <message> + <location line="+17"/> + <source>Could not commit transaction</source> + <translation>Kunne ikke gennemføre transaktion</translation> + </message> + <message> + <location line="+16"/> + <source>Could not rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktion</translation> + </message> + <message> + <location line="+358"/> + <source>Unable to subscribe</source> + <translation>Kunne ikke tilmelde</translation> + </message> + <message> + <location line="+32"/> + <source>Unable to unsubscribe</source> + <translation>Kunne ikke afmelde</translation> + </message> +</context> +<context> + <name>QPSQLResult</name> + <message> + <location line="-1058"/> + <source>Unable to create query</source> + <translation>Kunne ikke oprette forespørgsel</translation> + </message> + <message> + <location line="+374"/> + <source>Unable to prepare statement</source> + <translation>Kunne ikke forberede udsagn</translation> + </message> +</context> +<context> + <name>QPageSetupWidget</name> + <message> + <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="+304"/> + <source>Centimeters (cm)</source> + <translation>Centimeter (cm)</translation> + </message> + <message> + <location line="+0"/> + <source>Millimeters (mm)</source> + <translation>Millimeter (mm)</translation> + </message> + <message> + <location line="+0"/> + <source>Inches (in)</source> + <translation></translation> + </message> + <message> + <location line="+0"/> + <source>Points (pt)</source> + <translation>Point (pt)</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qpagesetupwidget.ui"/> + <source>Form</source> + <translation></translation> + </message> + <message> + <location/> + <source>Paper</source> + <translation>Papir</translation> + </message> + <message> + <location/> + <source>Page size:</source> + <translation>Sidestørrelse:</translation> + </message> + <message> + <location/> + <source>Width:</source> + <translation>Vidde:</translation> + </message> + <message> + <location/> + <source>Height:</source> + <translation>Højde:</translation> + </message> + <message> + <location/> + <source>Paper source:</source> + <translation>Papirkilde:</translation> + </message> + <message> + <location/> + <source>Orientation</source> + <translation></translation> + </message> + <message> + <location/> + <source>Portrait</source> + <translation>Portræt</translation> + </message> + <message> + <location/> + <source>Landscape</source> + <translation>Landskab</translation> + </message> + <message> + <location/> + <source>Reverse landscape</source> + <translation>Omvendt landskab</translation> + </message> + <message> + <location/> + <source>Reverse portrait</source> + <translation>Omvendt portræt</translation> + </message> + <message> + <location/> + <source>Margins</source> + <translation>Margener</translation> + </message> + <message> + <location/> + <source>top margin</source> + <translation>Margen - øverst</translation> + </message> + <message> + <location/> + <source>left margin</source> + <translation>Margen - venstre</translation> + </message> + <message> + <location/> + <source>right margin</source> + <translation>Margen - højre</translation> + </message> + <message> + <location/> + <source>bottom margin</source> + <translation>Margen - bund</translation> + </message> +</context> +<context> + <name>QPluginLoader</name> + <message> + <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+24"/> + <source>Unknown error</source> + <translation>Ukendt fejl</translation> + </message> + <message> + <location line="-68"/> + <source>The plugin was not loaded.</source> + <translation>Plugin blev ikke indlæst.</translation> + </message> +</context> +<context> + <name>QPrintDialog</name> + <message> + <location filename="../src/gui/painting/qprinterinfo_unix.cpp" line="+98"/> + <source>locally connected</source> + <translation>lokalt forbundet</translation> + </message> + <message> + <location line="+23"/> + <location line="+225"/> + <source>Aliases: %1</source> + <translation>Aliasser: %1</translation> + </message> + <message> + <location line="+223"/> + <location line="+199"/> + <source>unknown</source> + <translation>Ukendt</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+329"/> + <source>A0 (841 x 1189 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A1 (594 x 841 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A2 (420 x 594 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A3 (297 x 420 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A5 (148 x 210 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A6 (105 x 148 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A7 (74 x 105 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A8 (52 x 74 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A9 (37 x 52 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B0 (1000 x 1414 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B1 (707 x 1000 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B2 (500 x 707 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B3 (353 x 500 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B4 (250 x 353 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B6 (125 x 176 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B7 (88 x 125 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B8 (62 x 88 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B9 (44 x 62 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B10 (31 x 44 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>C5E (163 x 229 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>DLE (110 x 220 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Folio (210 x 330 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Ledger (432 x 279 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Tabloid (279 x 432 mm)</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>US Common #10 Envelope (105 x 241 mm)</source> + <translation></translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+268"/> + <source>OK</source> + <translation></translation> + </message> + <message> + <location filename="../src/gui/dialogs/qabstractprintdialog.cpp" line="+110"/> + <location line="+13"/> + <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="-2"/> + <source>Print</source> + <translation>Udskriv</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-357"/> + <source>Print To File ...</source> + <translation>Udskriv til fil...</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+19"/> + <source>Print range</source> + <translation>Udskriftsområde</translation> + </message> + <message> + <location line="-2"/> + <source>Print all</source> + <translation>Udskriv alle</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+80"/> + <source>File %1 is not writable. +Please choose a different file name.</source> + <translation>Filen %1 kan ikke skrives. +Vælg et andet filnavn.</translation> + </message> + <message> + <location line="+4"/> + <source>%1 already exists. +Do you want to overwrite it?</source> + <translation>%1 findes allerede. +Ønsker du at overskrive?</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="-227"/> + <source>File exists</source> + <translation>Fil findes</translation> + </message> + <message> + <location line="+1"/> + <source><qt>Do you want to overwrite it?</qt></source> + <translation><qt>Ønsker du at overskrive?</qt></translation> + </message> + <message> + <location line="+227"/> + <source>Print selection</source> + <translation>Udskriv markerede</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-8"/> + <source>%1 is a directory. +Please choose a different file name.</source> + <translation>%1 er et katalog. +Vælg et andet filnavn.</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="-232"/> + <source>A0</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A1</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A2</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A3</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A4</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A5</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A6</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A7</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A8</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>A9</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B0</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B1</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B2</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B3</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B4</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B5</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B6</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B7</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B8</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B9</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>B10</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>C5E</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>DLE</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Executive</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Folio</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Ledger</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Legal</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Letter</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Tabloid</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>US Common #10 Envelope</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Custom</source> + <translation>Brugerdefineret</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-524"/> + <location line="+68"/> + <source>&Options >></source> + <translation>&Indstillinger>></translation> + </message> + <message> + <location line="-63"/> + <source>&Print</source> + <translation>&Udskriv</translation> + </message> + <message> + <location line="+67"/> + <source>&Options <<</source> + <translation>&Indstillinger<<</translation> + </message> + <message> + <location line="+253"/> + <source>Print to File (PDF)</source> + <translation>Udskriv til fil (PDF)</translation> + </message> + <message> + <location line="+1"/> + <source>Print to File (Postscript)</source> + <translation>Udskriv til fil (Postscript)</translation> + </message> + <message> + <location line="+47"/> + <source>Local file</source> + <translation>Lokal fil</translation> + </message> + <message> + <location line="+1"/> + <source>Write %1 file</source> + <translation>Skriv %1 fil</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+1"/> + <source>The 'From' value cannot be greater than the 'To' value.</source> + <translation>'Fra'-værdien kan ikke være større end 'til'-værdien.</translation> + </message> +</context> +<context> + <name>QPrintPreviewDialog</name> + <message> + <location filename="../src/gui/dialogs/qabstractpagesetupdialog.cpp" line="+68"/> + <location line="+12"/> + <source>Page Setup</source> + <translation>Sideopsætning</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+252"/> + <source>%1%</source> + <translation></translation> + </message> + <message> + <location line="+79"/> + <source>Print Preview</source> + <translation>Vis udskrift</translation> + </message> + <message> + <location line="+29"/> + <source>Next page</source> + <translation>Næste side</translation> + </message> + <message> + <location line="+1"/> + <source>Previous page</source> + <translation>Forrige side</translation> + </message> + <message> + <location line="+1"/> + <source>First page</source> + <translation>Første side</translation> + </message> + <message> + <location line="+1"/> + <source>Last page</source> + <translation>Sidste side</translation> + </message> + <message> + <location line="+9"/> + <source>Fit width</source> + <translation>Tilpas bredde</translation> + </message> + <message> + <location line="+1"/> + <source>Fit page</source> + <translation>Tilpas siden</translation> + </message> + <message> + <location line="+11"/> + <source>Zoom in</source> + <translation>Zoom ind</translation> + </message> + <message> + <location line="+1"/> + <source>Zoom out</source> + <translation>Zoom ud</translation> + </message> + <message> + <location line="+6"/> + <source>Portrait</source> + <translation>Portræt</translation> + </message> + <message> + <location line="+1"/> + <source>Landscape</source> + <translation>Landskab</translation> + </message> + <message> + <location line="+10"/> + <source>Show single page</source> + <translation>Vis enkelt side</translation> + </message> + <message> + <location line="+1"/> + <source>Show facing pages</source> + <translation>Vis sideopslag</translation> + </message> + <message> + <location line="+1"/> + <source>Show overview of all pages</source> + <translation>Vis oversigt af alle sider</translation> + </message> + <message> + <location line="+15"/> + <source>Print</source> + <translation>Udskriv</translation> + </message> + <message> + <location line="+1"/> + <source>Page setup</source> + <translation>Sideopsætning</translation> + </message> + <message> + <location line="+1"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="+151"/> + <source>Export to PDF</source> + <translation>Eksportér til PDF</translation> + </message> + <message> + <location line="+3"/> + <source>Export to PostScript</source> + <translation>Eksportér til PostScript</translation> + </message> +</context> +<context> + <name>QPrintPropertiesWidget</name> + <message> + <location filename="../src/gui/dialogs/qprintpropertieswidget.ui"/> + <source>Form</source> + <translation>Form</translation> + </message> + <message> + <location/> + <source>Page</source> + <translation>Side</translation> + </message> + <message> + <location/> + <source>Advanced</source> + <translation>Avanceret</translation> + </message> +</context> +<context> + <name>QPrintSettingsOutput</name> + <message> + <location filename="../src/gui/dialogs/qprintsettingsoutput.ui"/> + <source>Form</source> + <translation></translation> + </message> + <message> + <location/> + <source>Copies</source> + <translation>Kopier</translation> + </message> + <message> + <location/> + <source>Print range</source> + <translation>Udskriv sider</translation> + </message> + <message> + <location/> + <source>Print all</source> + <translation>Udskriv alle</translation> + </message> + <message> + <location/> + <source>Pages from</source> + <translation>Sider fra</translation> + </message> + <message> + <location/> + <source>to</source> + <translation>til</translation> + </message> + <message> + <location/> + <source>Selection</source> + <translation>Valg</translation> + </message> + <message> + <location/> + <source>Output Settings</source> + <translation>Udskriftsindstillinger</translation> + </message> + <message> + <location/> + <source>Copies:</source> + <translation>Kopier:</translation> + </message> + <message> + <location/> + <source>Collate</source> + <translation>Samordne</translation> + </message> + <message> + <location/> + <source>Reverse</source> + <translation>Omvendt</translation> + </message> + <message> + <location/> + <source>Options</source> + <translation>Valgmuligheder</translation> + </message> + <message> + <location/> + <source>Color Mode</source> + <translation>Farvetilstand</translation> + </message> + <message> + <location/> + <source>Color</source> + <translation>Farve</translation> + </message> + <message> + <location/> + <source>Grayscale</source> + <translation>Gråskala</translation> + </message> + <message> + <location/> + <source>Duplex Printing</source> + <translation>Dobbelsidet</translation> + </message> + <message> + <location/> + <source>None</source> + <translation>Ingen</translation> + </message> + <message> + <location/> + <source>Long side</source> + <translation>Bog</translation> + </message> + <message> + <location/> + <source>Short side</source> + <translation>Tavle</translation> + </message> +</context> +<context> + <name>QPrintWidget</name> + <message> + <location filename="../src/gui/dialogs/qprintwidget.ui"/> + <source>Form</source> + <translation></translation> + </message> + <message> + <location/> + <source>Printer</source> + <translation>'</translation> + </message> + <message> + <location/> + <source>&Name:</source> + <translation>&Navn:</translation> + </message> + <message> + <location/> + <source>P&roperties</source> + <translation>&Egenskaber</translation> + </message> + <message> + <location/> + <source>Location:</source> + <translation>Placering:</translation> + </message> + <message> + <location/> + <source>Preview</source> + <translation>Vis udskrift</translation> + </message> + <message> + <location/> + <source>Type:</source> + <translation></translation> + </message> + <message> + <location/> + <source>Output &file:</source> + <translation>Udskrifts&fil:</translation> + </message> + <message> + <location/> + <source>...</source> + <translation></translation> + </message> +</context> +<context> + <name>QProcess</name> + <message> + <location filename="../src/corelib/io/qprocess_unix.cpp" line="+475"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="+147"/> + <source>Could not open input redirection for reading</source> + <translation>Kunne ikke åbne input redirection for læsning</translation> + </message> + <message> + <location line="+12"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="+36"/> + <source>Could not open output redirection for writing</source> + <translation>Kunne ikke åbne output redirection for skrivning</translation> + </message> + <message> + <location line="+235"/> + <source>Resource error (fork failure): %1</source> + <translation>Ressource fejl (fork fejl): %1</translation> + </message> + <message> + <location line="+259"/> + <location line="+53"/> + <location line="+74"/> + <location line="+67"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="+422"/> + <location line="+50"/> + <location line="+75"/> + <location line="+42"/> + <location line="+54"/> + <source>Process operation timed out</source> + <translation>Proces-operation time out</translation> + </message> + <message> + <location filename="../src/corelib/io/qprocess.cpp" line="+533"/> + <location line="+52"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="-211"/> + <location line="+50"/> + <source>Error reading from process</source> + <translation>Fejl ved læsning fra proces</translation> + </message> + <message> + <location line="+47"/> + <location line="+779"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="+140"/> + <source>Error writing to process</source> + <translation>Fejl ved skrivning til proces</translation> + </message> + <message> + <location line="-709"/> + <source>Process crashed</source> + <translation>Proces crashede</translation> + </message> + <message> + <location line="+912"/> + <source>No program defined</source> + <translation>Intet program defineret</translation> + </message> + <message> + <location filename="../src/corelib/io/qprocess_win.cpp" line="-341"/> + <source>Process failed to start</source> + <translation>Processen kunne ikke starte</translation> + </message> +</context> +<context> + <name>QProgressDialog</name> + <message> + <location filename="../src/gui/dialogs/qprogressdialog.cpp" line="+182"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> +</context> +<context> + <name>QPushButton</name> + <message> + <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="-8"/> + <source>Open</source> + <translation>Åbn</translation> + </message> +</context> +<context> + <name>QRadioButton</name> + <message> + <location line="+12"/> + <source>Check</source> + <translation>Kontrollér</translation> + </message> +</context> +<context> + <name>QRegExp</name> + <message> + <location filename="../src/corelib/tools/qregexp.cpp" line="+64"/> + <source>no error occurred</source> + <translation>der opstod ingen fejl</translation> + </message> + <message> + <location line="+1"/> + <source>disabled feature used</source> + <translation>deaktiveret funktion blev brugt</translation> + </message> + <message> + <location line="+1"/> + <source>bad char class syntax</source> + <translation>dårlig char class syntaks</translation> + </message> + <message> + <location line="+1"/> + <source>bad lookahead syntax</source> + <translation>dårlig lookahead syntaks</translation> + </message> + <message> + <location line="+1"/> + <source>bad repetition syntax</source> + <translation>dårlig gentagelsessyntaks</translation> + </message> + <message> + <location line="+1"/> + <source>invalid octal value</source> + <translation>ugyldigt oktal-tal</translation> + </message> + <message> + <location line="+1"/> + <source>missing left delim</source> + <translation>Manglende venstre delimiter</translation> + </message> + <message> + <location line="+1"/> + <source>unexpected end</source> + <translation>uventet afslutning</translation> + </message> + <message> + <location line="+1"/> + <source>met internal limit</source> + <translation>nåede interne grænse</translation> + </message> +</context> +<context> + <name>QSQLite2Driver</name> + <message> + <location filename="../src/sql/drivers/sqlite2/qsql_sqlite2.cpp" line="+396"/> + <source>Error to open database</source> + <translation>Der opstod fejl ved åbning af database</translation> + </message> + <message> + <location line="+41"/> + <source>Unable to begin transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktionen</translation> + </message> + <message> + <location line="+17"/> + <source>Unable to rollback Transaction</source> + <translation>Kunne ikke tilbagetrække transaktion</translation> + </message> +</context> +<context> + <name>QSQLite2Result</name> + <message> + <location line="-323"/> + <source>Unable to fetch results</source> + <translation>Kunne ikke hente resultater</translation> + </message> + <message> + <location line="+147"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre statement</translation> + </message> +</context> +<context> + <name>QSQLiteDriver</name> + <message> + <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+528"/> + <source>Error opening database</source> + <translation>Der opstod fejl ved åbning af database</translation> + </message> + <message> + <location line="+11"/> + <source>Error closing database</source> + <translation>Der opstod fejl ved lukning af database</translation> + </message> + <message> + <location line="+20"/> + <source>Unable to begin transaction</source> + <translation>Kunne ikke påbegynde transaktionen</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to commit transaction</source> + <translation>Kunne ikke gennemføre transaktion</translation> + </message> + <message> + <location line="+15"/> + <source>Unable to rollback transaction</source> + <translation>Kunne ikke tilbagetrække transaktion</translation> + </message> +</context> +<context> + <name>QSQLiteResult</name> + <message> + <location line="-400"/> + <location line="+66"/> + <location line="+8"/> + <source>Unable to fetch row</source> + <translation>Kunne ikke hente række</translation> + </message> + <message> + <location line="+63"/> + <source>Unable to execute statement</source> + <translation>Kunne ikke udføre udsagn</translation> + </message> + <message> + <location line="+20"/> + <source>Unable to reset statement</source> + <translation>Kunne ikke nulstille udsagn</translation> + </message> + <message> + <location line="+45"/> + <source>Unable to bind parameters</source> + <translation>Unable to bind parameters</translation> + </message> + <message> + <location line="+7"/> + <source>Parameter count mismatch</source> + <translation>Misforhold i parametertælling</translation> + </message> + <message> + <location line="-208"/> + <source>No query</source> + <translation>Ingen forespørgesel</translation> + </message> +</context> +<context> + <name>QScrollBar</name> + <message> + <location filename="../src/gui/widgets/qscrollbar.cpp" line="+448"/> + <source>Scroll here</source> + <translation>Scroll her</translation> + </message> + <message> + <location line="+2"/> + <source>Left edge</source> + <translation>Venstre kant</translation> + </message> + <message> + <location line="+0"/> + <source>Top</source> + <translation>Øverst</translation> + </message> + <message> + <location line="+1"/> + <source>Right edge</source> + <translation>Højre kant</translation> + </message> + <message> + <location line="+0"/> + <source>Bottom</source> + <translation>Bund</translation> + </message> + <message> + <location line="+2"/> + <source>Page left</source> + <translation>Side venstre</translation> + </message> + <message> + <location line="+0"/> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+143"/> + <source>Page up</source> + <translation>Side øverst</translation> + </message> + <message> + <location line="+1"/> + <source>Page right</source> + <translation>Side højre</translation> + </message> + <message> + <location line="+0"/> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+4"/> + <source>Page down</source> + <translation>Side ned</translation> + </message> + <message> + <location line="+2"/> + <source>Scroll left</source> + <translation>Scroll til venstre</translation> + </message> + <message> + <location line="+0"/> + <source>Scroll up</source> + <translation>Scroll op</translation> + </message> + <message> + <location line="+1"/> + <source>Scroll right</source> + <translation>Scroll til højre</translation> + </message> + <message> + <location line="+0"/> + <source>Scroll down</source> + <translation>Scroll ned</translation> + </message> + <message> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-6"/> + <source>Line up</source> + <translation>Linie op</translation> + </message> + <message> + <location line="+4"/> + <source>Position</source> + <translation>Placering</translation> + </message> + <message> + <location line="+4"/> + <source>Line down</source> + <translation>Linie ned</translation> + </message> +</context> +<context> + <name>QSharedMemory</name> + <message> + <location filename="../src/corelib/kernel/qsharedmemory.cpp" line="+207"/> + <source>%1: unable to set key on lock</source> + <translation>%1: Kunne ikke oprette nøgle</translation> + </message> + <message> + <location line="+81"/> + <source>%1: create size is less then 0</source> + <translation>%1: create size is less then 0</translation> + </message> + <message> + <location line="+168"/> + <location filename="../src/corelib/kernel/qsharedmemory_p.h" line="+148"/> + <source>%1: unable to lock</source> + <translation>%1: Kunne ikke låse</translation> + </message> + <message> + <location line="+22"/> + <source>%1: unable to unlock</source> + <translation>%1: Kunne ikke oprette nøgle</translation> + </message> + <message> + <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+78"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+87"/> + <source>%1: permission denied</source> + <translation>%1: Tilladelse nægtet</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-22"/> + <source>%1: already exists</source> + <translation>%1: Findes allerede</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/> + <source>%1: doesn't exists</source> + <translation>%1: Findes ikke</translation> + </message> + <message> + <location line="+6"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/> + <source>%1: out of resources</source> + <translation>%1: Ikke flere ressourcer</translation> + </message> + <message> + <location line="+4"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+7"/> + <source>%1: unknown error %2</source> + <translation>%1: ukendt fejl %2</translation> + </message> + <message> + <location line="+21"/> + <source>%1: key is empty</source> + <translation>%1: nøgle er tom</translation> + </message> + <message> + <location line="+8"/> + <source>%1: unix key file doesn't exists</source> + <translation>%1: Kunne ikke oprette nøgle</translation> + </message> + <message> + <location line="+7"/> + <source>%1: ftok failed</source> + <translation>%1: ftok mislykkedes</translation> + </message> + <message> + <location line="+51"/> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+15"/> + <source>%1: unable to make key</source> + <translation>%1: Kunne ikke oprette nøgle</translation> + </message> + <message> + <location line="+20"/> + <source>%1: system-imposed size restrictions</source> + <translation>%1: System-pålagte størrelsesrestriktioner</translation> + </message> + <message> + <location line="+53"/> + <source>%1: not attached</source> + <translation>%1: Ikke vedhæftet</translation> + </message> + <message> + <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-27"/> + <source>%1: invalid size</source> + <translation>%1: Ugyldig størrelse</translation> + </message> + <message> + <location line="+68"/> + <source>%1: key error</source> + <translation>%1: Nøglefejl</translation> + </message> + <message> + <location line="+38"/> + <source>%1: size query failed</source> + <translation>%1: Størrelsesforespørgsel mislykkedes</translation> + </message> +</context> +<context> + <name>QShortcut</name> + <message> + <location filename="../src/gui/kernel/qkeysequence.cpp" line="+373"/> + <source>Space</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Esc</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Tab</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Backtab</source> + <translation>Tilbage-tabulator</translation> + </message> + <message> + <location line="+1"/> + <source>Backspace</source> + <translation>Tilbage</translation> + </message> + <message> + <location line="+1"/> + <source>Return</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Enter</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Ins</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Del</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Pause</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Print</source> + <translation>Udskriv</translation> + </message> + <message> + <location line="+1"/> + <source>SysReq</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Home</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>End</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Left</source> + <translation>Venstre</translation> + </message> + <message> + <location line="+1"/> + <source>Up</source> + <translation>Op</translation> + </message> + <message> + <location line="+1"/> + <source>Right</source> + <translation>Højre</translation> + </message> + <message> + <location line="+1"/> + <source>Down</source> + <translation>Ned</translation> + </message> + <message> + <location line="+1"/> + <source>PgUp</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>PgDown</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>CapsLock</source> + <translation>'</translation> + </message> + <message> + <location line="+1"/> + <source>NumLock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>ScrollLock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Menu</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="+3"/> + <source>Back</source> + <translation>Tilbage</translation> + </message> + <message> + <location line="+1"/> + <source>Forward</source> + <translation>Frem</translation> + </message> + <message> + <location line="+1"/> + <source>Stop</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Refresh</source> + <translation>Opdater</translation> + </message> + <message> + <location line="+1"/> + <source>Volume Down</source> + <translation>Lydstyrke ned</translation> + </message> + <message> + <location line="+1"/> + <source>Volume Mute</source> + <translation>Lydstyrke mute</translation> + </message> + <message> + <location line="+1"/> + <source>Volume Up</source> + <translation>Lydstyrke op</translation> + </message> + <message> + <location line="+1"/> + <source>Bass Boost</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Bass Up</source> + <translation>Bass op</translation> + </message> + <message> + <location line="+1"/> + <source>Bass Down</source> + <translation>Bass ned</translation> + </message> + <message> + <location line="+1"/> + <source>Treble Up</source> + <translation>Diskant op</translation> + </message> + <message> + <location line="+1"/> + <source>Treble Down</source> + <translation>Diskant ned</translation> + </message> + <message> + <location line="+1"/> + <source>Media Play</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Media Stop</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Media Previous</source> + <translation>Media forrige</translation> + </message> + <message> + <location line="+1"/> + <source>Media Next</source> + <translation>Media næste</translation> + </message> + <message> + <location line="+1"/> + <source>Media Record</source> + <translation></translation> + </message> + <message> + <location line="+2"/> + <source>Favorites</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Search</source> + <translation>Søg</translation> + </message> + <message> + <location line="+1"/> + <source>Standby</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Open URL</source> + <translation>Åbn URL</translation> + </message> + <message> + <location line="+1"/> + <source>Launch Mail</source> + <translation>Start mail</translation> + </message> + <message> + <location line="+1"/> + <source>Launch Media</source> + <translation>Start Media</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (0)</source> + <translation>Start (0)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (1)</source> + <translation>Start (1)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (2)</source> + <translation>Start (2)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (3)</source> + <translation>Start (3)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (4)</source> + <translation>Start (4)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (5)</source> + <translation>Start (5)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (6)</source> + <translation>Start (6)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (7)</source> + <translation>Start (7)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (8)</source> + <translation>Start (8)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (9)</source> + <translation>Start (9)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (A)</source> + <translation>Start (A)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (B)</source> + <translation>Start (B)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (C)</source> + <translation>Start (C)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (D)</source> + <translation>Start (D)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (E)</source> + <translation>Start (E)</translation> + </message> + <message> + <location line="+1"/> + <source>Launch (F)</source> + <translation>Start (F)</translation> + </message> + <message> + <location line="+4"/> + <source>Print Screen</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Page Up</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Page Down</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Caps Lock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Num Lock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Number Lock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Scroll Lock</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Insert</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Delete</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Escape</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>System Request</source> + <translation></translation> + </message> + <message> + <location line="+4"/> + <source>Select</source> + <translation>Væg</translation> + </message> + <message> + <location line="+1"/> + <source>Yes</source> + <translation>Ja</translation> + </message> + <message> + <location line="+1"/> + <source>No</source> + <translation>Nej</translation> + </message> + <message> + <location line="+4"/> + <source>Context1</source> + <translation>Kontekst1</translation> + </message> + <message> + <location line="+1"/> + <source>Context2</source> + <translation>Kontekst2</translation> + </message> + <message> + <location line="+1"/> + <source>Context3</source> + <translation>Kontekst3</translation> + </message> + <message> + <location line="+1"/> + <source>Context4</source> + <translation>Kontekst4</translation> + </message> + <message> + <location line="+1"/> + <source>Call</source> + <translation>Ring til</translation> + </message> + <message> + <location line="+1"/> + <source>Hangup</source> + <translation>Læg på</translation> + </message> + <message> + <location line="+1"/> + <source>Flip</source> + <translation>Vend</translation> + </message> + <message> + <location line="+527"/> + <location line="+122"/> + <source>Ctrl</source> + <translation></translation> + </message> + <message> + <location line="-121"/> + <location line="+125"/> + <source>Shift</source> + <translation></translation> + </message> + <message> + <location line="-124"/> + <location line="+122"/> + <source>Alt</source> + <translation></translation> + </message> + <message> + <location line="-121"/> + <location line="+117"/> + <source>Meta</source> + <translation></translation> + </message> + <message> + <location line="-25"/> + <source>+</source> + <translation></translation> + </message> + <message> + <location line="+46"/> + <source>F%1</source> + <translation></translation> + </message> + <message> + <location line="-720"/> + <source>Home Page</source> + <translation>Startside</translation> + </message> +</context> +<context> + <name>QSlider</name> + <message> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+151"/> + <source>Page left</source> + <translation>Side venstre</translation> + </message> + <message> + <location line="+0"/> + <source>Page up</source> + <translation>Side op</translation> + </message> + <message> + <location line="+2"/> + <source>Position</source> + <translation>Placering</translation> + </message> + <message> + <location line="+3"/> + <source>Page right</source> + <translation>Side højre</translation> + </message> + <message> + <location line="+0"/> + <source>Page down</source> + <translation>Side ned</translation> + </message> +</context> +<context> + <name>QSocks5SocketEngine</name> + <message> + <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-67"/> + <source>Connection to proxy refused</source> + <translation>Proxy-forbindelse nægtede</translation> + </message> + <message> + <location line="+4"/> + <source>Connection to proxy closed prematurely</source> + <translation>Proxy-forbindelse afsluttede i utide</translation> + </message> + <message> + <location line="+4"/> + <source>Proxy host not found</source> + <translation>Proxy-host kunne ikke findes</translation> + </message> + <message> + <location line="+5"/> + <source>Connection to proxy timed out</source> + <translation>Proxy-serverforbindelse timed out</translation> + </message> + <message> + <location line="+17"/> + <source>Proxy authentication failed</source> + <translation>Proxy autentificering mislykkedes</translation> + </message> + <message> + <location line="+1"/> + <source>Proxy authentication failed: %1</source> + <translation>Proxy autentificering mislykkedes: %1</translation> + </message> + <message> + <location line="+9"/> + <source>SOCKS version 5 protocol error</source> + <translation>SOCKS version 5 protokolfejl</translation> + </message> + <message> + <location line="+19"/> + <source>General SOCKSv5 server failure</source> + <translation>General SOCKSv5 serverfejl</translation> + </message> + <message> + <location line="+4"/> + <source>Connection not allowed by SOCKSv5 server</source> + <translation>Forbindelse ikke tilladt a SOCKSv5-server</translation> + </message> + <message> + <location line="+16"/> + <source>TTL expired</source> + <translation>TTL udløbet</translation> + </message> + <message> + <location line="+4"/> + <source>SOCKSv5 command not supported</source> + <translation>SOCKSv5-kommando ikke understøttet</translation> + </message> + <message> + <location line="+4"/> + <source>Address type not supported</source> + <translation>Adressetype understøttes ikke</translation> + </message> + <message> + <location line="+5"/> + <source>Unknown SOCKSv5 proxy error code 0x%1</source> + <translation>Ukendt SOCKSv5 proxy fejlkode 0x%1</translation> + </message> + <message> + <location line="+685"/> + <source>Network operation timed out</source> + <translation>Netværksoperationen timed out</translation> + </message> +</context> +<context> + <name>QSpinBox</name> + <message> + <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-574"/> + <source>More</source> + <translation>Mere</translation> + </message> + <message> + <location line="+2"/> + <source>Less</source> + <translation>Mindre</translation> + </message> +</context> +<context> + <name>QSql</name> + <message> + <location filename="../src/qt3support/sql/q3sqlmanager_p.cpp" line="+890"/> + <source>Delete</source> + <translation>Slet</translation> + </message> + <message> + <location line="+1"/> + <source>Delete this record?</source> + <translation>Slet denne post?</translation> + </message> + <message> + <location line="+1"/> + <location line="+16"/> + <location line="+36"/> + <source>Yes</source> + <translation>Ja</translation> + </message> + <message> + <location line="-51"/> + <location line="+16"/> + <location line="+36"/> + <source>No</source> + <translation>Nej</translation> + </message> + <message> + <location line="-44"/> + <source>Insert</source> + <translation>Indsæt</translation> + </message> + <message> + <location line="+2"/> + <source>Update</source> + <translation>Opdater</translation> + </message> + <message> + <location line="+4"/> + <source>Save edits?</source> + <translation>Gem ændringer?</translation> + </message> + <message> + <location line="+3"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location line="+32"/> + <source>Confirm</source> + <translation>Bekræft</translation> + </message> + <message> + <location line="+1"/> + <source>Cancel your edits?</source> + <translation>Skal dine ændringer annulleres?</translation> + </message> +</context> +<context> + <name>QSslSocket</name> + <message> + <location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+569"/> + <source>Unable to write data: %1</source> + <translation>Kunne ikke skrive data: %1</translation> + </message> + <message> + <location line="+119"/> + <source>Error while reading: %1</source> + <translation>Der opstod en fejl under læsning af: %1</translation> + </message> + <message> + <location line="+96"/> + <source>Error during SSL handshake: %1</source> + <translation>Der opstod en fejl under SSL handshake: %1</translation> + </message> + <message> + <location line="-524"/> + <source>Error creating SSL context (%1)</source> + <translation>Der opstod fejl under oprettelse af SSL-kontekst (%1)</translation> + </message> + <message> + <location line="+25"/> + <source>Invalid or empty cipher list (%1)</source> + <translation>Ugyldig eller tom chifferliste (%1)</translation> + </message> + <message> + <location line="+62"/> + <source>Error creating SSL session, %1</source> + <translation>Der opstod fejl under oprettelse af SSL-session, %1</translation> + </message> + <message> + <location line="+15"/> + <source>Error creating SSL session: %1</source> + <translation>Der opstod fejl under oprettelse af SSL-session, %1</translation> + </message> + <message> + <location line="-61"/> + <source>Cannot provide a certificate with no key, %1</source> + <translation>Kan ikke give et certifikat uden nøgle, %1</translation> + </message> + <message> + <location line="+7"/> + <source>Error loading local certificate, %1</source> + <translation>Der opstod fejl under indlæsning af lokalt certifikat, %1</translation> + </message> + <message> + <location line="+12"/> + <source>Error loading private key, %1</source> + <translation>Der opstod fejl under indlæsning af privat nøgle, %1</translation> + </message> + <message> + <location line="+7"/> + <source>Private key does not certificate public key, %1</source> + <translation>Privat-nøgle autoriserer ikke offentlig-nøgle, %1</translation> + </message> +</context> +<context> + <name>QSystemSemaphore</name> + <message> + <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="-41"/> + <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+66"/> + <source>%1: out of resources</source> + <translation>%1: Ikke flere ressourcer</translation> + </message> + <message> + <location line="-13"/> + <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+4"/> + <source>%1: permission denied</source> + <translation>%1: Tilladelse nægtet</translation> + </message> + <message> + <location line="+4"/> + <source>%1: already exists</source> + <translation>%1: Findes allerede</translation> + </message> + <message> + <location line="+4"/> + <source>%1: does not exist</source> + <translation>%1: Findes ikke</translation> + </message> + <message> + <location line="+9"/> + <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+3"/> + <source>%1: unknown error %2</source> + <translation>%1: Ukendt fejl %2</translation> + </message> +</context> +<context> + <name>QTDSDriver</name> + <message> + <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+584"/> + <source>Unable to open connection</source> + <translation>Kunne ikke etablere forbindelsen</translation> + </message> + <message> + <location line="+5"/> + <source>Unable to use database</source> + <translation>Kunne ikke bruge databasen</translation> + </message> +</context> +<context> + <name>QTabBar</name> + <message> + <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="-326"/> + <source>Scroll Left</source> + <translation>Scroll til venstre</translation> + </message> + <message> + <location line="+0"/> + <source>Scroll Right</source> + <translation>Scroll til højre</translation> + </message> +</context> +<context> + <name>QTcpServer</name> + <message> + <location filename="../src/network/socket/qtcpserver.cpp" line="+282"/> + <source>Operation on socket is not supported</source> + <translation>Socket-operation ikke understøttet</translation> + </message> +</context> +<context> + <name>QTextControl</name> + <message> + <location filename="../src/gui/text/qtextcontrol.cpp" line="+1973"/> + <source>&Undo</source> + <translation>&Fortryd</translation> + </message> + <message> + <location line="+2"/> + <source>&Redo</source> + <translation>&Gendan</translation> + </message> + <message> + <location line="+4"/> + <source>Cu&t</source> + <translation>K&lip</translation> + </message> + <message> + <location line="+5"/> + <source>&Copy</source> + <translation>&Kopiér</translation> + </message> + <message> + <location line="+7"/> + <source>Copy &Link Location</source> + <translation>Kopiér l&ink</translation> + </message> + <message> + <location line="+6"/> + <source>&Paste</source> + <translation>&Sæt ind</translation> + </message> + <message> + <location line="+3"/> + <source>Delete</source> + <translation>Slet</translation> + </message> + <message> + <location line="+7"/> + <source>Select All</source> + <translation>Markér alt</translation> + </message> +</context> +<context> + <name>QToolButton</name> + <message> + <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+254"/> + <location line="+6"/> + <source>Press</source> + <translation>Tryk på</translation> + </message> + <message> + <location line="-4"/> + <location line="+8"/> + <source>Open</source> + <translation>Åbn</translation> + </message> +</context> +<context> + <name>QUdpSocket</name> + <message> + <location filename="../src/network/socket/qudpsocket.cpp" line="+169"/> + <source>This platform does not support IPv6</source> + <translation>Denne platform understøtter ikke IPv6</translation> + </message> +</context> +<context> + <name>QUndoGroup</name> + <message> + <location filename="../src/gui/util/qundogroup.cpp" line="+386"/> + <source>Undo</source> + <translation>Fortryd</translation> + </message> + <message> + <location line="+28"/> + <source>Redo</source> + <translation>Gendan</translation> + </message> +</context> +<context> + <name>QUndoModel</name> + <message> + <location filename="../src/gui/util/qundoview.cpp" line="+101"/> + <source><empty></source> + <translation><tom></translation> + </message> +</context> +<context> + <name>QUndoStack</name> + <message> + <location filename="../src/gui/util/qundostack.cpp" line="+834"/> + <source>Undo</source> + <translation>Fortryd</translation> + </message> + <message> + <location line="+27"/> + <source>Redo</source> + <translation>Gendan</translation> + </message> +</context> +<context> + <name>QUnicodeControlCharacterMenu</name> + <message> + <location filename="../src/gui/text/qtextcontrol.cpp" line="+884"/> + <source>LRM Left-to-right mark</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>RLM Right-to-left mark</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>ZWJ Zero width joiner</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>ZWNJ Zero width non-joiner</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>ZWSP Zero width space</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>LRE Start of left-to-right embedding</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>RLE Start of right-to-left embedding</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>LRO Start of left-to-right override</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>RLO Start of right-to-left override</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>PDF Pop directional formatting</source> + <translation></translation> + </message> + <message> + <location line="+6"/> + <source>Insert Unicode control character</source> + <translation></translation> + </message> +</context> +<context> + <name>QWebFrame</name> + <message> + <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+692"/> + <source>Request cancelled</source> + <translation>Anmodning annulleret</translation> + </message> + <message> + <location line="+17"/> + <source>Request blocked</source> + <translation>Anmodning blokeret</translation> + </message> + <message> + <location line="+7"/> + <source>Cannot show URL</source> + <translation>Kan ikke vise URL</translation> + </message> + <message> + <location line="+6"/> + <source>Frame load interruped by policy change</source> + <translation>Billedindlæsning afbrudt af ændringer i retningslinier</translation> + </message> + <message> + <location line="+6"/> + <source>Cannot show mimetype</source> + <translation>Kan ikke vise MIME-type</translation> + </message> + <message> + <location line="+6"/> + <source>File does not exist</source> + <translation>Filen findes ikke</translation> + </message> +</context> +<context> + <name>QWebPage</name> + <message> + <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+384"/> + <source>Bad HTTP request</source> + <translation>Dårlig HTTP-anmodning</translation> + </message> + <message> + <location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="+42"/> + <source>Submit</source> + <comment>default label for Submit buttons in forms on web pages</comment> + <translation>Send</translation> + </message> + <message> + <location line="+5"/> + <source>Submit</source> + <comment>Submit (input element) alt text for <input> elements with no alt, title, or value</comment> + <translation>Send</translation> + </message> + <message> + <location line="+5"/> + <source>Reset</source> + <comment>default label for Reset buttons in forms on web pages</comment> + <translation>Nulstil</translation> + </message> + <message> + <location line="+10"/> + <source>This is a searchable index. Enter search keywords: </source> + <comment>text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'</comment> + <translation>Dette er et søgeindeks. Indtast søgeord:</translation> + </message> + <message> + <location line="+5"/> + <source>Choose File</source> + <comment>title for file button used in HTML forms</comment> + <translation>Vælg fil</translation> + </message> + <message> + <location line="+5"/> + <source>No file selected</source> + <comment>text to display in file button used in HTML forms when no file is selected</comment> + <translation>Der er ikke valgt en fil</translation> + </message> + <message> + <location line="+5"/> + <source>Open in New Window</source> + <comment>Open in New Window context menu item</comment> + <translation>Åbn i nyt vindue</translation> + </message> + <message> + <location line="+5"/> + <source>Save Link...</source> + <comment>Download Linked File context menu item</comment> + <translation>Gem link...</translation> + </message> + <message> + <location line="+5"/> + <source>Copy Link</source> + <comment>Copy Link context menu item</comment> + <translation>Kopiér link</translation> + </message> + <message> + <location line="+5"/> + <source>Open Image</source> + <comment>Open Image in New Window context menu item</comment> + <translation>Åbn billede</translation> + </message> + <message> + <location line="+5"/> + <source>Save Image</source> + <comment>Download Image context menu item</comment> + <translation>Gem billede</translation> + </message> + <message> + <location line="+5"/> + <source>Copy Image</source> + <comment>Copy Link context menu item</comment> + <translation>Kopiér billede</translation> + </message> + <message> + <location line="+5"/> + <source>Open Frame</source> + <comment>Open Frame in New Window context menu item</comment> + <translation>Åbn faneblad</translation> + </message> + <message> + <location line="+5"/> + <source>Copy</source> + <comment>Copy context menu item</comment> + <translation>Kopiér</translation> + </message> + <message> + <location line="+5"/> + <source>Go Back</source> + <comment>Back context menu item</comment> + <translation>Gå tilbage</translation> + </message> + <message> + <location line="+5"/> + <source>Go Forward</source> + <comment>Forward context menu item</comment> + <translation>Gå frem</translation> + </message> + <message> + <location line="+5"/> + <source>Stop</source> + <comment>Stop context menu item</comment> + <translation>Stop</translation> + </message> + <message> + <location line="+5"/> + <source>Reload</source> + <comment>Reload context menu item</comment> + <translation>Genindlæs</translation> + </message> + <message> + <location line="+5"/> + <source>Cut</source> + <comment>Cut context menu item</comment> + <translation>Klip</translation> + </message> + <message> + <location line="+5"/> + <source>Paste</source> + <comment>Paste context menu item</comment> + <translation>Sæt ind</translation> + </message> + <message> + <location line="+5"/> + <source>No Guesses Found</source> + <comment>No Guesses Found context menu item</comment> + <translation>Der er ikke fundet nogen gæt</translation> + </message> + <message> + <location line="+5"/> + <source>Ignore</source> + <comment>Ignore Spelling context menu item</comment> + <translation>Ignorér</translation> + </message> + <message> + <location line="+5"/> + <source>Add To Dictionary</source> + <comment>Learn Spelling context menu item</comment> + <translation>Tilføj til ordbog</translation> + </message> + <message> + <location line="+5"/> + <source>Search The Web</source> + <comment>Search The Web context menu item</comment> + <translation>Søg på nettet</translation> + </message> + <message> + <location line="+5"/> + <source>Look Up In Dictionary</source> + <comment>Look Up in Dictionary context menu item</comment> + <translation>Slå op i ordbog</translation> + </message> + <message> + <location line="+5"/> + <source>Open Link</source> + <comment>Open Link context menu item</comment> + <translation>Åbn link</translation> + </message> + <message> + <location line="+5"/> + <source>Ignore</source> + <comment>Ignore Grammar context menu item</comment> + <translation>Ignorér</translation> + </message> + <message> + <location line="+5"/> + <source>Spelling</source> + <comment>Spelling and Grammar context sub-menu item</comment> + <translation>Stavekontrol</translation> + </message> + <message> + <location line="+5"/> + <source>Show Spelling and Grammar</source> + <comment>menu item title</comment> + <translation>Vis stave- og grammatikkontrol</translation> + </message> + <message> + <location line="+1"/> + <source>Hide Spelling and Grammar</source> + <comment>menu item title</comment> + <translation>Skjul stave- og grammatikkontrol</translation> + </message> + <message> + <location line="+5"/> + <source>Check Spelling</source> + <comment>Check spelling context menu item</comment> + <translation>Kør stavekontrol</translation> + </message> + <message> + <location line="+5"/> + <source>Check Spelling While Typing</source> + <comment>Check spelling while typing context menu item</comment> + <translation>Kør stavekontrol mens der tastes</translation> + </message> + <message> + <location line="+5"/> + <source>Check Grammar With Spelling</source> + <comment>Check grammar with spelling context menu item</comment> + <translation>Kør grammatikkontrol sammen med stavekontrol</translation> + </message> + <message> + <location line="+5"/> + <source>Fonts</source> + <comment>Font context sub-menu item</comment> + <translation>Skrifttyper</translation> + </message> + <message> + <location line="+5"/> + <source>Bold</source> + <comment>Bold context menu item</comment> + <translation>Fed</translation> + </message> + <message> + <location line="+5"/> + <source>Italic</source> + <comment>Italic context menu item</comment> + <translation>Kursiv</translation> + </message> + <message> + <location line="+5"/> + <source>Underline</source> + <comment>Underline context menu item</comment> + <translation>Understreget</translation> + </message> + <message> + <location line="+5"/> + <source>Outline</source> + <comment>Outline context menu item</comment> + <translation>Kontur</translation> + </message> + <message> + <location line="+5"/> + <source>Direction</source> + <comment>Writing direction context sub-menu item</comment> + <translation>Retning</translation> + </message> + <message> + <location line="+5"/> + <source>Text Direction</source> + <comment>Text direction context sub-menu item</comment> + <translation>Tekstretning</translation> + </message> + <message> + <location line="+5"/> + <source>Default</source> + <comment>Default writing direction context menu item</comment> + <translation>Standard</translation> + </message> + <message> + <location line="+5"/> + <source>LTR</source> + <comment>Left to Right context menu item</comment> + <translation></translation> + </message> + <message> + <location line="+5"/> + <source>RTL</source> + <comment>Right to Left context menu item</comment> + <translation></translation> + </message> + <message> + <location line="+5"/> + <source>Inspect</source> + <comment>Inspect Element context menu item</comment> + <translation>Inspicér</translation> + </message> + <message> + <location line="+5"/> + <source>No recent searches</source> + <comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment> + <translation>Ingen aktuelle søgninger</translation> + </message> + <message> + <location line="+5"/> + <source>Recent searches</source> + <comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment> + <translation>Aktuelle søgninger</translation> + </message> + <message> + <location line="+5"/> + <source>Clear recent searches</source> + <comment>menu item in Recent Searches menu that empties menu's contents</comment> + <translation>Ryd aktuelle søgninger</translation> + </message> + <message> + <location line="+75"/> + <source>Unknown</source> + <comment>Unknown filesize FTP directory listing item</comment> + <translation>Ukendt</translation> + </message> + <message> + <location line="+5"/> + <source>%1 (%2x%3 pixels)</source> + <comment>Title string for images</comment> + <translation>%1 (%2x%3 pixels)</translation> + </message> + <message> + <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+185"/> + <source>Web Inspector - %2</source> + <translation>Web-inspektør - %2</translation> + </message> + <message> + <location filename="../src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp" line="+58"/> + <source>Scroll here</source> + <translation>Scroll her</translation> + </message> + <message> + <location line="+3"/> + <source>Left edge</source> + <translation>Venstre kant</translation> + </message> + <message> + <location line="+0"/> + <source>Top</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>Right edge</source> + <translation>Højre kant</translation> + </message> + <message> + <location line="+0"/> + <source>Bottom</source> + <translation>Bund</translation> + </message> + <message> + <location line="+3"/> + <source>Page left</source> + <translation>Side venstre</translation> + </message> + <message> + <location line="+0"/> + <source>Page up</source> + <translation>Side øverst</translation> + </message> + <message> + <location line="+1"/> + <source>Page right</source> + <translation>Side højre</translation> + </message> + <message> + <location line="+0"/> + <source>Page down</source> + <translation>Side ned</translation> + </message> + <message> + <location line="+3"/> + <source>Scroll left</source> + <translation>Scroll til venstre</translation> + </message> + <message> + <location line="+0"/> + <source>Scroll up</source> + <translation>Scroll op</translation> + </message> + <message> + <location line="+1"/> + <source>Scroll right</source> + <translation>Scroll til højre</translation> + </message> + <message> + <location line="+0"/> + <source>Scroll down</source> + <translation>Scroll ned</translation> + </message> + <message numerus="yes"> + <location filename="../src/3rdparty/webkit/WebCore/platform/qt/FileChooserQt.cpp" line="+45"/> + <source>%n file(s)</source> + <comment>number of chosen file</comment> + <translation> + <numerusform>%n fil</numerusform> + <numerusform>%n filer</numerusform> + </translation> + </message> + <message> + <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1322"/> + <source>JavaScript Alert - %1</source> + <translation>JavaScript alert - %1</translation> + </message> + <message> + <location line="+15"/> + <source>JavaScript Confirm - %1</source> + <translation>JavaScript Bekræft - %1</translation> + </message> + <message> + <location line="+17"/> + <source>JavaScript Prompt - %1</source> + <translation>JavaScript Prompt - %1</translation> + </message> + <message> + <location line="+340"/> + <source>Move the cursor to the next character</source> + <translation>Flyt markør til næste tegn</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the previous character</source> + <translation>Flyt markør til forrige tegn</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the next word</source> + <translation>Flyt markør til næste ord</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the previous word</source> + <translation>Flyt markør til forrige ord</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the next line</source> + <translation>Flyt markør til næste linie</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the previous line</source> + <translation>Flyt markør til forrige linie</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the start of the line</source> + <translation>Flyt markør til starten af linien</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the end of the line</source> + <translation>Flyt markør til slutningen af linien</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the start of the block</source> + <translation>Flyt markør til starten af sektionen</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the end of the block</source> + <translation>Flyt markør til slutningen af sektionen</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the start of the document</source> + <translation>Flyt markør til starten af dokumentet</translation> + </message> + <message> + <location line="+3"/> + <source>Move the cursor to the end of the document</source> + <translation>Flyt markør til slutningen af dokumentet</translation> + </message> + <message> + <location line="+3"/> + <source>Select all</source> + <translation>Markér alt</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the next character</source> + <translation>Vælg til næste tegn</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the previous character</source> + <translation>Vælg til forrige tegn</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the next word</source> + <translation>Vælg til næste ord</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the previous word</source> + <translation>Vælg til forrige ord</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the next line</source> + <translation>Vælg til næste linie</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the previous line</source> + <translation>Vælg til forrige linie</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the start of the line</source> + <translation>Vælg til starten af linien</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the end of the line</source> + <translation>Vælg til slutningen af linien</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the start of the block</source> + <translation>Vælg til starten af sektionen</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the end of the block</source> + <translation>Vælg til slutningen af sektionen</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the start of the document</source> + <translation>Vælg til starten af dokumentet</translation> + </message> + <message> + <location line="+3"/> + <source>Select to the end of the document</source> + <translation>Vælg til slutningen af dokumentet</translation> + </message> + <message> + <location line="+3"/> + <source>Delete to the start of the word</source> + <translation>Slet til starten af ordet</translation> + </message> + <message> + <location line="+3"/> + <source>Delete to the end of the word</source> + <translation>Slet til slutningen af ordet</translation> + </message> + <message> + <location line="+33"/> + <source>Insert a new paragraph</source> + <translation>Indsæt et nyt afsnit</translation> + </message> + <message> + <location line="+3"/> + <source>Insert a new line</source> + <translation>Insert ny linie</translation> + </message> +</context> +<context> + <name>QWhatsThisAction</name> + <message> + <location filename="../src/gui/kernel/qwhatsthis.cpp" line="+522"/> + <source>What's This?</source> + <translation>Hvad er dette?</translation> + </message> +</context> +<context> + <name>QWidget</name> + <message> + <location filename="../src/gui/kernel/qwidget.cpp" line="+5340"/> + <source>*</source> + <translation></translation> + </message> +</context> +<context> + <name>QWizard</name> + <message> + <location filename="../src/gui/dialogs/qwizard.cpp" line="+637"/> + <source>Go Back</source> + <translation>Gå tilbage</translation> + </message> + <message> + <location line="+3"/> + <source>Continue</source> + <translation>Fortsæt</translation> + </message> + <message> + <location line="+5"/> + <source>Commit</source> + <translation>Udfør</translation> + </message> + <message> + <location line="+2"/> + <source>Done</source> + <translation>Færdig</translation> + </message> + <message> + <location line="+4"/> + <source>Help</source> + <translation>Hjælp</translation> + </message> + <message> + <location line="-14"/> + <source>< &Back</source> + <translation>< &Tilbage</translation> + </message> + <message> + <location line="+10"/> + <source>&Finish</source> + <translation>&Afslut</translation> + </message> + <message> + <location line="+2"/> + <source>Cancel</source> + <translation>Annuller</translation> + </message> + <message> + <location line="+2"/> + <source>&Help</source> + <translation>&Hjælp</translation> + </message> + <message> + <location line="-8"/> + <source>&Next</source> + <translation>&Næste</translation> + </message> + <message> + <location line="+0"/> + <source>&Next ></source> + <translation>&Næste ></translation> + </message> +</context> +<context> + <name>QWorkspace</name> + <message> + <location filename="../src/gui/widgets/qworkspace.cpp" line="+1094"/> + <source>&Restore</source> + <translation>&Gendan</translation> + </message> + <message> + <location line="+1"/> + <source>&Move</source> + <translation>&Flyt</translation> + </message> + <message> + <location line="+1"/> + <source>&Size</source> + <translation>&Størrelse</translation> + </message> + <message> + <location line="+2"/> + <source>Mi&nimize</source> + <translation>Mi&nimér</translation> + </message> + <message> + <location line="+2"/> + <source>Ma&ximize</source> + <translation>Ma&ksimér</translation> + </message> + <message> + <location line="+2"/> + <source>&Close</source> + <translation>&Luk</translation> + </message> + <message> + <location line="+6"/> + <source>Stay on &Top</source> + <translation>Bliv på &toppen</translation> + </message> + <message> + <location line="+3"/> + <location line="+1059"/> + <source>Sh&ade</source> + <translation>Sk&ygge</translation> + </message> + <message> + <location line="-278"/> + <location line="+60"/> + <source>%1 - [%2]</source> + <translation></translation> + </message> + <message> + <location line="-1837"/> + <source>Minimize</source> + <translation>Minimer</translation> + </message> + <message> + <location line="+2"/> + <source>Restore Down</source> + <translation>Gendan ned</translation> + </message> + <message> + <location line="-4"/> + <source>Close</source> + <translation>Luk</translation> + </message> + <message> + <location line="+2053"/> + <source>&Unshade</source> + <translation>&Fjern skygge</translation> + </message> +</context> +<context> + <name>QXml</name> + <message> + <location filename="../src/xml/sax/qxml.cpp" line="+58"/> + <source>no error occurred</source> + <translation>der opstod ingen fejl</translation> + </message> + <message> + <location line="+1"/> + <source>error triggered by consumer</source> + <translation>Fejltilstand rejst af datamodtager</translation> + </message> + <message> + <location line="+1"/> + <source>unexpected end of file</source> + <translation>uventet afslutning på fil</translation> + </message> + <message> + <location line="+1"/> + <source>more than one document type definition</source> + <translation>mere end én definition på dokumenttype</translation> + </message> + <message> + <location line="+1"/> + <source>error occurred while parsing element</source> + <translation>der opstod fejl under fortolking af element</translation> + </message> + <message> + <location line="+1"/> + <source>tag mismatch</source> + <translation></translation> + </message> + <message> + <location line="+1"/> + <source>error occurred while parsing content</source> + <translation>der opstod fejl under fortolking af indhold</translation> + </message> + <message> + <location line="+1"/> + <source>unexpected character</source> + <translation>uventet tegn</translation> + </message> + <message> + <location line="+1"/> + <source>invalid name for processing instruction</source> + <translation>Ugyldigt navn for processing instruction</translation> + </message> + <message> + <location line="+1"/> + <source>version expected while reading the XML declaration</source> + <translation>version forventet under læsning af XML-deklaration</translation> + </message> + <message> + <location line="+1"/> + <source>wrong value for standalone declaration</source> + <translation>Forkert værdi for fri deklaration</translation> + </message> + <message> + <location line="+1"/> + <source>encoding declaration or standalone declaration expected while reading the XML declaration</source> + <translation>Enkodningsdeklaration eller fri deklaration forventet ved læsning af XML-deklaration</translation> + </message> + <message> + <location line="+1"/> + <source>standalone declaration expected while reading the XML declaration</source> + <translation>fri deklaration forventet ved læsning af XML-deklaration</translation> + </message> + <message> + <location line="+1"/> + <source>error occurred while parsing document type definition</source> + <translation>der opstod fejl under fortolking af dokumenttypedefinition</translation> + </message> + <message> + <location line="+1"/> + <source>letter is expected</source> + <translation>bogstav forventet</translation> + </message> + <message> + <location line="+1"/> + <source>error occurred while parsing comment</source> + <translation>der opstod fejl under fortolking af kommentar</translation> + </message> + <message> + <location line="+1"/> + <source>error occurred while parsing reference</source> + <translation>der opstod fejl under fortolking af reference</translation> + </message> + <message> + <location line="+1"/> + <source>internal general entity reference not allowed in DTD</source> + <translation>intern generel entitetsreference ikke tilladt i DTD</translation> + </message> + <message> + <location line="+1"/> + <source>external parsed general entity reference not allowed in attribute value</source> + <translation>Eksternt parset generel entitetsreference ikke tilladt i attributværdi</translation> + </message> + <message> + <location line="+1"/> + <source>external parsed general entity reference not allowed in DTD</source> + <translation>Eksternt parset generel entitetsreference ikke tilladt i DTD</translation> + </message> + <message> + <location line="+1"/> + <source>unparsed entity reference in wrong context</source> + <translation>ufortolket enhedsreference i forkert kontekst</translation> + </message> + <message> + <location line="+1"/> + <source>recursive entities</source> + <translation>rekursive entiteter</translation> + </message> + <message> + <location line="+1"/> + <source>error in the text declaration of an external entity</source> + <translation>fejl i tekstdeklaration på en ekstern enhed</translation> + </message> +</context> +<context> + <name>QXmlStream</name> + <message> + <location filename="../src/corelib/xml/qxmlstream.cpp" line="+592"/> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1769"/> + <source>Extra content at end of document.</source> + <translation>Ekstra indhold sidst i dokumentet.</translation> + </message> + <message> + <location line="+222"/> + <source>Invalid entity value.</source> + <translation>Ugyldig enhedsværdi.</translation> + </message> + <message> + <location line="+107"/> + <source>Invalid XML character.</source> + <translation>Ugyldigt XML-tegn.</translation> + </message> + <message> + <location line="+259"/> + <source>Sequence ']]>' not allowed in content.</source> + <translation>Sekvens ']]>' ikke tilladt i indhold.</translation> + </message> + <message> + <location line="+309"/> + <source>Namespace prefix '%1' not declared</source> + <translation>Navnerumspræfiks '%1' ikke deklareret</translation> + </message> + <message> + <location line="+78"/> + <source>Attribute redefined.</source> + <translation>Attribut redefineret.</translation> + </message> + <message> + <location line="+115"/> + <source>Unexpected character '%1' in public id literal.</source> + <translation>Uventet tegn '%1' i public id værdi.</translation> + </message> + <message> + <location line="+28"/> + <source>Invalid XML version string.</source> + <translation>Ugyldigt XML-versionsstreng.</translation> + </message> + <message> + <location line="+2"/> + <source>Unsupported XML version.</source> + <translation>XML-version understøttes ikke.</translation> + </message> + <message> + <location line="+23"/> + <source>%1 is an invalid encoding name.</source> + <translation>%1 er et ugyldigt enkodningsnavn.</translation> + </message> + <message> + <location line="+7"/> + <source>Encoding %1 is unsupported</source> + <translation>Enkodning %1 er ikke understøttet</translation> + </message> + <message> + <location line="+16"/> + <source>Standalone accepts only yes or no.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Invalid attribute in XML declaration.</source> + <translation>Ugyldig attribut i XML-deklaration.</translation> + </message> + <message> + <location line="+16"/> + <source>Premature end of document.</source> + <translation>Dokument sluttede for tidligt.</translation> + </message> + <message> + <location line="+2"/> + <source>Invalid document.</source> + <translation>Ugyldigt dokument.</translation> + </message> + <message> + <location line="+40"/> + <source>Expected </source> + <translation>Forventet</translation> + </message> + <message> + <location line="+11"/> + <source>, but got '</source> + <translation>, men fik '</translation> + </message> + <message> + <location line="+4"/> + <source>Unexpected '</source> + <translation>Uventet '</translation> + </message> + <message> + <location line="+210"/> + <source>Expected character data.</source> + <translation>Forventet tegndata.</translation> + </message> + <message> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="-995"/> + <source>Recursive entity detected.</source> + <translation>Rekursiv entitet opdaget.</translation> + </message> + <message> + <location line="+516"/> + <source>Start tag expected.</source> + <translation>Start-tag forventet.</translation> + </message> + <message> + <location line="+222"/> + <source>XML declaration not at start of document.</source> + <translation>XML-deklaration ikke i starten af dokumentet.</translation> + </message> + <message> + <location line="-31"/> + <source>NDATA in parameter entity declaration.</source> + <translation>NDATA i parameterentitetsdeklaration.</translation> + </message> + <message> + <location line="+34"/> + <source>%1 is an invalid processing instruction name.</source> + <translation>%1 er et ugyldigt processing-instruction-navn.</translation> + </message> + <message> + <location line="+11"/> + <source>Invalid processing instruction name.</source> + <translation>Ugyldigt processing-instruction-navn.</translation> + </message> + <message> + <location filename="../src/corelib/xml/qxmlstream.cpp" line="-521"/> + <location line="+12"/> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="+164"/> + <location line="+53"/> + <source>Illegal namespace declaration.</source> + <translation>Ulovligt navnerumsdeklaration.</translation> + </message> + <message> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="+15"/> + <source>Invalid XML name.</source> + <translation>Ugyldigt XML-navn.</translation> + </message> + <message> + <location line="+23"/> + <source>Opening and ending tag mismatch.</source> + <translation>Åbner og afslutter tag-mismatch.</translation> + </message> + <message> + <location line="+18"/> + <source>Reference to unparsed entity '%1'.</source> + <translation>Reference to ufortolket enhed '%1'.</translation> + </message> + <message> + <location line="-13"/> + <location line="+61"/> + <location line="+40"/> + <source>Entity '%1' not declared.</source> + <translation>Enheden '%1' ikke deklareret.</translation> + </message> + <message> + <location line="-26"/> + <source>Reference to external entity '%1' in attribute value.</source> + <translation>Reference til ekstern enhed '%1' i attributværdi.</translation> + </message> + <message> + <location line="+40"/> + <source>Invalid character reference.</source> + <translation>Ugyldig tegnreference.</translation> + </message> + <message> + <location filename="../src/corelib/xml/qxmlstream.cpp" line="-75"/> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="-823"/> + <source>Encountered incorrectly encoded content.</source> + <translation>Indhold med forkert enkodning læst.</translation> + </message> + <message> + <location line="+274"/> + <source>The standalone pseudo attribute must appear after the encoding.</source> + <translation>Den frie pseudo-attribut skal optræde efter enkodningen.</translation> + </message> + <message> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="+562"/> + <source>%1 is an invalid PUBLIC identifier.</source> + <translation>%1 er en ugyldig PUBLIC identifier.</translation> + </message> +</context> +<context> + <name>QtXmlPatterns</name> + <message> + <location filename="../src/xmlpatterns/acceltree/qacceltreebuilder.cpp" line="+205"/> + <source>An %1-attribute with value %2 has already been declared.</source> + <translation>En %1-attribut med værdi %2 er allerede erklæret.</translation> + </message> + <message> + <location line="+13"/> + <source>An %1-attribute must have a valid %2 as value, which %3 isn't.</source> + <translation>En %1-attribut skal have en gyldig %2 som værdi, hvilket %3 ikke er.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/api/qiodevicedelegate.cpp" line="+84"/> + <source>Network timeout.</source> + <translation>Netværk timeout.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+320"/> + <source>Element %1 can't be serialized because it appears outside the document element.</source> + <translation>Element %1 kan ikke serialiseres fordi det optræder udenfor dokument-elementet.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qabstractdatetime.cpp" line="+80"/> + <source>Year %1 is invalid because it begins with %2.</source> + <translation>År %1 er ugyldigt da det begynder med %2.</translation> + </message> + <message> + <location line="+19"/> + <source>Day %1 is outside the range %2..%3.</source> + <translation>Dag %1 er udenfor intervallet %2..%3.</translation> + </message> + <message> + <location line="+7"/> + <source>Month %1 is outside the range %2..%3.</source> + <translation>Måned %1 er udenfor intervallet %2..%3.</translation> + </message> + <message> + <location line="+10"/> + <source>Overflow: Can't represent date %1.</source> + <translation>Overflow: Kan ikke repræsentere dato %1.</translation> + </message> + <message> + <location line="+9"/> + <source>Day %1 is invalid for month %2.</source> + <translation>Dag %1 er ugyldig for månet %2.</translation> + </message> + <message> + <location line="+49"/> + <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source> + <translation>Tidspunkt 24:%1:%2.%3 er ugyldigt. Timetal er 24, men minutter, sekunder og millisekunder er ikke alle 0; </translation> + </message> + <message> + <location line="+13"/> + <source>Time %1:%2:%3.%4 is invalid.</source> + <translation>Tidspunkt %1:%2:%3.%4 er ugyldigt.</translation> + </message> + <message> + <location line="+115"/> + <source>Overflow: Date can't be represented.</source> + <translation>Overflow: Dato kan ikke repræsenteres.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="+99"/> + <location line="+15"/> + <source>At least one component must be present.</source> + <translation>Mindst en komponent skal være tilstede.</translation> + </message> + <message> + <location line="-7"/> + <source>At least one time component must appear after the %1-delimiter.</source> + <translation>Mindst en tidskomponent skal optræde efter %1-skillemærket.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qabstractfloatmathematician.cpp" line="+64"/> + <source>No operand in an integer division, %1, can be %2.</source> + <translation>Ingen operand i en heltalsdivision, %1, kan være %2.</translation> + </message> + <message> + <location line="+7"/> + <source>The first operand in an integer division, %1, cannot be infinity (%2).</source> + <translation>Den første operand i en heltalsdivision, %1, kan ikke være uendeligt (%2).</translation> + </message> + <message> + <location line="+6"/> + <source>The second operand in a division, %1, cannot be zero (%2).</source> + <translation>Den anden operand i en division, %1, kan ikke være nul (%2).</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qanyuri_p.h" line="+132"/> + <source>%1 is not a valid value of type %2.</source> + <translation>%1 er ikke en gyldig værdi af typen %2.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qatomiccasters_p.h" line="+223"/> + <source>When casting to %1 from %2, the source value cannot be %3.</source> + <translation>Ved cast til %1 fra %2, kan kildeværdien ikke være %3.</translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="+65"/> + <source>Integer division (%1) by zero (%2) is undefined.</source> + <translation>Heltalsdivision (%1) med nul (%2) er udefineret.</translation> + </message> + <message> + <location line="+7"/> + <source>Division (%1) by zero (%2) is undefined.</source> + <translation>Division (%1) med nul (%2) er udefineret.</translation> + </message> + <message> + <location line="+7"/> + <source>Modulus division (%1) by zero (%2) is undefined.</source> + <translation>Modulusdivision (%1) med nul (%2) er udefineret.</translation> + </message> + <message> + <location line="+122"/> + <location line="+32"/> + <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source> + <translation>Division af værdi af typen %1 med %2 (ikke et tal) er ikke tilladt.</translation> + </message> + <message> + <location line="-20"/> + <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+32"/> + <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qatomicvalue.cpp" line="+79"/> + <source>A value of type %1 cannot have an Effective Boolean Value.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qboolean.cpp" line="+78"/> + <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qderivedinteger_p.h" line="+402"/> + <source>Value %1 of type %2 exceeds maximum (%3).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>Value %1 of type %2 is below minimum (%3).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/data/qhexbinary.cpp" line="+91"/> + <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+19"/> + <source>%1 is not valid as a value of type %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qarithmeticexpression.cpp" line="+207"/> + <source>Operator %1 cannot be used on type %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+17"/> + <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qattributenamevalidator.cpp" line="+66"/> + <source>The namespace URI in the name for a computed attribute cannot be %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qcastas.cpp" line="+88"/> + <source>Type error in cast, expected %1, received %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+29"/> + <source>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.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qcastingplatform.cpp" line="+134"/> + <source>No casting is possible with %1 as the target type.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>It is not possible to cast from %1 to %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+27"/> + <source>Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+23"/> + <source>It's not possible to cast the value %1 of type %2 to %3</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>Failure when casting from %1 to %2: %3</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qcommentconstructor.cpp" line="+67"/> + <source>A comment cannot contain %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>A comment cannot end with a %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qcomparisonplatform.cpp" line="+167"/> + <source>No comparisons can be done involving the type %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+14"/> + <source>Operator %1 is not available between atomic values of type %2 and %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qdocumentcontentvalidator.cpp" line="+86"/> + <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qexpressionfactory.cpp" line="+169"/> + <source>A library module cannot be evaluated directly. It must be imported from a main module.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+40"/> + <source>No template by name %1 exists.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qgenericpredicate.cpp" line="+106"/> + <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+32"/> + <source>A positional predicate must evaluate to a single numeric value.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+113"/> + <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+24"/> + <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qpath.cpp" line="+109"/> + <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp" line="+84"/> + <source>The data of a processing instruction cannot contain the string %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qqnameconstructor.cpp" line="+82"/> + <source>No namespace binding exists for the prefix %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qqnameconstructor_p.h" line="+156"/> + <source>No namespace binding exists for the prefix %1 in %2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+69"/> + <source>%1 is an invalid %2</source> + <translation type="unfinished"></translation> + </message> + <message numerus="yes"> + <location filename="../src/xmlpatterns/functions/qabstractfunctionfactory.cpp" line="+77"/> + <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source> + <translation type="unfinished"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> + </message> + <message numerus="yes"> + <location line="+11"/> + <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source> + <translation type="unfinished"> + <numerusform></numerusform> + <numerusform></numerusform> + </translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qaggregatefns.cpp" line="+120"/> + <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+74"/> + <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+91"/> + <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qassemblestringfns.cpp" line="+88"/> + <source>%1 is not a valid XML 1.0 character.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qcomparingaggregator.cpp" line="+197"/> + <source>The first argument to %1 cannot be of type %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qdatetimefn.cpp" line="+86"/> + <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qerrorfn.cpp" line="+61"/> + <source>%1 was called.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="+94"/> + <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+39"/> + <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+26"/> + <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qpatternplatform.cpp" line="+92"/> + <source>%1 matches newline characters</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> + <source>%1 and %2 match the start and end of a line.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>Matches are case insensitive</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> + <source>Whitespace characters are removed, except when they appear in character classes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+99"/> + <source>%1 is an invalid regular expression pattern: %2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+30"/> + <source>%1 is an invalid flag for regular expressions. Valid flags are:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+17"/> + <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+346"/> + <source>It will not be possible to retrieve %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qcontextnodechecker.cpp" line="+54"/> + <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qsequencegeneratingfns.cpp" line="+279"/> + <source>The default collection is undefined</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+13"/> + <source>%1 cannot be retrieved</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qstringvaluefns.cpp" line="+252"/> + <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qtimezonefns.cpp" line="+87"/> + <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>%1 is not a whole number of minutes.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/janitors/qcardinalityverifier.cpp" line="+58"/> + <source>Required cardinality is %1; got cardinality %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/janitors/qitemverifier.cpp" line="+67"/> + <source>The item %1 did not match the required type %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+379"/> + <location line="+7253"/> + <source>%1 is an unknown schema type.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-6971"/> + <source>Only one %1 declaration can occur in the query prolog.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+188"/> + <source>The initialization of variable %1 depends on itself</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+63"/> + <source>No variable by name %1 exists</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qparsercontext.cpp" line="+93"/> + <source>The variable %1 is unused</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+2841"/> + <source>Version %1 is not supported. The supported XQuery version is 1.0.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+16"/> + <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+55"/> + <source>No function with signature %1 is available</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+72"/> + <location line="+10"/> + <source>A default namespace declaration must occur before function, variable, and option declarations.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <source>Namespace declarations must occur before function, variable, and option declarations.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+11"/> + <source>Module imports must occur before function, variable, and option declarations.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+200"/> + <source>It is not possible to redeclare prefix %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+18"/> + <source>Prefix %1 is already declared in the prolog.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+95"/> + <source>The name of an option must have a prefix. There is no default namespace for options.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+171"/> + <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+13"/> + <source>The target namespace of a %1 cannot be empty.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>The module import feature is not supported</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+52"/> + <source>No value is available for the external variable by name %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-4154"/> + <source>A construct was encountered which only is allowed in XQuery.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+118"/> + <source>A template by name %1 has already been declared.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3581"/> + <source>The keyword %1 cannot occur with any other mode name.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+29"/> + <source>The value of attribute %1 must of type %2, which %3 isn't.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+75"/> + <source>The prefix %1 can not be bound. By default, it is already bound to the namespace %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+312"/> + <source>A variable by name %1 has already been declared.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+135"/> + <source>A stylesheet function must have a prefixed name.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>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</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+34"/> + <source>A function already exists with the signature %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+23"/> + <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+37"/> + <source>An argument by name %1 has already been declared. Every argument name must be unique.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+179"/> + <source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+11"/> + <source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+14"/> + <source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>In an XSL-T pattern, function %1 cannot have a third argument.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <source>In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+63"/> + <source>In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+126"/> + <source>%1 is an invalid template mode name.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+44"/> + <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+758"/> + <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+39"/> + <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+267"/> + <source>Each name of a template parameter must be unique; %1 is duplicated.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+129"/> + <source>The %1-axis is unsupported in XQuery</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1150"/> + <source>%1 is not a valid name for a processing-instruction.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-7029"/> + <source>%1 is not a valid numeric literal.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6165"/> + <source>No function by name %1 is available.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+102"/> + <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>%1 is an invalid namespace URI.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>It is not possible to bind to the prefix %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>Two namespace declaration attributes have the same name: %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+89"/> + <source>The namespace URI must be a constant and cannot use enclosed expressions.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+16"/> + <source>An attribute by name %1 has already appeared on this element.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+61"/> + <source>A direct element constructor is not well-formed. %1 is ended with %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+458"/> + <source>The name %1 does not refer to any schema type.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>%1 is not an atomic type. Casting is only possible to atomic types.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+145"/> + <location line="+71"/> + <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+48"/> + <source>The name of an extension expression must be in a namespace.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/type/qcardinality.cpp" line="+55"/> + <source>empty</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>zero or one</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>exactly one</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>one or more</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>zero or more</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/type/qtypechecker.cpp" line="+63"/> + <source>Required type is %1, but %2 was found.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+44"/> + <source>Promoting %1 to %2 may cause loss of precision.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+49"/> + <source>The focus is undefined.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="+86"/> + <source>It's not possible to add attributes after any other kind of node.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>An attribute by name %1 has already been created.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/utils/qxpathhelper_p.h" line="+120"/> + <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+60"/> + <source>Attribute %1 can't be serialized because it appears at the top level.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp" line="+314"/> + <source>%1 is an unsupported encoding.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+16"/> + <source>%1 contains octets which are disallowed in the requested encoding %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+18"/> + <source>The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qapplytemplate.cpp" line="+119"/> + <source>Ambiguous rule match.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp" line="+69"/> + <source>In a namespace constructor, the value for a namespace cannot be an empty string.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+11"/> + <source>The prefix must be a valid %1, which %2 is not.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+14"/> + <source>The prefix %1 cannot be bound.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <source>Only the prefix %1 can be bound to %2 and vice versa.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qevaluationcache.cpp" line="+117"/> + <source>Circularity detected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/expr/qtemplate.cpp" line="+145"/> + <source>The parameter %1 is required, but no corresponding %2 is supplied.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-71"/> + <source>The parameter %1 is passed, but no corresponding %2 exists.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/functions/qunparsedtextfn.cpp" line="+65"/> + <source>The URI cannot have a fragment</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+519"/> + <source>Element %1 is not allowed at this location.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>Text nodes are not allowed at this location.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+20"/> + <source>Parse error: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+62"/> + <source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+20"/> + <source>Running an XSL-T 1.0 stylesheet with a 2.0 processor.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+108"/> + <source>Unknown XSL-T attribute %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+23"/> + <source>Attribute %1 and %2 are mutually exclusive.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+166"/> + <source>In a simplified stylesheet module, attribute %1 must be present.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+72"/> + <source>If element %1 has no attribute %2, it cannot have attribute %3 or %4.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>Element %1 must have at least one of the attributes %2 or %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+28"/> + <source>At least one mode must be specified in the %1-attribute on element %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qmaintainingreader.cpp" line="+183"/> + <source>Attribute %1 cannot appear on the element %2. Only the standard attributes can appear.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+6"/> + <source>Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+9"/> + <source>Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+13"/> + <source>XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>The attribute %1 must appear on element %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>The element with local name %1 does not exist in XSL-T.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+123"/> + <source>Element %1 must come last.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+24"/> + <source>At least one %1-element must occur before %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>Only one %1-element can appear.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+31"/> + <source>At least one %1-element must occur inside %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+58"/> + <source>When attribute %1 is present on %2, a sequence constructor cannot be used.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+13"/> + <source>Element %1 must have either a %2-attribute or a sequence constructor.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+125"/> + <source>When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+270"/> + <source>Element %1 cannot have children.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+434"/> + <source>Element %1 cannot have a sequence constructor.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+86"/> + <location line="+9"/> + <source>The attribute %1 cannot appear on %2, when it is a child of %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+15"/> + <source>A parameter in a function cannot be declared to be a tunnel.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+149"/> + <source>This processor is not Schema-aware and therefore %1 cannot be used.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+57"/> + <source>Top level stylesheet elements must be in a non-null namespace, which %1 isn't.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+48"/> + <source>The value for attribute %1 on element %2 must either be %3 or %4, not %5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+20"/> + <source>Attribute %1 cannot have the value %2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+58"/> + <source>The attribute %1 can only appear on the first %2 element.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+99"/> + <source>At least one %1 element must appear as child of %2.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>VolumeSlider</name> + <message> + <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+67"/> + <source>Muted</source> + <translation></translation> + </message> + <message> + <location line="+5"/> + <location line="+15"/> + <source>Volume: %1%</source> + <translation>Lydstyrke: %1%</translation> + </message> +</context> +</TS> diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 33f9ea8..f623925 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -66,15 +66,15 @@ <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+171"/> <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled.</source> - <translation>Warnung: Das Paket gstreamer0.10-plugins-good ist nicht installiert. -Einige Video-Funktionen stehen nicht zur Verfügung.</translation> + <translation>Achtung: Das Paket gstreamer0.10-plugins-good ist nicht installiert. +Einige Video-Funktionen stehen nicht zur Verfügung.</translation> </message> <message> <location line="+5"/> <source>Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled</source> - <translation>Warnung: Die grundlegenden GStreamer-plugins sind nicht installiert. -Die Audio- und Video-Unterstützung wurde abgeschaltet</translation> + <translation>Achtung: Die grundlegenden GStreamer-Plugins sind nicht installiert. +Die Audio- und Video-Unterstützung steht nicht zur Verfügung.</translation> </message> </context> <context> @@ -85,7 +85,7 @@ Die Audio- und Video-Unterstützung wurde abgeschaltet</translation> Check your Gstreamer installation and make sure you have libgstreamer-plugins-base installed.</source> - <translation>Das Abspielen konnte nicht gestartet werden. + <translation>Die Wiedergabe kann nicht gestartet werden. Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Paket libgstreamer-plugins-base installiert ist.</translation> </message> <message> @@ -139,7 +139,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa <location line="+18"/> <location line="+54"/> <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source> - <translation>Die Regler wird zur Einstellung der Lautstärke benutzt. Die Position links entspricht 0%; die Position rechts entspricht %1%</translation> + <translation>Mit diesem Regler stellen Sie die Lautstärke ein. Die Position links entspricht 0%; die Position rechts entspricht %1%</translation> </message> </context> <context> @@ -291,12 +291,12 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa <message> <location line="+9"/> <source>Preview File Info</source> - <translation>Voransicht der Datei-Information</translation> + <translation>Vorschau der Datei-Informationen</translation> </message> <message> <location line="+23"/> <source>Preview File Contents</source> - <translation>Voransicht des Datei-Inhalts</translation> + <translation>Vorschau des Datei-Inhalts</translation> </message> <message> <location line="+88"/> @@ -392,7 +392,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa <message> <location line="+4"/> <source>Sort by &Name</source> - <translation>Nach &Name sortieren</translation> + <translation>Nach &Namen sortieren</translation> </message> <message> <location line="+2"/> @@ -497,7 +497,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa File not found. Check path and filename.</source> <translation>%1 -Datei konnte nicht gefunden werden. +Datei kann nicht gefunden werden. Überprüfen Sie Pfad und Dateinamen.</translation> </message> <message> @@ -617,7 +617,7 @@ nach <message> <location line="+45"/> <source>Defaults</source> - <translation>Defaults</translation> + <translation>Voreinstellungen</translation> </message> <message> <location line="+50"/> @@ -699,7 +699,7 @@ nach <message> <location line="+18"/> <source>Contains commands to manipulate the window</source> - <translation>Enthält Befehle zum Ändern der Fenstergröße </translation> + <translation>Enthält Befehle zum Ändern der Fenstergröße</translation> </message> <message> <location line="+3"/> @@ -772,18 +772,18 @@ nach <message> <location line="+3"/> <source>The protocol `%1' does not support getting files</source> - <translation>Das Protokoll `%1' unterstützt nicht das Laden von Files</translation> + <translation>Das Protokoll `%1' unterstützt nicht das Laden von Dateien</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support putting files</source> - <translation>Das Protokoll `%1' unterstützt nicht das Speichern von Files</translation> + <translation>Das Protokoll `%1' unterstützt nicht das Speichern von Dateien</translation> </message> <message> <location line="+243"/> <location line="+4"/> <source>The protocol `%1' does not support copying or moving files or directories</source> - <translation> Das Protokoll `%1' unterstützt nicht das Kopieren oder Verschieben von Dateien oder Verzeichnissen</translation> + <translation>Das Protokoll `%1' unterstützt nicht das Kopieren oder Verschieben von Dateien oder Verzeichnissen</translation> </message> <message> <location line="+237"/> @@ -847,7 +847,7 @@ nach <location line="+787"/> <location line="+208"/> <source>Operation on socket is not supported</source> - <translation>Diese Socketoperation wird nicht unterstützt</translation> + <translation>Diese Socket-Operation wird nicht unterstützt</translation> </message> <message> <location line="+137"/> @@ -899,7 +899,7 @@ nach <message> <location line="+2"/> <source>Incompatible Qt Library Error</source> - <translation>Qt Bibliothek ist inkompatibel</translation> + <translation>Die Qt-Bibliothek ist inkompatibel</translation> </message> <message> <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+376"/> @@ -909,7 +909,7 @@ nach <message> <location line="+2"/> <source>Activates the program's main window</source> - <translation>Aktiviert das Programmhauptfenster</translation> + <translation>Aktiviert das Hauptfenster der Anwendung</translation> </message> </context> <context> @@ -1066,17 +1066,17 @@ nach <message> <location line="+303"/> <source>Unable to commit transaction</source> - <translation>Die Transaktion konnte nicht durchgeführt werden (Operation 'commit' fehlgeschlagen)</translation> + <translation>Die Transaktion kann nicht durchgeführt werden (Operation 'commit' fehlgeschlagen)</translation> </message> <message> <location line="+17"/> <source>Unable to rollback transaction</source> - <translation>Die Transaktion konnte nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen)</translation> + <translation>Die Transaktion kann nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen)</translation> </message> <message> <location line="+15"/> <source>Unable to set autocommit</source> - <translation>'autocommit' konnte nicht aktiviert werden</translation> + <translation>'autocommit' kann nicht aktiviert werden</translation> </message> </context> <context> @@ -1085,32 +1085,32 @@ nach <location line="-1043"/> <location line="+243"/> <source>Unable to execute statement</source> - <translation>Der Befehl konnte nicht ausgeführt werden</translation> + <translation>Der Befehl kann nicht ausgeführt werden</translation> </message> <message> <location line="-206"/> <source>Unable to prepare statement</source> - <translation>Der Befehl konnte nicht initialisiert werden</translation> + <translation>Der Befehl kann nicht initialisiert werden</translation> </message> <message> <location line="+196"/> <source>Unable to bind variable</source> - <translation>Die Variable konnte nicht gebunden werden</translation> + <translation>Die Variable kann nicht gebunden werden</translation> </message> <message> <location line="+92"/> <source>Unable to fetch record %1</source> - <translation>Der Datensatz %1 konnte nicht abgeholt werden</translation> + <translation>Der Datensatz %1 kann nicht abgeholt werden</translation> </message> <message> <location line="+17"/> <source>Unable to fetch next</source> - <translation>Der nächste Datensatz konnte nicht abgeholt werden</translation> + <translation>Der nächste Datensatz kann nicht abgeholt werden</translation> </message> <message> <location line="+20"/> <source>Unable to fetch first</source> - <translation>Der erste Datensatz konnte nicht abgeholt werden</translation> + <translation>Der erste Datensatz kann nicht abgeholt werden</translation> </message> </context> <context> @@ -1358,7 +1358,7 @@ nach <message> <location filename="../src/gui/dialogs/qerrormessage.cpp" line="+391"/> <source>&Show this message again</source> - <translation>Diese Meldung noch einmal an&zeigen</translation> + <translation>Diese Meldung wieder an&zeigen</translation> </message> <message> <location line="+1"/> @@ -1373,7 +1373,7 @@ nach <message> <location line="+3"/> <source>Warning:</source> - <translation>Warnung:</translation> + <translation>Achtung:</translation> </message> <message> <location line="+3"/> @@ -1397,12 +1397,12 @@ nach <message> <location line="+120"/> <source>Cannot open %1 for input</source> - <translation>%1 konnte nicht zum Lesen geöffnet werden</translation> + <translation>%1 kann nicht zum Lesen geöffnet werden</translation> </message> <message> <location line="+17"/> <source>Cannot open for output</source> - <translation>Das Öffnen zum Schreiben schlug fehl</translation> + <translation>Das Öffnen zum Schreiben ist fehlgeschlagen</translation> </message> <message> <location line="+10"/> @@ -1565,12 +1565,12 @@ Stellen Sie sicher, dass der Verzeichnisname richtig ist.</translation> <source>'%1' is write protected. Do you want to delete it anyway?</source> <translation>'%1' ist schreibgeschützt. -Möchten sie die Datei trotzdem löschen?</translation> +Möchten Sie die Datei trotzdem löschen?</translation> </message> <message> <location line="+5"/> <source>Are sure you want to delete '%1'?</source> - <translation>Sind Sie sicher, dass Sie %1 löschen möchten?</translation> + <translation>Sind Sie sicher, dass Sie '%1' löschen möchten?</translation> </message> <message> <location line="+15"/> @@ -1624,7 +1624,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <location filename="../src/gui/dialogs/qfiledialog.ui"/> <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> <source>Look in:</source> - <translation>Suche in:</translation> + <translation>Suchen in:</translation> </message> <message> <location/> @@ -1658,7 +1658,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+1"/> <source>%1 bytes</source> - <translation>%1 byte</translation> + <translation>%1 Byte</translation> </message> <message> <location line="+77"/> @@ -1887,12 +1887,12 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+3"/> <source>Simplified Chinese</source> - <translation>Vereinfachtes Chinesisch</translation> + <translation>Chinesisch (Kurzzeichen)</translation> </message> <message> <location line="+3"/> <source>Traditional Chinese</source> - <translation>Traditionelles Chinesisch</translation> + <translation>Chinesisch (Langzeichen)</translation> </message> <message> <location line="+3"/> @@ -2296,7 +2296,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+6"/> <source>SSL handshake failed</source> - <translation>Es trat ein Fehler im Ablauf des SSL-Protokolls auf.</translation> + <translation>Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten.</translation> </message> <message> <location line="-3"/> @@ -2580,7 +2580,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+43"/> <source>The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)</source> - <translation>Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (Im Debug- und Release-Modus erstellte Bibliotheken können nicht zusammen verwendet werden.)</translation> + <translation>Das Plugin '%1' verwendet eine inkompatible Qt-Bibliothek. (Im Debug- bzw. Release-Modus erstellte Bibliotheken können nicht zusammen verwendet werden.)</translation> </message> <message> <location filename="../src/corelib/plugin/qlibrary_unix.cpp" line="+209"/> @@ -2670,7 +2670,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <location filename="../src/network/socket/qlocalsocket_tcp.cpp" line="+132"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+134"/> <source>%1: Connection refused</source> - <translation>%1: Der Aufbau einer Verbindung wurde verweigert</translation> + <translation>%1: Der Verbindungsaufbau wurde verweigert</translation> </message> <message> <location line="+3"/> @@ -2696,13 +2696,13 @@ Möchten sie die Datei trotzdem löschen?</translation> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Socket resource error</source> - <translation>%1: Socketfehler (Ressourcenproblem)</translation> + <translation>%1: Socket-Fehler (Ressourcenproblem)</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Socket operation timed out</source> - <translation>%1: Zeitüberschreitung bei Socketoperation</translation> + <translation>%1: Zeitüberschreitung bei Socket-Operation</translation> </message> <message> <location line="+3"/> @@ -2721,7 +2721,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: The socket operation is not supported</source> - <translation>%1: Diese Socketoperation wird nicht unterstützt</translation> + <translation>%1: Diese Socket-Operation wird nicht unterstützt</translation> </message> <message> <location line="+4"/> @@ -2740,7 +2740,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1252"/> <source>Unable to open database '</source> - <translation>Die Datenbankverbindung konnte nicht geöffnet werden '</translation> + <translation>Die Datenbankverbindung kann nicht geöffnet werden '</translation> </message> <message> <location line="+7"/> @@ -2750,17 +2750,17 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+127"/> <source>Unable to begin transaction</source> - <translation>Es konnte keine Transaktion gestartet werden</translation> + <translation>Es kann keine Transaktion gestartet werden</translation> </message> <message> <location line="+17"/> <source>Unable to commit transaction</source> - <translation>Die Transaktion konnte nicht durchgeführt werden (Operation 'commit' fehlgeschlagen)</translation> + <translation>Die Transaktion kann nicht durchgeführt werden (Operation 'commit' fehlgeschlagen)</translation> </message> <message> <location line="+17"/> <source>Unable to rollback transaction</source> - <translation>Die Transaktion konnte nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen)</translation> + <translation>Die Transaktion kann nicht rückgängig gemacht werden (Operation 'rollback' fehlgeschlagen)</translation> </message> </context> <context> @@ -3422,7 +3422,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location line="+31"/> <source>Socket error on %1: %2</source> - <translation>Socketfehler bei %1: %2</translation> + <translation>Socket-Fehler bei %1: %2</translation> </message> <message> <location line="+15"/> @@ -3815,7 +3815,7 @@ Möchten sie die Datei trotzdem löschen?</translation> <message> <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-357"/> <source>Print To File ...</source> - <translation>In Datei drucken</translation> + <translation>In Datei drucken ...</translation> </message> <message> <location line="+80"/> @@ -4022,12 +4022,12 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location line="+253"/> <source>Print to File (PDF)</source> - <translation>Druck in PDF-Datei</translation> + <translation>In PDF-Datei drucken</translation> </message> <message> <location line="+1"/> <source>Print to File (Postscript)</source> - <translation>Druck in Postscript-Datei</translation> + <translation>In Postscript-Datei drucken</translation> </message> <message> <location line="+47"/> @@ -4967,97 +4967,97 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location line="+1"/> <source>Open URL</source> - <translation>Öffne URL</translation> + <translation>URL öffnen</translation> </message> <message> <location line="+1"/> <source>Launch Mail</source> - <translation>Start Mail</translation> + <translation>Mail starten</translation> </message> <message> <location line="+1"/> <source>Launch Media</source> - <translation>Start Media Player</translation> + <translation>Medienspieler starten</translation> </message> <message> <location line="+1"/> <source>Launch (0)</source> - <translation>Start (0)</translation> + <translation>(0) starten</translation> </message> <message> <location line="+1"/> <source>Launch (1)</source> - <translation>Start (1)</translation> + <translation>(1) starten</translation> </message> <message> <location line="+1"/> <source>Launch (2)</source> - <translation>Start (2)</translation> + <translation>(2) starten</translation> </message> <message> <location line="+1"/> <source>Launch (3)</source> - <translation>Start (3)</translation> + <translation>(3) starten</translation> </message> <message> <location line="+1"/> <source>Launch (4)</source> - <translation>Start (4)</translation> + <translation>(4) starten</translation> </message> <message> <location line="+1"/> <source>Launch (5)</source> - <translation>Start (5)</translation> + <translation>(5) starten</translation> </message> <message> <location line="+1"/> <source>Launch (6)</source> - <translation>Start (6)</translation> + <translation>(6) starten</translation> </message> <message> <location line="+1"/> <source>Launch (7)</source> - <translation>Start (7)</translation> + <translation>(7) starten</translation> </message> <message> <location line="+1"/> <source>Launch (8)</source> - <translation>Start (8)</translation> + <translation>(8) starten</translation> </message> <message> <location line="+1"/> <source>Launch (9)</source> - <translation>Start (9)</translation> + <translation>(9) starten</translation> </message> <message> <location line="+1"/> <source>Launch (A)</source> - <translation>Start (A)</translation> + <translation>(A) starten</translation> </message> <message> <location line="+1"/> <source>Launch (B)</source> - <translation>Start (B)</translation> + <translation>(B) starten</translation> </message> <message> <location line="+1"/> <source>Launch (C)</source> - <translation>Start (C)</translation> + <translation>(C) starten</translation> </message> <message> <location line="+1"/> <source>Launch (D)</source> - <translation>Start (D)</translation> + <translation>(D) starten</translation> </message> <message> <location line="+1"/> <source>Launch (E)</source> - <translation>Start (E)</translation> + <translation>(E) starten</translation> </message> <message> <location line="+1"/> <source>Launch (F)</source> - <translation>Start (F)</translation> + <translation>(F) starten</translation> </message> <message> <location line="+4"/> @@ -5385,12 +5385,12 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location line="+119"/> <source>Error while reading: %1</source> - <translation>Beim Lesen trat ein Fehler auf: %1</translation> + <translation>Beim Lesen ist ein Fehler aufgetreten: %1</translation> </message> <message> <location line="+96"/> <source>Error during SSL handshake: %1</source> - <translation>Es trat ein Fehler im Ablauf des SSL-Protokolls auf: %1</translation> + <translation>Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten: %1</translation> </message> <message> <location line="-524"/> @@ -5455,7 +5455,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location line="+4"/> <source>%1: already exists</source> - <translation>%1: existiert bereits</translation> + <translation>%1: Existiert bereits</translation> </message> <message> <location line="+13"/> @@ -5469,7 +5469,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+584"/> <source>Unable to open connection</source> - <translation>Die Datenbankverbindung konnte nicht geöffnet werden</translation> + <translation>Die Datenbankverbindung kann nicht geöffnet werden</translation> </message> <message> <location line="+5"/> @@ -5495,7 +5495,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location filename="../src/network/socket/qtcpserver.cpp" line="+282"/> <source>Operation on socket is not supported</source> - <translation>Diese Socketoperation wird nicht unterstützt</translation> + <translation>Diese Socket-Operation wird nicht unterstützt</translation> </message> </context> <context> @@ -7342,7 +7342,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location line="+9"/> <source>%1 is not an atomic type. Casting is only possible to atomic types.</source> - <translation>%1 ist kein atomarer Typ. Es können nur "cast"-Operation zu atomaren Typen durchgeführt werden.</translation> + <translation>%1 ist kein atomarer Typ. "cast"-Operation können nur zu atomaren Typen durchgeführt werden.</translation> </message> <message> <location line="+76"/> @@ -7397,17 +7397,17 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="-180"/> <source>Integer division (%1) by zero (%2) is undefined.</source> - <translation>Die Ganzzahldivision (%1) durch Null (%2) ist nicht definiert.</translation> + <translation>Die Ganzzahldivision (%1) durch Null (%2) ist nicht definiert.</translation> </message> <message> <location line="+7"/> <source>Division (%1) by zero (%2) is undefined.</source> - <translation>Die Division (%1) durch Null (%2) ist nicht definiert.</translation> + <translation>Die Division (%1) durch Null (%2) ist nicht definiert.</translation> </message> <message> <location line="+7"/> <source>Modulus division (%1) by zero (%2) is undefined.</source> - <translation>Die Modulo-Division (%1) durch Null (%2) ist nicht definiert.</translation> + <translation>Die Modulo-Division (%1) durch Null (%2) ist nicht definiert.</translation> </message> <message> <location filename="../src/xmlpatterns/expr/qcastingplatform.cpp" line="-73"/> @@ -7443,13 +7443,13 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <message> <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="-3102"/> <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source> - <translation>Der Namensraum einer nutzerdefinierten Funktion darf nicht leer sein (für diesen Zweck gibt es den vordefinierten Präfix %1)</translation> + <translation>Der Namensraum einer benutzerdefinierten Funktion darf nicht leer sein (für diesen Zweck gibt es den vordefinierten Präfix %1)</translation> </message> <message> <location line="-693"/> <location line="+10"/> <source>A default namespace declaration must occur before function, variable, and option declarations.</source> - <translation>Die Deklaration des Default-Namensraums muss vor Funktions- Variablen- oder Optionsdeklaration erfolgen.</translation> + <translation>Die Deklaration des Default-Namensraums muss vor Funktions-, Variablen- oder Optionsdeklaration erfolgen.</translation> </message> <message> <location line="-3576"/> diff --git a/translations/qt_help_da.ts b/translations/qt_help_da.ts new file mode 100644 index 0000000..73609a1 --- /dev/null +++ b/translations/qt_help_da.ts @@ -0,0 +1,387 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="he"> +<context> + <name>QCLuceneResultWidget</name> + <message> + <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+110"/> + <source>Search Results</source> + <translation>Søgeresultater</translation> + </message> + <message> + <location line="+7"/> + <source>Note:</source> + <translation>Bemærk:</translation> + </message> + <message> + <location line="+1"/> + <source>The search results may not be complete since the documentation is still being indexed!</source> + <translation>Søgeresultaterne kan være ufuldstændige, fordi dokumentationen stadig indekseres!</translation> + </message> + <message> + <location line="+11"/> + <source>Your search did not match any documents.</source> + <translation>Søgningen matchede ikke nogen dokumenter.</translation> + </message> + <message> + <location line="+4"/> + <source>(The reason for this might be that the documentation is still being indexed.)</source> + <translation>(Årsagen kan være, at dokumentationen stadig indekseres.)</translation> + </message> +</context> +<context> + <name>QHelpCollectionHandler</name> + <message> + <location filename="../tools/assistant/lib/qhelpcollectionhandler.cpp" line="+79"/> + <source>The collection file is not set up yet!</source> + <translation>Hjælpesamlingen er ikke konfigureret endnu!</translation> + </message> + <message> + <location line="+22"/> + <source>Cannot load sqlite database driver!</source> + <translation>Kan ikke indlæse sqlite database-driver!</translation> + </message> + <message> + <location line="+11"/> + <location line="+48"/> + <source>Cannot open collection file: %1</source> + <translation>Kan ikke åbne hjælpesamlingen: %1</translation> + </message> + <message> + <location line="-39"/> + <source>Cannot create tables in file %1!</source> + <translation>Kan ikke oprette tabler i filen %1!</translation> + </message> + <message> + <location line="+16"/> + <source>The specified collection file already exists!</source> + <translation>Den angivne hjælpesamling findes allerede!</translation> + </message> + <message> + <location line="+5"/> + <source>Cannot create directory: %1</source> + <translation>Kan ikke oprette kataloget: %1</translation> + </message> + <message> + <location line="+23"/> + <source>Cannot copy collection file: %1</source> + <translation>Kan ikke kopiere hjælpesamling: %1</translation> + </message> + <message> + <location line="+119"/> + <source>Unknown filter!</source> + <translation>Ukendt filter!</translation> + </message> + <message> + <location line="+55"/> + <source>Cannot register filter %1!</source> + <translation>Kan ikke registrere filteret %1!</translation> + </message> + <message> + <location line="+44"/> + <source>Cannot open documentation file %1!</source> + <translation>Kan ikke åbne dokumentationsfilen %1!</translation> + </message> + <message> + <location line="+6"/> + <source>Invalid documentation file!</source> + <translation>Ugyldig dokumentationsfil!</translation> + </message> + <message> + <location line="+34"/> + <source>The namespace %1 was not registered!</source> + <translation>Navnerummet %1 blev ikke registreret!</translation> + </message> + <message> + <location line="+120"/> + <source>Namespace %1 already exists!</source> + <translation>Navnerummet %1 findes allerede!</translation> + </message> + <message> + <location line="+13"/> + <source>Cannot register namespace!</source> + <translation>Kan ikke registrere navnerummet!</translation> + </message> + <message> + <location line="+24"/> + <source>Cannot open database to optimize!</source> + <translation>Kan ikke åbne den database, der skal optimeres!</translation> + </message> +</context> +<context> + <name>QHelpDBReader</name> + <message> + <source>Cannot open DB!</source> + <translation type="obsolete">Kan ikke åbne DB!</translation> + </message> + <message> + <location filename="../tools/assistant/lib/qhelpdbreader.cpp" line="+95"/> + <source>Cannot open database '%1' '%2': %3</source> + <translation>Kan ikke åbne database '%1' '%2': %3</translation> + </message> +</context> +<context> + <name>QHelpEngineCore</name> + <message> + <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+516"/> + <source>The specified namespace does not exist!</source> + <translation>Det angivne navnerum findes ikke!</translation> + </message> +</context> +<context> + <name>QHelpEngineCorePrivate</name> + <message> + <location line="-394"/> + <source>Cannot open documentation file %1: %2!</source> + <translation>Kan ikke åbne dokumentationsfil %1: %2!</translation> + </message> + <message> + <source>Cannot open collection file %1!</source> + <translation type="obsolete">Kan ikke åbne hjælpesamlingen %1!</translation> + </message> + <message> + <source>Cannot open documentation file %1!</source> + <translation type="obsolete">Kan ikke åbne dokumentationsfilen %1!</translation> + </message> +</context> +<context> + <name>QHelpGenerator</name> + <message> + <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+157"/> + <source>Invalid help data!</source> + <translation>Ugyldigt hjælpedata!</translation> + </message> + <message> + <location line="+6"/> + <source>No output file name specified!</source> + <translation>Der er ikke anført et output-filnavn!</translation> + </message> + <message> + <source>The file %1 already exists!</source> + <translation type="obsolete">Filen %1 findes allerede!</translation> + </message> + <message> + <location line="+14"/> + <source>Building up file structure...</source> + <translation>Bygger filstruktur...</translation> + </message> + <message> + <source>Cannot open DB!</source> + <translation type="obsolete">Kan ikke åbne DB!</translation> + </message> + <message> + <location line="-7"/> + <source>The file %1 cannot be overwritten!</source> + <translation>Filen %1 kan ikke overskrives!</translation> + </message> + <message> + <location line="+18"/> + <source>Cannot open data base file %1!</source> + <translation>Kan ikke åbne databasefil %1!</translation> + </message> + <message> + <location line="+11"/> + <source>Cannot register namespace %1!</source> + <translation>Kan ikke registrere navnerummet %1!</translation> + </message> + <message> + <location line="+6"/> + <source>Insert custom filters...</source> + <translation>Indsæt brugerdefinerede filtre...</translation> + </message> + <message> + <location line="+12"/> + <source>Insert help data for filter section (%1 of %2)...</source> + <translation>Indsæt hjælpedata til filtersektion (%1 af %2)...</translation> + </message> + <message> + <location line="+18"/> + <source>Documentation successfully generated.</source> + <translation>Dokumentationen blev genereret.</translation> + </message> + <message> + <location line="+76"/> + <source>Some tables already exist!</source> + <translation>Nogle af tabellerne findes allerede!</translation> + </message> + <message> + <location line="+61"/> + <source>Cannot create tables!</source> + <translation>Kan ikke oprette tabeller!</translation> + </message> + <message> + <location line="+86"/> + <source>Cannot register virtual folder!</source> + <translation>Kan ikke registrere virtuel mappe!</translation> + </message> + <message> + <location line="+10"/> + <source>Insert files...</source> + <translation>Indsæt filer...</translation> + </message> + <message> + <location line="+41"/> + <source>The file %1 does not exist! Skipping it.</source> + <translation>Filen %1 findes ikke, og den springes over.</translation> + </message> + <message> + <location line="+7"/> + <source>Cannot open file %1! Skipping it.</source> + <translation>Kan ikke åbne filen %1, og den springes over.</translation> + </message> + <message> + <source>Cannot insert file data into database!</source> + <translation type="obsolete">Kan ikke indsætte fildata i databasen!</translation> + </message> + <message> + <location line="+134"/> + <source>The filter %1 is already registered!</source> + <translation>Filtret %1 er allerede registreret!</translation> + </message> + <message> + <location line="+5"/> + <source>Cannot register filter %1!</source> + <translation>Kan ikke registrere filtret %1!</translation> + </message> + <message> + <location line="+24"/> + <source>Insert indices...</source> + <translation>Indsæt indeks...</translation> + </message> + <message> + <location line="+80"/> + <source>Insert contents...</source> + <translation>Indsæt indhold...</translation> + </message> + <message> + <location line="+8"/> + <source>Cannot insert contents!</source> + <translation>Kan ikke indsætte indhold!</translation> + </message> + <message> + <location line="+12"/> + <source>Cannot register contents!</source> + <translation>Kan ikke registrere indhold!</translation> + </message> +</context> +<context> + <name>QHelpSearchQueryWidget</name> + <message> + <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+200"/> + <source>Search for:</source> + <translation>Søg efter:</translation> + </message> + <message> + <location line="+2"/> + <source>Search</source> + <translation>Søg</translation> + </message> + <message> + <location line="+16"/> + <source>Advanced search</source> + <translation>Avanceret søgning</translation> + </message> + <message> + <location line="+18"/> + <source>words <B>similar</B> to:</source> + <translation>ord <B>tilsvarende</B>:</translation> + </message> + <message> + <location line="+5"/> + <source><B>without</B> the words:</source> + <translation><B>uden</B> ordene:</translation> + </message> + <message> + <location line="+5"/> + <source>with <B>exact phrase</B>:</source> + <translation>med den <B>eksakte sætning</B>:</translation> + </message> + <message> + <location line="+5"/> + <source>with <B>all</B> of the words:</source> + <translation>med <B>alle</B> ordene:</translation> + </message> + <message> + <location line="+5"/> + <source>with <B>at least one</B> of the words:</source> + <translation>med <B>mindst ét</B> af ordene:</translation> + </message> +</context> +<context> + <name>QHelpSearchResultWidget</name> + <message> + <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+235"/> + <source>0 - 0 of 0 Hits</source> + <translation>0 - 0 af 0 Hits</translation> + </message> +</context> +<context> + <name>QHelpSearchResultWidgetPrivate</name> + <message> + <location line="-61"/> + <source>%1 - %2 of %3 Hits</source> + <translation>%1 - %2 af %3 Hits</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../tools/assistant/lib/qhelp_global.h" line="+83"/> + <source>Untitled</source> + <translation>Ingen titel</translation> + </message> + <message> + <source>Unknown token at line %1.</source> + <translation type="obsolete">Ukendt symbol på linie %1.</translation> + </message> + <message> + <source>Unknown token at line %1. Expected "QtHelpProject"!</source> + <translation type="obsolete">Ukendt symbol på linie %1. Forventet "QtHelpProject"!</translation> + </message> + <message> + <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+80"/> + <source>Unknown token.</source> + <translation>Ukendt token.</translation> + </message> + <message> + <location line="+13"/> + <source>Unknown token. Expected "QtHelpProject"!</source> + <translation>Ukendt token. Forventede "QtHelpProject"!</translation> + </message> + <message> + <location line="+5"/> + <source>Error in line %1: %2</source> + <translation>Fejl i linie %1: %2</translation> + </message> + <message> + <location line="+13"/> + <source>A virtual folder must not contain a '/' character!</source> + <translation>En virtuel mappe må ikke indholde tegnet '/'!</translation> + </message> + <message> + <location line="+4"/> + <source>A namespace must not contain a '/' character!</source> + <translation>Et navnerum må ikke indeholde tegnet '/'!</translation> + </message> + <message> + <location line="+16"/> + <source>Missing namespace in QtHelpProject.</source> + <translation>Navnerum i +++ mangler.</translation> + </message> + <message> + <location line="+2"/> + <source>Missing virtual folder in QtHelpProject</source> + <translation>Virtuel mappe i QtHelpProject mangler</translation> + </message> + <message> + <location line="+88"/> + <source>Missing attribute in keyword at line %1.</source> + <translation>Attribut i nøgleord på linie %1 mangler.</translation> + </message> + <message> + <location line="+83"/> + <source>The input file %1 could not be opened!</source> + <translation>Input-filen %1 kunne ikke åbnes!</translation> + </message> +</context> +</TS> diff --git a/translations/qt_ru.qm b/translations/qt_ru.qm Binary files differindex 63b7b8b..6467629 100644 --- a/translations/qt_ru.qm +++ b/translations/qt_ru.qm diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index 28e786b..a27b8c4 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -1,37 +1,30 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0"> +<TS version="2.0" language="ru_RU"> <context> <name>AudioOutput</name> <message> <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/> <source><html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html></source> - <translation type="unfinished"></translation> + <translation><html>Звуковое устройство <b>%1</b> не работает.<br/>Будет использоваться <b>%2</b>.</html></translation> </message> <message> <location line="+13"/> <source><html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html></source> - <translation type="unfinished"></translation> + <translation><html>Переключение на звуковое устройство <b>%1</b><br/>, которое доступно и имеет высший приоритет.</html></translation> </message> <message> <location line="+3"/> <source>Revert back to device '%1'</source> - <translation type="unfinished"></translation> + <translation>Возвращение к устройству '%1'</translation> </message> </context> <context> <name>CloseButton</name> <message> - <location filename="../src/gui/widgets/qtabbar.cpp" line="+2251"/> + <location filename="../src/gui/widgets/qtabbar.cpp" line="+2253"/> <source>Close Tab</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>PPDOptionsModel</name> - <message> - <source>Name</source> - <translation type="obsolete">Имя</translation> + <translation>Закрыть вкладку</translation> </message> </context> <context> @@ -39,32 +32,32 @@ <message> <location filename="../src/3rdparty/phonon/phonon/phononnamespace.cpp" line="+55"/> <source>Notifications</source> - <translation type="unfinished"></translation> + <translation>Уведомления</translation> </message> <message> <location line="+2"/> <source>Music</source> - <translation type="unfinished"></translation> + <translation>Музыка</translation> </message> <message> <location line="+2"/> <source>Video</source> - <translation type="unfinished"></translation> + <translation>Видео</translation> </message> <message> <location line="+2"/> <source>Communication</source> - <translation type="unfinished"></translation> + <translation>Общение</translation> </message> <message> <location line="+2"/> <source>Games</source> - <translation type="unfinished"></translation> + <translation>Игры</translation> </message> <message> <location line="+2"/> <source>Accessibility</source> - <translation type="unfinished"></translation> + <translation>Средства для людей с ограниченными возможностями</translation> </message> </context> <context> @@ -73,13 +66,15 @@ <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+171"/> <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled.</source> - <translation type="unfinished"></translation> + <translation>Внимание: Похоже, пакет gstreamer0.10-plugins-good не установлен. + Некоторые возможности воспроизведения видео недоступны.</translation> </message> <message> <location line="+5"/> <source>Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled</source> - <translation type="unfinished"></translation> + <translation>Внимание: Похоже, основной модуль GStreamer не установлен. + Поддержка видео и аудио невозможна</translation> </message> </context> <context> @@ -90,12 +85,15 @@ Check your Gstreamer installation and make sure you have libgstreamer-plugins-base installed.</source> - <translation type="unfinished"></translation> + <translation>Невозможно начать воспроизведение. + +Проверьте установку Gstreamer и убедитесь, +что пакет libgstreamer-plugins-base установлен.</translation> </message> <message> <location line="+113"/> <source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source> - <translation type="unfinished"></translation> + <translation>Отсутствует необходимый кодек. Вам нужно установить следующие кодеки для воспроизведения данного содержимого: %0</translation> </message> <message> <location line="+676"/> @@ -107,27 +105,27 @@ have libgstreamer-plugins-base installed.</source> <location line="+335"/> <location line="+24"/> <source>Could not open media source.</source> - <translation type="unfinished"></translation> + <translation>Не удалось открыть источник медиа-данных.</translation> </message> <message> <location line="-403"/> <source>Invalid source type.</source> - <translation type="unfinished"></translation> + <translation>Неверный тип источника медиа-данных.</translation> </message> <message> <location line="+377"/> <source>Could not locate media source.</source> - <translation type="unfinished"></translation> + <translation>Не удалось найти источник медиа-данных.</translation> </message> <message> <location line="+10"/> <source>Could not open audio device. The device is already in use.</source> - <translation type="unfinished"></translation> + <translation>Не удалось открыть звуковое устройство. Устройство уже используется.</translation> </message> <message> <location line="+13"/> <source>Could not decode media source.</source> - <translation type="unfinished"></translation> + <translation>Не удалось декодировать источник медиа-данных.</translation> </message> </context> <context> @@ -136,14 +134,14 @@ have libgstreamer-plugins-base installed.</source> <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+42"/> <location line="+18"/> <source>Volume: %1%</source> - <translation type="unfinished"></translation> + <translation>Громкость: %1%</translation> </message> <message> <location line="-15"/> <location line="+18"/> <location line="+54"/> <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source> - <translation type="unfinished"></translation> + <translation>Используйте ползунок для настройки громкости. Крайняя левая позиция соответствует 0%, самая правая - %1%</translation> </message> </context> <context> @@ -151,7 +149,7 @@ have libgstreamer-plugins-base installed.</source> <message> <location filename="../src/qt3support/other/q3accel.cpp" line="+481"/> <source>%1, %2 not defined</source> - <translation type="unfinished"></translation> + <translation type="unfinished">%1, %2 не определен</translation> </message> <message> <location line="+36"/> @@ -164,52 +162,52 @@ have libgstreamer-plugins-base installed.</source> <message> <location filename="../src/qt3support/sql/q3datatable.cpp" line="+285"/> <source>True</source> - <translation type="unfinished">True</translation> + <translation>Да</translation> </message> <message> <location line="+1"/> <source>False</source> - <translation type="unfinished">False</translation> + <translation>Нет</translation> </message> <message> <location line="+505"/> <source>Insert</source> - <translation type="unfinished">Вставить</translation> + <translation>Вставить</translation> </message> <message> <location line="+1"/> <source>Update</source> - <translation type="unfinished">Обновить</translation> + <translation>Обновить</translation> </message> <message> <location line="+1"/> <source>Delete</source> - <translation type="unfinished">Удалить</translation> + <translation>Удалить</translation> </message> </context> <context> <name>Q3FileDialog</name> <message> - <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+864"/> + <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+865"/> <source>Copy or Move a File</source> - <translation type="unfinished">Копировать или переместить файл</translation> + <translation>Копировать или переместить файл</translation> </message> <message> <location line="+8"/> <source>Read: %1</source> - <translation type="unfinished">Открытие: %1</translation> + <translation>Чтение: %1</translation> </message> <message> <location line="+6"/> <location line="+30"/> <source>Write: %1</source> - <translation type="unfinished">Запись: %1</translation> + <translation>Запись: %1</translation> </message> <message> <location line="-22"/> - <location line="+1575"/> + <location line="+1579"/> <source>Cancel</source> - <translation type="unfinished">Отмена</translation> + <translation>Отмена</translation> </message> <message> <location line="-157"/> @@ -217,307 +215,307 @@ have libgstreamer-plugins-base installed.</source> <location line="+2153"/> <location filename="../src/qt3support/dialogs/q3filedialog_mac.cpp" line="+110"/> <source>All Files (*)</source> - <translation type="unfinished">Все файлы (*)</translation> + <translation>Все файлы (*)</translation> </message> <message> <location line="-2089"/> <source>Name</source> - <translation type="unfinished">Имя</translation> + <translation>Имя</translation> </message> <message> <location line="+1"/> <source>Size</source> - <translation type="unfinished">Размер</translation> + <translation>Размер</translation> </message> <message> <location line="+2"/> <source>Type</source> - <translation type="unfinished">Тип</translation> + <translation>Тип</translation> </message> <message> <location line="+1"/> <source>Date</source> - <translation type="unfinished">Дата</translation> + <translation>Дата</translation> </message> <message> <location line="+1"/> <source>Attributes</source> - <translation type="unfinished">Атрибуты</translation> + <translation>Атрибуты</translation> </message> <message> <location line="+35"/> <location line="+2031"/> <source>&OK</source> - <translation type="unfinished">&OK</translation> + <translation>&Готово</translation> </message> <message> <location line="-1991"/> <source>Look &in:</source> - <translation type="unfinished">&Смотреть в:</translation> + <translation>&Папка:</translation> </message> <message> <location line="+1"/> <location line="+1981"/> <location line="+16"/> <source>File &name:</source> - <translation type="unfinished">&Имя файла:</translation> + <translation>&Имя файла:</translation> </message> <message> <location line="-1996"/> <source>File &type:</source> - <translation type="unfinished">&Тип файла:</translation> + <translation>&Тип файла:</translation> </message> <message> <location line="+7"/> <source>Back</source> - <translation type="unfinished">Назад</translation> + <translation>Назад</translation> </message> <message> <location line="+7"/> <source>One directory up</source> - <translation type="unfinished">Вверх на один уровень</translation> + <translation>На один уровень вверх</translation> </message> <message> <location line="+9"/> <source>Create New Folder</source> - <translation type="unfinished">Создать новый каталог</translation> + <translation>Создать каталог</translation> </message> <message> <location line="+18"/> <source>List View</source> - <translation type="unfinished">Список</translation> + <translation>Список</translation> </message> <message> <location line="+8"/> <source>Detail View</source> - <translation type="unfinished">Детальный вид</translation> + <translation>Подробный вид</translation> </message> <message> <location line="+9"/> <source>Preview File Info</source> - <translation type="unfinished">Предпросмотр информации о файле</translation> + <translation>Предпросмотр информации о файле</translation> </message> <message> <location line="+23"/> <source>Preview File Contents</source> - <translation type="unfinished">Предпросмотр содержимого файла</translation> + <translation>Предпросмотр содержимого файла</translation> </message> <message> <location line="+88"/> <source>Read-write</source> - <translation type="unfinished">Чтение-запись</translation> + <translation>Чтение и запись</translation> </message> <message> <location line="+1"/> <source>Read-only</source> - <translation type="unfinished">Только чтение</translation> + <translation>Только чтение</translation> </message> <message> <location line="+1"/> <source>Write-only</source> - <translation type="unfinished">Только запись</translation> + <translation>Только запись</translation> </message> <message> <location line="+1"/> <source>Inaccessible</source> - <translation type="unfinished">Нет доступа</translation> + <translation>Нет доступа</translation> </message> <message> <location line="+2"/> <source>Symlink to File</source> - <translation type="unfinished">Ссылка на файл</translation> + <translation>Ссылка на файл</translation> </message> <message> <location line="+1"/> <source>Symlink to Directory</source> - <translation type="unfinished">Ссылка на каталог</translation> + <translation>Ссылка на каталог</translation> </message> <message> <location line="+1"/> <source>Symlink to Special</source> - <translation type="unfinished">Ссылка на спецфайл</translation> + <translation>Ссылка на спецфайл</translation> </message> <message> <location line="+1"/> <source>File</source> - <translation type="unfinished">Файл</translation> + <translation>Файл</translation> </message> <message> <location line="+1"/> <source>Dir</source> - <translation type="unfinished">Каталог</translation> + <translation>Каталог</translation> </message> <message> <location line="+1"/> <source>Special</source> - <translation type="unfinished">Спецфайл</translation> + <translation>Спецфайл</translation> </message> <message> <location line="+704"/> <location line="+2100"/> <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+337"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> <message> <location line="-1990"/> <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+84"/> <source>Save As</source> - <translation type="unfinished">Сохранить как</translation> + <translation>Сохранить как</translation> </message> <message> <location line="+642"/> <location line="+5"/> <location line="+355"/> <source>&Open</source> - <translation type="unfinished">&Открыть</translation> + <translation>&Открыть</translation> </message> <message> <location line="-357"/> <location line="+341"/> <source>&Save</source> - <translation type="unfinished">&Сохранить</translation> + <translation>&Сохранить</translation> </message> <message> <location line="-334"/> <source>&Rename</source> - <translation type="unfinished">&Переименовать</translation> + <translation>&Переименовать</translation> </message> <message> <location line="+1"/> <source>&Delete</source> - <translation type="unfinished">&Удалить</translation> + <translation>&Удалить</translation> </message> <message> <location line="+20"/> <source>R&eload</source> - <translation type="unfinished">О&бновить</translation> + <translation>О&бновить</translation> </message> <message> <location line="+4"/> <source>Sort by &Name</source> - <translation type="unfinished">По &имени</translation> + <translation>По &имени</translation> </message> <message> <location line="+2"/> <source>Sort by &Size</source> - <translation type="unfinished">По &размеру</translation> + <translation>По &размеру</translation> </message> <message> <location line="+1"/> <source>Sort by &Date</source> - <translation type="unfinished">По &дате</translation> + <translation>По &дате</translation> </message> <message> <location line="+2"/> <source>&Unsorted</source> - <translation type="unfinished">&Не упорядочивать</translation> + <translation>&Не упорядочивать</translation> </message> <message> <location line="+15"/> <source>Sort</source> - <translation type="unfinished">Упорядочить</translation> + <translation>Упорядочить</translation> </message> <message> <location line="+4"/> <source>Show &hidden files</source> - <translation type="unfinished">Показать &скрытые файлы</translation> + <translation>Показать скр&ытые файлы</translation> </message> <message> <location line="+31"/> <source>the file</source> - <translation type="unfinished">файл</translation> + <translation>файл</translation> </message> <message> <location line="+2"/> <source>the directory</source> - <translation type="unfinished">каталог</translation> + <translation>каталог</translation> </message> <message> <location line="+2"/> <source>the symlink</source> - <translation type="unfinished">ссылку</translation> + <translation>ссылку</translation> </message> <message> <location line="+3"/> <source>Delete %1</source> - <translation type="unfinished">Удалить %1</translation> + <translation>Удалить %1</translation> </message> <message> <location line="+1"/> <source><qt>Are you sure you wish to delete %1 "%2"?</qt></source> - <translation type="unfinished"><qt>Вы действительно хотите удалить %1 "%2"?</qt></translation> + <translation><qt>Вы действительно хотите удалить %1 "%2"?</qt></translation> </message> <message> <location line="+2"/> <source>&Yes</source> - <translation type="unfinished">&Да</translation> + <translation>&Да</translation> </message> <message> <location line="+0"/> <source>&No</source> - <translation type="unfinished">&Нет</translation> + <translation>&Нет</translation> </message> <message> <location line="+36"/> <source>New Folder 1</source> - <translation type="unfinished">Новый каталог 1</translation> + <translation>Новый каталог 1</translation> </message> <message> <location line="+5"/> <source>New Folder</source> - <translation type="unfinished">Новый каталог</translation> + <translation>Новый каталог</translation> </message> <message> <location line="+5"/> <source>New Folder %1</source> - <translation type="unfinished">Новый каталог %1</translation> + <translation>Новый каталог %1</translation> </message> <message> <location line="+98"/> <source>Find Directory</source> - <translation type="unfinished">Найти каталог</translation> + <translation>Найти каталог</translation> </message> <message> <location line="+5"/> <location line="+108"/> <source>Directories</source> - <translation type="unfinished">Каталоги</translation> + <translation>Каталоги</translation> </message> <message> <location line="-2"/> <source>Directory:</source> - <translation type="unfinished">Каталог:</translation> + <translation>каталог:</translation> </message> <message> <location line="+40"/> <location line="+1110"/> <source>Error</source> - <translation type="unfinished">Ошибка</translation> + <translation>Ошибка</translation> </message> <message> <location line="-1109"/> <source>%1 File not found. Check path and filename.</source> - <translation type="unfinished">%1 + <translation>%1 Файл не найден. Проверьте правильность пути и имени файла.</translation> </message> <message> <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="-289"/> <source>All Files (*.*)</source> - <translation type="unfinished">Все файлы (*.*)</translation> + <translation>Все файлы (*.*)</translation> </message> <message> <location line="+375"/> <source>Open </source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть </translation> </message> <message> <location line="+155"/> <source>Select a Directory</source> - <translation type="unfinished">Выбрать каталог</translation> + <translation>Выбрать каталог</translation> </message> </context> <context> @@ -527,21 +525,21 @@ Check path and filename.</source> <location line="+10"/> <source>Could not read directory %1</source> - <translation type="unfinished">Невозможно просмотреть каталог + <translation>Не удалось прочитать каталог %1</translation> </message> <message> <location line="+45"/> <source>Could not create directory %1</source> - <translation type="unfinished">Невозможно создать каталог + <translation>Не удалось создать каталог %1</translation> </message> <message> <location line="+34"/> <source>Could not remove file or directory %1</source> - <translation type="unfinished">Невозможно удалить файл или каталог + <translation>Не удалось удалить файл или каталог %1</translation> </message> <message> @@ -550,7 +548,7 @@ Check path and filename.</source> %1 to %2</source> - <translation type="unfinished">Невозможно переименовать + <translation>Не удалось переименовать %1 в %2</translation> @@ -559,14 +557,14 @@ to <location line="+25"/> <source>Could not open %1</source> - <translation type="unfinished">Невозможно открыть + <translation>Не удалось открыть %1</translation> </message> <message> <location line="+68"/> <source>Could not write %1</source> - <translation type="unfinished">Невозможно записать + <translation>Не удалось записать %1</translation> </message> </context> @@ -575,12 +573,12 @@ to <message> <location filename="../src/qt3support/widgets/q3mainwindow.cpp" line="+2051"/> <source>Line up</source> - <translation type="unfinished">Выровнять</translation> + <translation>Выровнять</translation> </message> <message> <location line="+2"/> <source>Customize...</source> - <translation type="unfinished">Настроить...</translation> + <translation>Настроить...</translation> </message> </context> <context> @@ -588,7 +586,7 @@ to <message> <location filename="../src/qt3support/network/q3networkprotocol.cpp" line="+854"/> <source>Operation stopped by the user</source> - <translation type="unfinished">Операция прервана пользователем</translation> + <translation>Операция прервана пользователем</translation> </message> </context> <context> @@ -597,36 +595,36 @@ to <location filename="../src/qt3support/dialogs/q3progressdialog.cpp" line="+224"/> <location line="+61"/> <source>Cancel</source> - <translation type="unfinished">Отмена</translation> + <translation>Отмена</translation> </message> </context> <context> <name>Q3TabDialog</name> <message> - <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+189"/> - <location line="+814"/> + <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+190"/> + <location line="+824"/> <source>OK</source> - <translation type="unfinished">OK</translation> + <translation>Готово</translation> </message> <message> - <location line="-356"/> + <location line="-366"/> <source>Apply</source> - <translation type="unfinished">Применить</translation> + <translation>Применить</translation> </message> <message> <location line="+43"/> <source>Help</source> - <translation type="unfinished">Справка</translation> + <translation>Справка</translation> </message> <message> <location line="+45"/> <source>Defaults</source> - <translation type="unfinished">По умолчанию</translation> + <translation>По умолчанию</translation> </message> <message> <location line="+50"/> <source>Cancel</source> - <translation type="unfinished">Отмена</translation> + <translation>Отмена</translation> </message> </context> <context> @@ -634,38 +632,38 @@ to <message> <location filename="../src/qt3support/text/q3textedit.cpp" line="+5429"/> <source>&Undo</source> - <translation type="unfinished">&Отменить</translation> + <translation>&Отменить действие</translation> </message> <message> <location line="+1"/> <source>&Redo</source> - <translation type="unfinished">&Повторить</translation> + <translation>&Повторить действие</translation> </message> <message> <location line="+5"/> <source>Cu&t</source> - <translation type="unfinished">&Вырезать</translation> + <translation>&Вырезать</translation> </message> <message> <location line="+1"/> <source>&Copy</source> - <translation type="unfinished">&Копировать</translation> + <translation>&Копировать</translation> </message> <message> <location line="+2"/> <source>&Paste</source> - <translation type="unfinished">&Вставить</translation> + <translation>В&ставить</translation> </message> <message> <location line="+3"/> <source>Clear</source> - <translation type="unfinished">Очистить</translation> + <translation>Очистить</translation> </message> <message> <location line="+4"/> <location line="+2"/> <source>Select All</source> - <translation type="unfinished">Выделить все</translation> + <translation>Выделить все</translation> </message> </context> <context> @@ -673,67 +671,67 @@ to <message> <location filename="../src/plugins/accessible/compat/q3complexwidgets.cpp" line="+246"/> <source>System</source> - <translation type="unfinished"></translation> + <translation>Системное меню</translation> </message> <message> <location line="+3"/> <source>Restore up</source> - <translation type="unfinished"></translation> + <translation>Восстановить</translation> </message> <message> <location line="+1"/> <source>Minimize</source> - <translation type="unfinished">Свернуть</translation> + <translation>Минимизировать</translation> </message> <message> <location line="+3"/> <source>Restore down</source> - <translation type="unfinished"></translation> + <translation>Восстановить</translation> </message> <message> <location line="+1"/> <source>Maximize</source> - <translation type="unfinished">Развернуть</translation> + <translation>Распахнуть</translation> </message> <message> <location line="+2"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> <message> <location line="+18"/> <source>Contains commands to manipulate the window</source> - <translation type="unfinished"></translation> + <translation>Содержит команды управления окном</translation> </message> <message> <location line="+3"/> <source>Puts a minimized back to normal</source> - <translation type="unfinished"></translation> + <translation>Возвращает минимизированное окно в нормальное состояние</translation> </message> <message> <location line="+1"/> <source>Moves the window out of the way</source> - <translation type="unfinished"></translation> + <translation>Сворачивает окно</translation> </message> <message> <location line="+3"/> <source>Puts a maximized window back to normal</source> - <translation type="unfinished"></translation> + <translation>Возвращает распахнутое окно в нормальное состояние</translation> </message> <message> <location line="+1"/> <source>Makes the window full screen</source> - <translation type="unfinished"></translation> + <translation>Разворачивает окно на весь экран</translation> </message> <message> <location line="+2"/> <source>Closes the window</source> - <translation type="unfinished"></translation> + <translation>Зыкрывает окно</translation> </message> <message> <location line="+2"/> <source>Displays the name of the window and contains controls to manipulate it</source> - <translation type="unfinished"></translation> + <translation>Отображает название окна и содержит команды управления им</translation> </message> </context> <context> @@ -741,7 +739,7 @@ to <message> <location filename="../src/qt3support/widgets/q3toolbar.cpp" line="+692"/> <source>More...</source> - <translation type="unfinished">Больше...</translation> + <translation>Больше...</translation> </message> </context> <context> @@ -751,49 +749,49 @@ to <location line="+260"/> <location line="+4"/> <source>The protocol `%1' is not supported</source> - <translation type="unfinished">Протокол `%1' не поддерживается</translation> + <translation>Протокол `%1' не поддерживается</translation> </message> <message> <location line="-260"/> <source>The protocol `%1' does not support listing directories</source> - <translation type="unfinished">Протокол `%1' не поддерживает просмотр каталогов</translation> + <translation>Протокол `%1' не поддерживает просмотр каталогов</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support creating new directories</source> - <translation type="unfinished">Протокол `%1' не поддерживает создание новых каталогов</translation> + <translation>Протокол `%1' не поддерживает создание каталогов</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support removing files or directories</source> - <translation type="unfinished">Протокол `%1' не поддерживает удаление файлов или каталогов</translation> + <translation>Протокол `%1' не поддерживает удаление файлов или каталогов</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support renaming files or directories</source> - <translation type="unfinished">Протокол `%1' не поддерживает переименование файлов или каталогов</translation> + <translation>Протокол `%1' не поддерживает переименование файлов или каталогов</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support getting files</source> - <translation type="unfinished">Протокол `%1' не поддерживает доставку файлов</translation> + <translation>Протокол `%1' не поддерживает доставку файлов</translation> </message> <message> <location line="+3"/> <source>The protocol `%1' does not support putting files</source> - <translation type="unfinished">Протокол `%1' не поддерживает отправку файлов</translation> + <translation>Протокол `%1' не поддерживает отправку файлов</translation> </message> <message> <location line="+243"/> <location line="+4"/> <source>The protocol `%1' does not support copying or moving files or directories</source> - <translation type="unfinished">Протокол `%1' не поддерживает копирование или перемещение файлов и каталогов</translation> + <translation>Протокол `%1' не поддерживает копирование или перемещение файлов или каталогов</translation> </message> <message> <location line="+237"/> <location line="+1"/> <source>(unknown)</source> - <translation type="unfinished">(неизвестно)</translation> + <translation>(неизвестно)</translation> </message> </context> <context> @@ -801,27 +799,27 @@ to <message> <location filename="../src/qt3support/dialogs/q3wizard.cpp" line="+177"/> <source>&Cancel</source> - <translation type="unfinished">&Отмена</translation> + <translation>&Отмена</translation> </message> <message> <location line="+1"/> <source>< &Back</source> - <translation type="unfinished">< &Назад</translation> + <translation>< &Назад</translation> </message> <message> <location line="+1"/> <source>&Next ></source> - <translation type="unfinished">&Вперед ></translation> + <translation>&Вперед ></translation> </message> <message> <location line="+1"/> <source>&Finish</source> - <translation type="unfinished">&Финиш</translation> + <translation>&Закончить</translation> </message> <message> <location line="+1"/> <source>&Help</source> - <translation type="unfinished">&Справка</translation> + <translation>&Справка</translation> </message> </context> <context> @@ -832,68 +830,67 @@ to <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+657"/> <location line="+26"/> <source>Host not found</source> - <translation type="unfinished"></translation> + <translation>Узел не найден</translation> </message> <message> <location line="+50"/> <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+3"/> <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+4"/> <source>Connection refused</source> - <translation type="unfinished">Отказано в соединении</translation> + <translation>Отказано в соединении</translation> </message> <message> <location line="+141"/> <source>Connection timed out</source> - <translation type="unfinished"></translation> + <translation>Время на соединение истекло</translation> </message> <message> <location line="-547"/> <location line="+787"/> <location line="+208"/> <source>Operation on socket is not supported</source> - <translation type="unfinished"></translation> + <translation>Операция с сокетом не поддерживается</translation> </message> <message> <location line="+137"/> <source>Socket operation timed out</source> - <translation type="unfinished"></translation> + <translation>Время на операцию с сокетом истекло</translation> </message> <message> <location line="+380"/> <source>Socket is not connected</source> - <translation type="unfinished"></translation> + <translation>Сокет не подключён</translation> </message> <message> <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-8"/> <source>Network unreachable</source> - <translation type="unfinished"></translation> + <translation>Сеть недоступна</translation> </message> </context> <context> <name>QAbstractSpinBox</name> <message> - <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1199"/> + <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1200"/> <source>&Step up</source> - <translation type="unfinished"></translation> + <translation>Шаг вв&ерх</translation> </message> <message> <location line="+2"/> <source>Step &down</source> - <translation type="unfinished"></translation> + <translation>Шаг вн&из</translation> </message> <message> <location line="-8"/> <source>&Select All</source> - <translation type="unfinished"></translation> + <translation>&Выделить все</translation> </message> </context> <context> <name>QApplication</name> <message> - <location filename="../src/gui/kernel/qapplication.cpp" line="+2248"/> - <source>QT_LAYOUT_DIRECTION</source> - <comment>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.</comment> - <translation>LTR</translation> + <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+376"/> + <source>Activate</source> + <translation>Активировать</translation> </message> <message> <location filename="../src/gui/dialogs/qmessagebox.h" line="+352"/> @@ -906,37 +903,38 @@ to <translation>Ошибка совместимости библиотеки Qt</translation> </message> <message> - <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+376"/> - <source>Activate</source> - <translation type="unfinished"></translation> + <location filename="../src/gui/kernel/qapplication.cpp" line="+2244"/> + <source>QT_LAYOUT_DIRECTION</source> + <comment>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.</comment> + <translation>LTR</translation> </message> <message> - <location line="+2"/> + <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+2"/> <source>Activates the program's main window</source> - <translation type="unfinished"></translation> + <translation>Активирует главное окно программы</translation> </message> </context> <context> <name>QAxSelect</name> <message> - <location filename="../src/activeqt/container/qaxselect.ui"/> + <location filename="../src/activeqt/container/qaxselect.ui" line="+54"/> <source>Select ActiveX Control</source> - <translation type="unfinished"></translation> + <translation>Выберите компоненту ActiveX</translation> </message> <message> - <location/> + <location line="+32"/> <source>OK</source> - <translation type="unfinished">OK</translation> + <translation>Готово</translation> </message> <message> - <location/> + <location line="+16"/> <source>&Cancel</source> - <translation type="unfinished">&Отмена</translation> + <translation>&Отмена</translation> </message> <message> - <location/> + <location line="+49"/> <source>COM &Object:</source> - <translation type="unfinished"></translation> + <translation>COM &Объект:</translation> </message> </context> <context> @@ -944,17 +942,17 @@ to <message> <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+114"/> <source>Uncheck</source> - <translation type="unfinished"></translation> + <translation>Снять отметку</translation> </message> <message> <location line="+3"/> <source>Check</source> - <translation type="unfinished"></translation> + <translation>Отметить</translation> </message> <message> <location line="+1"/> <source>Toggle</source> - <translation type="unfinished"></translation> + <translation>Переключить</translation> </message> </context> <context> @@ -977,17 +975,17 @@ to <message> <location line="+1"/> <source>&Red:</source> - <translation>&Крас:</translation> + <translation>&Красный:</translation> </message> <message> <location line="+1"/> <source>&Green:</source> - <translation>&Зел:</translation> + <translation>&Зелёный:</translation> </message> <message> <location line="+1"/> <source>Bl&ue:</source> - <translation>С&ин:</translation> + <translation>С&иний:</translation> </message> <message> <location line="+1"/> @@ -997,7 +995,7 @@ to <message> <location line="+101"/> <source>Select Color</source> - <translation type="unfinished"></translation> + <translation>Выберите цвет</translation> </message> <message> <location line="+137"/> @@ -1007,28 +1005,12 @@ to <message> <location line="+1"/> <source>&Custom colors</source> - <translation>&Собственные цвета</translation> - </message> - <message> - <source>&Define Custom Colors >></source> - <translation type="obsolete">&Выбрать собственные цвета >></translation> - </message> - <message> - <source>OK</source> - <translation type="obsolete">OK</translation> - </message> - <message> - <source>Cancel</source> - <translation type="obsolete">Отмена</translation> + <translation>&Произвольные цвета</translation> </message> <message> <location line="+1"/> <source>&Add to Custom Colors</source> - <translation>&Добавить к собственным цветам</translation> - </message> - <message> - <source>Select color</source> - <translation type="obsolete">Выбрать цвет</translation> + <translation>&Добавить к произвольным цветам</translation> </message> </context> <context> @@ -1037,22 +1019,22 @@ to <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+1771"/> <location line="+65"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> <message> <location filename="../src/gui/itemviews/qitemeditorfactory.cpp" line="+544"/> <source>False</source> - <translation type="unfinished">False</translation> + <translation>Нет</translation> </message> <message> <location line="+1"/> <source>True</source> - <translation type="unfinished">True</translation> + <translation>Да</translation> </message> <message> <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+0"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> </context> <context> @@ -1061,19 +1043,19 @@ to <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="+119"/> <source>%1: key is empty</source> <comment>QSystemSemaphore</comment> - <translation type="unfinished"></translation> + <translation>%1: пустой ключ</translation> </message> <message> <location line="+12"/> <source>%1: unable to make key</source> <comment>QSystemSemaphore</comment> - <translation type="unfinished"></translation> + <translation>%1: невозможно создать ключ</translation> </message> <message> <location line="+9"/> <source>%1: ftok failed</source> <comment>QSystemSemaphore</comment> - <translation type="unfinished"></translation> + <translation>%1: ошибка ftok</translation> </message> </context> <context> @@ -1081,22 +1063,22 @@ to <message> <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+1276"/> <source>Unable to connect</source> - <translation type="unfinished"></translation> + <translation>Невозможно соединиться</translation> </message> <message> <location line="+303"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> <message> <location line="+15"/> <source>Unable to set autocommit</source> - <translation type="unfinished"></translation> + <translation>Невозможно установить автовыполнение транзакции</translation> </message> </context> <context> @@ -1105,32 +1087,32 @@ to <location line="-1043"/> <location line="+243"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> <message> <location line="-206"/> <source>Unable to prepare statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно подготовить выражение</translation> </message> <message> <location line="+196"/> <source>Unable to bind variable</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать значение</translation> </message> <message> <location line="+92"/> <source>Unable to fetch record %1</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить запись %1</translation> </message> <message> <location line="+17"/> <source>Unable to fetch next</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить следующую строку</translation> </message> <message> <location line="+20"/> <source>Unable to fetch first</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить первую строку</translation> </message> </context> <context> @@ -1184,162 +1166,162 @@ to <message> <location line="-115"/> <source>Done</source> - <translation type="unfinished"></translation> + <translation>Готово</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1866"/> + <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1861"/> <location line="+464"/> <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+561"/> <source>OK</source> - <translation type="unfinished">OK</translation> + <translation>Готово</translation> </message> <message> - <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+3"/> - <source>Save</source> - <translation type="unfinished">Сохранить</translation> + <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+0"/> + <source>&OK</source> + <translation>&Готово</translation> </message> <message> - <location line="+0"/> + <location line="+3"/> <source>&Save</source> - <translation type="unfinished">&Сохранить</translation> + <translation>&Сохранить</translation> + </message> + <message> + <location line="+0"/> + <source>Save</source> + <translation>Сохранить</translation> </message> <message> <location line="+3"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> <message> <location line="+3"/> - <source>Cancel</source> - <translation type="unfinished">Отмена</translation> + <source>&Cancel</source> + <translation>&Отмена</translation> </message> <message> <location line="+0"/> - <source>&Cancel</source> - <translation type="unfinished">&Отмена</translation> + <source>Cancel</source> + <translation>Отмена</translation> </message> <message> <location line="+3"/> - <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <source>&Close</source> + <translation>&Закрыть</translation> </message> <message> <location line="+0"/> - <source>&Close</source> - <translation type="unfinished">&Закрыть</translation> + <source>Close</source> + <translation>Закрыть</translation> </message> <message> <location line="+3"/> <source>Apply</source> - <translation type="unfinished">Применить</translation> + <translation>Применить</translation> </message> <message> <location line="+3"/> <source>Reset</source> - <translation type="unfinished"></translation> + <translation>Сбросить</translation> </message> <message> <location line="+3"/> <source>Help</source> - <translation type="unfinished">Справка</translation> + <translation>Справка</translation> </message> <message> <location line="+4"/> <source>Don't Save</source> - <translation type="unfinished"></translation> + <translation>Не сохранять</translation> </message> <message> <location line="+4"/> <source>Discard</source> - <translation type="unfinished"></translation> + <translation>Не применять</translation> </message> <message> <location line="+3"/> <source>&Yes</source> - <translation type="unfinished">&Да</translation> + <translation>Д&а</translation> </message> <message> <location line="+3"/> <source>Yes to &All</source> - <translation type="unfinished"></translation> + <translation>Да для &всех</translation> </message> <message> <location line="+3"/> <source>&No</source> - <translation type="unfinished">&Нет</translation> + <translation>&Нет</translation> </message> <message> <location line="+3"/> <source>N&o to All</source> - <translation type="unfinished"></translation> + <translation>Н&ет для всех</translation> </message> <message> <location line="+3"/> <source>Save All</source> - <translation type="unfinished"></translation> + <translation>Сохранить все</translation> </message> <message> <location line="+3"/> <source>Abort</source> - <translation type="unfinished"></translation> + <translation>Прервать</translation> </message> <message> <location line="+3"/> <source>Retry</source> - <translation type="unfinished"></translation> + <translation>Попробовать ещё</translation> </message> <message> <location line="+3"/> <source>Ignore</source> - <translation type="unfinished"></translation> + <translation>Игнорировать</translation> </message> <message> <location line="+3"/> <source>Restore Defaults</source> - <translation type="unfinished"></translation> + <translation>Восстановить значения по умолчанию</translation> </message> <message> <location line="-29"/> <source>Close without Saving</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="-27"/> - <source>&OK</source> - <translation type="unfinished">&OK</translation> + <translation>Закрыть без сохранения</translation> </message> </context> <context> <name>QDirModel</name> <message> - <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+453"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+454"/> <source>Name</source> - <translation type="unfinished">Имя</translation> + <translation>Имя</translation> </message> <message> <location line="+1"/> <source>Size</source> - <translation type="unfinished">Размер</translation> + <translation>Размер</translation> </message> <message> <location line="+3"/> <source>Kind</source> <comment>Match OS X Finder</comment> - <translation type="unfinished"></translation> + <translation>Вид</translation> </message> <message> <location line="+2"/> <source>Type</source> <comment>All other platforms</comment> - <translation type="unfinished">Тип</translation> + <translation>Тип</translation> </message> <message> <location line="+6"/> <source>Date Modified</source> - <translation type="unfinished"></translation> + <translation>Дата изменения</translation> </message> </context> <context> @@ -1347,7 +1329,7 @@ to <message> <location filename="../src/plugins/accessible/widgets/qaccessiblewidgets.cpp" line="+1239"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> <message> <location line="+2"/> @@ -1365,28 +1347,18 @@ to <message> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-537"/> <source>More</source> - <translation type="unfinished"></translation> + <translation>Больше</translation> </message> <message> <location line="+2"/> <source>Less</source> - <translation type="unfinished"></translation> + <translation>Меньше</translation> </message> </context> <context> <name>QErrorMessage</name> <message> - <location filename="../src/gui/dialogs/qerrormessage.cpp" line="+391"/> - <source>&Show this message again</source> - <translation>&Показывать это сообщение в дальнейшем</translation> - </message> - <message> - <location line="+1"/> - <source>&OK</source> - <translation>&OK</translation> - </message> - <message> - <location line="-200"/> + <location filename="../src/gui/dialogs/qerrormessage.cpp" line="+192"/> <source>Debug Message:</source> <translation>Отладочное сообщение:</translation> </message> @@ -1400,326 +1372,376 @@ to <source>Fatal Error:</source> <translation>Критическая ошибка:</translation> </message> + <message> + <location line="+193"/> + <source>&Show this message again</source> + <translation>&Показывать это сообщение в дальнейшем</translation> + </message> + <message> + <location line="+1"/> + <source>&OK</source> + <translation>&Готово</translation> + </message> </context> <context> <name>QFile</name> <message> <location filename="../src/corelib/io/qfile.cpp" line="+708"/> - <location line="+141"/> + <location line="+151"/> <source>Destination file exists</source> - <translation type="unfinished"></translation> + <translation>Файл существует</translation> + </message> + <message> + <location line="-136"/> + <source>Will not rename sequential file using block copy</source> + <translation>Не будет переименовывать последовательный файл, используя копирование блока</translation> </message> <message> - <location line="-108"/> + <location line="+23"/> <source>Cannot remove source file</source> - <translation type="unfinished"></translation> + <translation>Невозможно удалить исходный файл</translation> </message> <message> - <location line="+120"/> + <location line="+126"/> <source>Cannot open %1 for input</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть %1 для ввода</translation> </message> <message> <location line="+17"/> <source>Cannot open for output</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть для вывода</translation> </message> <message> <location line="+10"/> <source>Failure to write block</source> - <translation type="unfinished"></translation> + <translation>Сбой записи блока</translation> </message> <message> <location line="+13"/> <source>Cannot create %1 for output</source> - <translation type="unfinished"></translation> + <translation>Невозможно создать %1 для вывода</translation> </message> </context> <context> <name>QFileDialog</name> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+515"/> - <location line="+444"/> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+514"/> + <location line="+447"/> <source>All Files (*)</source> <translation>Все файлы (*)</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.ui"/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> - <source>Back</source> - <translation type="unfinished">Назад</translation> - </message> - <message> - <location/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> - <source>List View</source> - <translation type="unfinished">Список</translation> - </message> - <message> - <location/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> - <source>Detail View</source> - <translation type="unfinished">Детальный вид</translation> - </message> - <message> - <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+414"/> - <location line="+1"/> - <source>File</source> - <translation type="unfinished">Файл</translation> - </message> - <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-461"/> - <source>Open</source> - <translation>Открыть</translation> - </message> - <message> - <location line="+2"/> - <source>Save As</source> - <translation type="unfinished">Сохранить как</translation> + <location line="+222"/> + <source>Directories</source> + <translation>Каталоги</translation> </message> <message> - <location line="+678"/> + <location line="-3"/> <location line="+50"/> - <location line="+1471"/> + <location line="+1467"/> <location line="+75"/> <source>&Open</source> <translation>&Открыть</translation> </message> <message> - <location line="-1596"/> + <location line="-1592"/> <location line="+50"/> <source>&Save</source> <translation>&Сохранить</translation> </message> <message> - <location line="+1822"/> - <source>Recent Places</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="-2521"/> - <source>&Rename</source> - <translation type="unfinished">&Переименовать</translation> + <location line="-733"/> + <source>Open</source> + <translation>Открыть</translation> </message> <message> - <location line="+1"/> - <source>&Delete</source> - <translation type="unfinished">&Удалить</translation> + <location line="+1515"/> + <source>%1 already exists. +Do you want to replace it?</source> + <translation>%1 уже существует. +Хотите заменить его?</translation> </message> <message> - <location line="+1"/> - <source>Show &hidden files</source> - <translation type="unfinished">Показать &скрытые файлы</translation> + <location line="+20"/> + <source>%1 +File not found. +Please verify the correct file name was given.</source> + <translation>%1 +Файл не найден. +Проверьте правильность заданного имени файла.</translation> </message> <message> - <location line="+1964"/> - <source>New Folder</source> - <translation type="unfinished">Новый каталог</translation> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+402"/> + <source>My Computer</source> + <translation>Мой компьютер</translation> </message> <message> - <location line="-1999"/> - <source>Find Directory</source> - <translation type="unfinished">Найти каталог</translation> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-1504"/> + <source>&Rename</source> + <translation>&Переименовать</translation> </message> <message> - <location line="+685"/> - <source>Directories</source> - <translation>Каталоги</translation> + <location line="+1"/> + <source>&Delete</source> + <translation>&Удалить</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+160"/> - <source>All Files (*.*)</source> - <translation type="unfinished">Все файлы (*.*)</translation> + <location line="+1"/> + <source>Show &hidden files</source> + <translation>Показать скр&ытые файлы</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-644"/> - <location line="+648"/> - <source>Directory:</source> - <translation type="unfinished">Каталог:</translation> + <location filename="../src/gui/dialogs/qfiledialog.ui" line="+84"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+73"/> + <source>Back</source> + <translation>Назад</translation> </message> <message> - <location line="+828"/> - <source>%1 already exists. -Do you want to replace it?</source> - <translation type="unfinished"></translation> + <location line="+14"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+14"/> + <source>Parent Directory</source> + <translation>Родительский каталог</translation> </message> <message> - <location line="+20"/> - <source>%1 -File not found. -Please verify the correct file name was given.</source> - <translation type="unfinished"></translation> + <location line="+14"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+14"/> + <source>List View</source> + <translation>Список</translation> </message> <message> - <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+402"/> - <source>My Computer</source> - <translation type="unfinished"></translation> + <location line="+7"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+7"/> + <source>Detail View</source> + <translation>Подробный вид</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.ui"/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> - <source>Parent Directory</source> - <translation type="unfinished"></translation> + <location line="+141"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+162"/> + <source>Files of type:</source> + <translation>Типы файлов:</translation> </message> <message> - <location/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> - <source>Files of type:</source> - <translation type="unfinished"></translation> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+6"/> + <location line="+651"/> + <source>Directory:</source> + <translation>Каталог:</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-54"/> - <location line="+862"/> + <location line="+791"/> + <location line="+861"/> <source>%1 Directory not found. Please verify the correct directory name was given.</source> - <translation type="unfinished"></translation> + <translation>%1 +Каталог не найден. +Проверьте правильность заданного имени каталога.</translation> </message> <message> <location line="-218"/> <source>'%1' is write protected. Do you want to delete it anyway?</source> - <translation type="unfinished"></translation> + <translation>'%1' защищён от записи. +Всё-равно хотите удалить?</translation> </message> <message> <location line="+5"/> <source>Are sure you want to delete '%1'?</source> - <translation type="unfinished"></translation> + <translation>Вы уверены, что хотите удалить '%1'?</translation> </message> <message> <location line="+15"/> <source>Could not delete directory.</source> - <translation type="unfinished"></translation> + <translation>Не удалось удалить каталог.</translation> + </message> + <message> + <location line="+407"/> + <source>Recent Places</source> + <translation>Недавние документы</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+160"/> + <source>All Files (*.*)</source> + <translation>Все файлы (*.*)</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2549"/> + <source>Save As</source> + <translation>Сохранить как</translation> </message> <message> - <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="-4"/> + <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+411"/> <source>Drive</source> - <translation type="unfinished"></translation> + <translation>Диск</translation> </message> <message> - <location line="+33"/> + <location line="+3"/> + <location line="+1"/> + <source>File</source> + <translation>Файл</translation> + </message> + <message> + <location line="+5"/> + <source>File Folder</source> + <comment>Match Windows Explorer</comment> + <translation>Каталог с файлами</translation> + </message> + <message> + <location line="+2"/> + <source>Folder</source> + <comment>All other platforms</comment> + <translation>Каталог</translation> + </message> + <message> + <location line="+9"/> + <source>Alias</source> + <comment>Mac OS X Finder</comment> + <translation>Псевдоним</translation> + </message> + <message> + <location line="+2"/> + <source>Shortcut</source> + <comment>All other platforms</comment> + <translation>Ярлык</translation> + </message> + <message> + <location line="+7"/> <source>Unknown</source> - <translation type="unfinished"></translation> + <translation>Неизвестно</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-4"/> + <source>Find Directory</source> + <translation>Найти каталог</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2118"/> + <location line="+29"/> <source>Show </source> - <translation type="unfinished"></translation> + <translation>Показать </translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.ui"/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <location filename="../src/gui/dialogs/qfiledialog.ui" line="-169"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="-190"/> <source>Forward</source> - <translation type="unfinished">Вперед</translation> + <translation>Вперед</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+1969"/> + <source>New Folder</source> + <translation>Новый каталог</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+7"/> + <location line="-1962"/> <source>&New Folder</source> - <translation type="unfinished"></translation> + <translation>&Новый каталог</translation> </message> <message> - <location line="+656"/> + <location line="+659"/> <location line="+38"/> <source>&Choose</source> - <translation type="unfinished"></translation> + <translation>&Выбрать</translation> </message> <message> - <location filename="../src/gui/dialogs/qsidebar.cpp" line="+418"/> + <location filename="../src/gui/dialogs/qsidebar.cpp" line="+437"/> <source>Remove</source> - <translation type="unfinished"></translation> + <translation>Удалить</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-687"/> - <location line="+652"/> + <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-690"/> + <location line="+655"/> <source>File &name:</source> - <translation type="unfinished">&Имя файла:</translation> + <translation>&Имя файла:</translation> </message> <message> - <location filename="../src/gui/dialogs/qfiledialog.ui"/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <location filename="../src/gui/dialogs/qfiledialog.ui" line="-32"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="+212"/> <source>Look in:</source> - <translation type="unfinished"></translation> + <translation>Перейти к:</translation> </message> <message> - <location/> - <location filename="../src/gui/dialogs/qfiledialog_wince.ui"/> + <location line="+46"/> + <location filename="../src/gui/dialogs/qfiledialog_wince.ui" line="-198"/> <source>Create New Folder</source> - <translation type="unfinished">Создать новый каталог</translation> + <translation>Создать каталог</translation> </message> </context> <context> <name>QFileSystemModel</name> <message> - <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+744"/> - <source>%1 TB</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+2"/> - <source>%1 GB</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+2"/> - <source>%1 MB</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+2"/> - <source>%1 KB</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+1"/> - <source>%1 bytes</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+77"/> + <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+828"/> <source>Invalid filename</source> - <translation type="unfinished"></translation> + <translation>Некорректное имя файла</translation> </message> <message> <location line="+1"/> <source><b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.</source> - <translation type="unfinished"></translation> + <translation><b>Имя "%1" не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации.</translation> </message> <message> <location line="+63"/> <source>Name</source> - <translation type="unfinished">Имя</translation> + <translation>Имя</translation> </message> <message> <location line="+2"/> <source>Size</source> - <translation type="unfinished">Размер</translation> + <translation>Размер</translation> </message> <message> <location line="+4"/> <source>Kind</source> <comment>Match OS X Finder</comment> - <translation type="unfinished"></translation> + <translation>Вид</translation> </message> <message> <location line="+2"/> <source>Type</source> <comment>All other platforms</comment> - <translation type="unfinished">Тип</translation> + <translation>Тип</translation> </message> <message> <location line="+7"/> <source>Date Modified</source> - <translation type="unfinished"></translation> + <translation>Дата изменения</translation> </message> <message> - <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+234"/> + <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+248"/> <source>My Computer</source> - <translation type="unfinished"></translation> + <translation>Мой компьютер</translation> </message> <message> <location line="+2"/> <source>Computer</source> - <translation type="unfinished"></translation> + <translation>Компьютер</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="-163"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+471"/> + <source>%1 TB</source> + <translation>%1 Тб</translation> + </message> + <message> + <location line="+2"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/> + <source>%1 GB</source> + <translation>%1 Гб</translation> + </message> + <message> + <location line="+2"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/> + <source>%1 MB</source> + <translation>%1 Мб</translation> + </message> + <message> + <location line="+2"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/> + <source>%1 KB</source> + <translation>%1 Кб</translation> + </message> + <message> + <location line="+1"/> + <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+1"/> + <source>%1 bytes</source> + <translation>%1 байт</translation> </message> </context> <context> @@ -1728,70 +1750,70 @@ Do you want to delete it anyway?</source> <location filename="../src/gui/text/qfontdatabase.cpp" line="+90"/> <location line="+1176"/> <source>Normal</source> - <translation type="unfinished"></translation> + <translation>Обычный</translation> </message> <message> <location line="-1173"/> <location line="+12"/> <location line="+1149"/> <source>Bold</source> - <translation type="unfinished"></translation> + <translation>Жирный</translation> </message> <message> <location line="-1158"/> <location line="+1160"/> <source>Demi Bold</source> - <translation type="unfinished"></translation> + <translation>Срендней жирности</translation> </message> <message> <location line="-1157"/> <location line="+18"/> <location line="+1135"/> <source>Black</source> - <translation type="unfinished"></translation> + <translation>Чёрный</translation> </message> <message> <location line="-1145"/> <source>Demi</source> - <translation type="unfinished"></translation> + <translation>Средний</translation> </message> <message> <location line="+6"/> <location line="+1145"/> <source>Light</source> - <translation type="unfinished"></translation> + <translation>Лёгкий</translation> </message> <message> <location line="-1004"/> <location line="+1007"/> <source>Italic</source> - <translation type="unfinished"></translation> + <translation>Курсив</translation> </message> <message> <location line="-1004"/> <location line="+1006"/> <source>Oblique</source> - <translation type="unfinished"></translation> + <translation>Наклонный</translation> </message> <message> <location line="+705"/> <source>Any</source> - <translation type="unfinished"></translation> + <translation>Любая</translation> </message> <message> <location line="+3"/> <source>Latin</source> - <translation type="unfinished"></translation> + <translation>Латиница</translation> </message> <message> <location line="+3"/> <source>Greek</source> - <translation type="unfinished"></translation> + <translation>Греческий</translation> </message> <message> <location line="+3"/> <source>Cyrillic</source> - <translation type="unfinished"></translation> + <translation>Кириллица</translation> </message> <message> <location line="+3"/> @@ -1949,7 +1971,7 @@ Do you want to delete it anyway?</source> <message> <location line="+1"/> <source>Font st&yle</source> - <translation>&Стиль шрифта</translation> + <translation>Ст&иль шрифта</translation> </message> <message> <location line="+1"/> @@ -1964,12 +1986,12 @@ Do you want to delete it anyway?</source> <message> <location line="+1"/> <source>Stri&keout</source> - <translation>&Перечеркивать</translation> + <translation>Зачёр&кнутый</translation> </message> <message> <location line="+1"/> <source>&Underline</source> - <translation>П&одчеркивать</translation> + <translation>П&одчёркнутый</translation> </message> <message> <location line="+1"/> @@ -1977,74 +1999,59 @@ Do you want to delete it anyway?</source> <translation>Пример</translation> </message> <message> - <location line="-603"/> - <location line="+247"/> - <source>Select Font</source> - <translation>Выбрать шрифт</translation> + <location line="+1"/> + <source>Wr&iting System</source> + <translation>&Система письма</translation> </message> <message> - <location line="+357"/> - <source>Wr&iting System</source> - <translation type="unfinished"></translation> + <location line="-604"/> + <location line="+247"/> + <source>Select Font</source> + <translation>Выберите шрифт</translation> </message> </context> <context> <name>QFtp</name> <message> - <location filename="../src/qt3support/network/q3ftp.cpp" line="+2303"/> - <source>Host %1 found</source> - <translation type="unfinished">Обнаружен узел %1</translation> - </message> - <message> - <location line="+7"/> - <source>Host found</source> - <translation type="unfinished">Узел обнаружен</translation> - </message> - <message> - <location filename="../src/network/access/qftp.cpp" line="+1003"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="-1456"/> - <location line="+1451"/> - <source>Connected to host %1</source> - <translation>Установлено соединение с узлом %1</translation> - </message> - <message> - <location filename="../src/qt3support/network/q3ftp.cpp" line="+7"/> - <source>Connected to host</source> - <translation type="unfinished">Соединение с узлом установлено</translation> - </message> - <message> - <location line="-5"/> - <source>Connection to %1 closed</source> - <translation type="unfinished">Соединение с узлом %1 разорвано</translation> - </message> - <message> - <location filename="../src/network/access/qftp.cpp" line="+1375"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="-243"/> - <location line="+250"/> - <source>Connection closed</source> - <translation>Соединение разорвано</translation> + <location filename="../src/network/access/qftp.cpp" line="+826"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+683"/> + <source>Not connected</source> + <translation>Соединение не установлено</translation> </message> <message> - <location line="-1487"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="-1566"/> + <location line="+65"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+65"/> <source>Host %1 not found</source> - <translation>Узел %1 не обнаружен</translation> + <translation>Узел %1 не найден</translation> </message> <message> <location line="+4"/> <location filename="../src/qt3support/network/q3ftp.cpp" line="+4"/> <source>Connection refused to host %1</source> - <translation>Отказано в соединении с узлом %1</translation> + <translation>В соединении с узлом %1 отказано</translation> </message> <message> <location line="+4"/> <source>Connection timed out to host %1</source> - <translation type="unfinished"></translation> + <translation>Время на соединение с узлом %1 истекло</translation> </message> <message> - <location line="+501"/> + <location line="+104"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+102"/> + <location line="+1451"/> + <source>Connected to host %1</source> + <translation>Установлено соединение с узлом %1</translation> + </message> + <message> + <location line="+219"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="-1290"/> + <source>Connection refused for data connection</source> + <translation>Отказ в соединении для передачи данных</translation> + </message> + <message> + <location line="+178"/> <location line="+29"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="+458"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+195"/> <location line="+728"/> <source>Unknown error</source> <translation>Неизвестная ошибка</translation> @@ -2054,7 +2061,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+77"/> <source>Connecting to host failed: %1</source> - <translation>Ошибка соединения с узлом: + <translation>Не удалось соединиться с узлом: %1</translation> </message> <message> @@ -2062,7 +2069,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Login failed: %1</source> - <translation>Ошибка входа в систему: + <translation>Не удалось авторизоваться: %1</translation> </message> <message> @@ -2070,7 +2077,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Listing directory failed: %1</source> - <translation>Ошибка просмотра каталога: + <translation>Не удалось прочитать каталог: %1</translation> </message> <message> @@ -2078,7 +2085,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Changing directory failed: %1</source> - <translation>Ошибка смены каталога: + <translation>Не удалось сменить каталог: %1</translation> </message> <message> @@ -2086,7 +2093,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Downloading file failed: %1</source> - <translation>Ошибка загрузки файла: + <translation>Не удалось загрузить файл: %1</translation> </message> <message> @@ -2094,7 +2101,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Uploading file failed: %1</source> - <translation>Ошибка отправки файла: + <translation>Не удалось отгрузить файл: %1</translation> </message> <message> @@ -2102,7 +2109,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Removing file failed: %1</source> - <translation>Ошибка удаления файла: + <translation>Не удалось удалить файл: %1</translation> </message> <message> @@ -2110,7 +2117,7 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Creating directory failed: %1</source> - <translation>Ошибка создания каталога: + <translation>Не удалось создать каталог: %1</translation> </message> <message> @@ -2118,20 +2125,35 @@ Do you want to delete it anyway?</source> <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/> <source>Removing directory failed: %1</source> - <translation>Ошибка удаления каталога: + <translation>Не удалось удалить каталог: %1</translation> </message> <message> - <location line="-1524"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="-1356"/> - <source>Not connected</source> - <translation>Нет соединения</translation> + <location line="+28"/> + <location filename="../src/qt3support/network/q3ftp.cpp" line="+25"/> + <location line="+250"/> + <source>Connection closed</source> + <translation>Соединение закрыто</translation> </message> <message> - <location line="+396"/> - <location filename="../src/qt3support/network/q3ftp.cpp" line="+332"/> - <source>Connection refused for data connection</source> - <translation>Отказано в соединении передачи данных</translation> + <location filename="../src/qt3support/network/q3ftp.cpp" line="-11"/> + <source>Host %1 found</source> + <translation>Узел %1 найден</translation> + </message> + <message> + <location line="+4"/> + <source>Connection to %1 closed</source> + <translation>Соединение с %1 закрыто</translation> + </message> + <message> + <location line="+3"/> + <source>Host found</source> + <translation>Узел найден</translation> + </message> + <message> + <location line="+2"/> + <source>Connected to host</source> + <translation>Соединение с узлом</translation> </message> </context> <context> @@ -2139,7 +2161,7 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/network/kernel/qhostinfo_p.h" line="+183"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> </context> <context> @@ -2149,12 +2171,12 @@ Do you want to delete it anyway?</source> <location line="+9"/> <location line="+64"/> <location line="+31"/> - <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+180"/> + <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+165"/> <location line="+9"/> <location line="+40"/> <location line="+27"/> <source>Host not found</source> - <translation type="unfinished"></translation> + <translation>Узел не найден</translation> </message> <message> <location line="-44"/> @@ -2162,331 +2184,331 @@ Do you want to delete it anyway?</source> <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-34"/> <location line="+29"/> <source>Unknown address type</source> - <translation type="unfinished"></translation> + <translation>Неизвестный тип адреса</translation> </message> <message> <location line="+8"/> <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-19"/> <location line="+27"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> </context> <context> <name>QHttp</name> <message> - <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+876"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+1836"/> - <source>Connection refused</source> - <translation>Отказано в соединении</translation> - </message> - <message> - <location filename="../src/network/access/qhttp.cpp" line="+2631"/> - <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-4"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> - <source>Host %1 not found</source> - <translation>Узел %1 не обнаружен</translation> + <location filename="../src/network/access/qhttp.cpp" line="+1574"/> + <location line="+820"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+1160"/> + <location line="+567"/> + <source>Unknown error</source> + <translation>Неизвестная ошибка</translation> </message> <message> - <location line="-62"/> - <location filename="../src/qt3support/network/q3http.cpp" line="-45"/> - <source>Wrong content length</source> - <translation>Неверная длина данных</translation> + <location line="-568"/> + <location filename="../src/qt3support/network/q3http.cpp" line="-370"/> + <source>Request aborted</source> + <translation>Запрос прерван</translation> </message> <message> - <location line="-2204"/> - <source>HTTPS connection requested but SSL support not compiled in</source> - <translation type="unfinished"></translation> + <location line="+579"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+381"/> + <source>No server set to connect to</source> + <translation>Не указан сервер для подключения</translation> </message> <message> - <location line="+2286"/> - <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+10"/> - <location line="+19"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+48"/> - <source>HTTP request failed</source> - <translation>Ошибка HTTP-запроса</translation> + <location line="+164"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+56"/> + <source>Wrong content length</source> + <translation>Неверная длина содержимого</translation> </message> <message> - <location filename="../src/qt3support/network/q3http.cpp" line="+450"/> - <source>Host %1 found</source> - <translation type="unfinished">Обнаружен узел %1</translation> + <location line="+4"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+4"/> + <source>Server closed connection unexpectedly</source> + <translation>Сервер неожиданно разорвал соединение</translation> </message> <message> - <location line="+14"/> - <source>Host found</source> - <translation type="unfinished">Узел обнаружен</translation> + <location line="+179"/> + <source>Unknown authentication method</source> + <translation>Неизвестный метод авторизации</translation> </message> <message> - <location line="-11"/> - <source>Connected to host %1</source> - <translation type="unfinished">Установлено соединение с узлом %1</translation> + <location line="+183"/> + <source>Error writing response to device</source> + <translation>Ошибка записи ответа на устройство</translation> </message> <message> - <location line="+14"/> - <source>Connected to host</source> - <translation type="unfinished">Соединение с узлом установлено</translation> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+977"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+38"/> + <source>Connection refused</source> + <translation>Отказано в соединении</translation> </message> <message> - <location line="-11"/> - <source>Connection to %1 closed</source> - <translation type="unfinished">Соединение с узлом %1 разорвано</translation> + <location filename="../src/network/access/qhttp.cpp" line="-304"/> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-4"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>Host %1 not found</source> + <translation>Узел %1 не найден</translation> </message> <message> - <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-22"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+14"/> - <source>Connection closed</source> - <translation type="unfinished">Соединение разорвано</translation> + <location line="+20"/> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+10"/> + <location line="+19"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>HTTP request failed</source> + <translation>HTTP-запрос не удался</translation> </message> <message> - <location filename="../src/network/access/qhttp.cpp" line="-1077"/> - <location line="+820"/> - <location filename="../src/qt3support/network/q3http.cpp" line="-1152"/> - <location line="+567"/> - <source>Unknown error</source> - <translation>Неизвестная ошибка</translation> + <location line="+73"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+69"/> + <source>Invalid HTTP response header</source> + <translation>Некорректный HTTP-заголовок ответа</translation> </message> <message> - <location line="-568"/> - <location filename="../src/qt3support/network/q3http.cpp" line="-370"/> - <source>Request aborted</source> - <translation>Запрос отменен</translation> + <location line="+125"/> + <location line="+48"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+40"/> + <location line="+47"/> + <source>Invalid HTTP chunked body</source> + <translation>Некорректное HTTP-фрагментирование данных</translation> </message> <message> - <location line="+579"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+381"/> - <source>No server set to connect to</source> - <translation>Не выбран сервер для подключения</translation> + <location filename="../src/qt3support/network/q3http.cpp" line="+294"/> + <source>Host %1 found</source> + <translation>Узел %1 найден</translation> </message> <message> - <location line="+168"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+60"/> - <source>Server closed connection unexpectedly</source> - <translation>Неожиданный разрыв соединения сервером</translation> + <location line="+3"/> + <source>Connected to host %1</source> + <translation>Установлено соединение с узлом %1</translation> </message> <message> - <location line="+151"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+113"/> - <source>Invalid HTTP response header</source> - <translation>Получен некорректный HTTP-заголовок</translation> + <location line="+3"/> + <source>Connection to %1 closed</source> + <translation>Соединение с узлом %1 закрыто</translation> </message> <message> - <location line="+28"/> - <source>Unknown authentication method</source> - <translation type="unfinished"></translation> + <location line="+8"/> + <source>Host found</source> + <translation>Узел найден</translation> </message> <message> - <location line="+97"/> - <location line="+48"/> - <location filename="../src/qt3support/network/q3http.cpp" line="+40"/> - <location line="+47"/> - <source>Invalid HTTP chunked body</source> - <translation>Некорректный HTTP-ответ</translation> + <location line="+3"/> + <source>Connected to host</source> + <translation>Соединение с узлом установлено</translation> </message> <message> - <location line="+38"/> - <source>Error writing response to device</source> - <translation type="unfinished"></translation> + <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-22"/> + <location filename="../src/qt3support/network/q3http.cpp" line="+3"/> + <source>Connection closed</source> + <translation>Соединение закрыто</translation> </message> <message> - <location line="-173"/> + <location filename="../src/network/access/qhttp.cpp" line="-135"/> <source>Proxy authentication required</source> - <translation type="unfinished"></translation> + <translation>Требуется авторизация на прокси-сервере</translation> </message> <message> <location line="+4"/> <source>Authentication required</source> - <translation type="unfinished"></translation> + <translation>Требуется авторизация</translation> </message> <message> <location line="-138"/> <source>Connection refused (or timed out)</source> - <translation type="unfinished"></translation> + <translation>В соединении отказано (или время ожидания истекло)</translation> </message> <message> <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+6"/> <source>Proxy requires authentication</source> - <translation type="unfinished"></translation> + <translation>Прокси-сервер требует авторизацию</translation> </message> <message> <location line="+3"/> <source>Host requires authentication</source> - <translation type="unfinished"></translation> + <translation>Узел требует авторизацию</translation> </message> <message> <location line="+3"/> <source>Data corrupted</source> - <translation type="unfinished"></translation> + <translation>Данные повреждены</translation> </message> <message> <location line="+3"/> <source>Unknown protocol specified</source> - <translation type="unfinished"></translation> + <translation>Указан неизвестный протокол</translation> </message> <message> <location line="+3"/> <source>SSL handshake failed</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../src/network/access/qhttp.cpp" line="-2263"/> + <source>HTTPS connection requested but SSL support not compiled in</source> + <translation>Запрошено соединение по протоколу HTTPS, но поддержка SSL не скомпилирована</translation> + </message> </context> <context> <name>QHttpSocketEngine</name> <message> <location filename="../src/network/socket/qhttpsocketengine.cpp" line="-89"/> <source>Did not receive HTTP response from proxy</source> - <translation type="unfinished"></translation> + <translation>Не получен HTTP-ответ от прокси-сервера</translation> </message> <message> <location line="+25"/> <source>Error parsing authentication request from proxy</source> - <translation type="unfinished"></translation> + <translation>Ошибка разбора запроса авторизации от прокси-сервера</translation> </message> <message> <location line="+31"/> <source>Authentication required</source> - <translation type="unfinished"></translation> + <translation>Требуется авторизация</translation> </message> <message> <location line="+27"/> <source>Proxy denied connection</source> - <translation type="unfinished"></translation> + <translation>Прокси-сервер запретил соединение</translation> </message> <message> <location line="+10"/> <source>Error communicating with HTTP proxy</source> - <translation type="unfinished"></translation> + <translation>Ошибка обмена данными с прокси-сервером HTTP</translation> </message> <message> <location line="+23"/> <source>Proxy server not found</source> - <translation type="unfinished"></translation> + <translation>Прокси-сервер не найден</translation> </message> <message> <location line="+2"/> <source>Proxy connection refused</source> - <translation type="unfinished"></translation> + <translation>В соединении прокси-сервером отказано</translation> </message> <message> <location line="+2"/> <source>Proxy server connection timed out</source> - <translation type="unfinished"></translation> + <translation>Время на соединение с прокси-сервером истекло</translation> </message> <message> <location line="+2"/> <source>Proxy connection closed prematurely</source> - <translation type="unfinished"></translation> + <translation>Соединение с прокси-сервером неожиданно закрыто</translation> </message> </context> <context> <name>QIBaseDriver</name> <message> - <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1428"/> + <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1434"/> <source>Error opening database</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть базу данных</translation> </message> <message> <location line="+54"/> <source>Could not start transaction</source> - <translation type="unfinished"></translation> + <translation>Не удалось начать транзакцию</translation> </message> <message> <location line="+13"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+13"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> </context> <context> <name>QIBaseResult</name> <message> - <location line="-1097"/> + <location line="-1095"/> <source>Unable to create BLOB</source> - <translation type="unfinished"></translation> + <translation>Невозможно создать BLOB</translation> </message> <message> <location line="+6"/> <source>Unable to write BLOB</source> - <translation type="unfinished"></translation> + <translation>Невозможно записать BLOB</translation> </message> <message> <location line="+14"/> <source>Unable to open BLOB</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть BLOB</translation> </message> <message> <location line="+16"/> <source>Unable to read BLOB</source> - <translation type="unfinished"></translation> + <translation>Невозможно прочитать BLOB</translation> </message> <message> <location line="+125"/> - <location line="+189"/> + <location line="+187"/> <source>Could not find array</source> - <translation type="unfinished"></translation> + <translation>Не удалось найти массив</translation> </message> <message> - <location line="-157"/> + <location line="-155"/> <source>Could not get array data</source> - <translation type="unfinished"></translation> + <translation>Не удалось найти данные массива</translation> </message> <message> - <location line="+212"/> + <location line="+210"/> <source>Could not get query info</source> - <translation type="unfinished"></translation> + <translation>Не удалось найти информацию о запросе</translation> </message> <message> <location line="+20"/> <source>Could not start transaction</source> - <translation type="unfinished"></translation> + <translation>Не удалось начать транзакцию</translation> </message> <message> <location line="+19"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+33"/> <source>Could not allocate statement</source> - <translation type="unfinished"></translation> + <translation>Не удалось получить ресурсы для создания выражения</translation> </message> <message> <location line="+5"/> <source>Could not prepare statement</source> - <translation type="unfinished"></translation> + <translation>Не удалось подготовить выражение</translation> </message> <message> <location line="+5"/> <location line="+7"/> <source>Could not describe input statement</source> - <translation type="unfinished"></translation> + <translation>Не удалось описать входящее выражение</translation> </message> <message> <location line="+10"/> <source>Could not describe statement</source> - <translation type="unfinished"></translation> + <translation>Не удалось описать выражение</translation> </message> <message> <location line="+115"/> <source>Unable to close statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно закрыть выражение</translation> </message> <message> <location line="+8"/> <source>Unable to execute query</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить запрос</translation> </message> <message> <location line="+46"/> <source>Could not fetch next item</source> - <translation type="unfinished"></translation> + <translation>Не удалось получить следующий элемент</translation> </message> <message> <location line="+160"/> <source>Could not get statement info</source> - <translation type="unfinished"></translation> + <translation>Не удалось найти информацию о выражении</translation> </message> </context> <context> @@ -2494,27 +2516,27 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/corelib/global/qglobal.cpp" line="+1869"/> <source>Permission denied</source> - <translation type="unfinished"></translation> + <translation>Доступ запрещён</translation> </message> <message> <location line="+3"/> <source>Too many open files</source> - <translation type="unfinished"></translation> + <translation>Слишком много открытых файлов</translation> </message> <message> <location line="+3"/> <source>No such file or directory</source> - <translation type="unfinished"></translation> + <translation>Файл или каталог не существует</translation> </message> <message> <location line="+3"/> <source>No space left on device</source> - <translation type="unfinished"></translation> + <translation>Нет свободного места на устройстве</translation> </message> <message> - <location filename="../src/corelib/io/qiodevice.cpp" line="+1536"/> + <location filename="../src/corelib/io/qiodevice.cpp" line="+1541"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> </context> <context> @@ -2545,7 +2567,7 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/dialogs/qinputdialog.cpp" line="+223"/> <source>Enter a value:</source> - <translation type="unfinished"></translation> + <translation>Укажите значение:</translation> </message> </context> <context> @@ -2553,66 +2575,66 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/corelib/plugin/qlibrary.cpp" line="+378"/> <source>Could not mmap '%1': %2</source> - <translation type="unfinished"></translation> + <translation>Не удалось выполнить mmap '%1': %2</translation> </message> <message> <location line="+22"/> <source>Plugin verification data mismatch in '%1'</source> - <translation type="unfinished"></translation> + <translation>Проверочная информация для модуля '%1' не совпадает</translation> </message> <message> <location line="+6"/> <source>Could not unmap '%1': %2</source> - <translation type="unfinished"></translation> + <translation>Не удалось выполнить unmap '%1': %2</translation> </message> <message> <location line="+302"/> <source>The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]</source> - <translation type="unfinished"></translation> + <translation>Модуль '%1' использует несоместимую библиотеку Qt. (%2.%3.%4) [%5]</translation> </message> <message> <location line="+20"/> <source>The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"</source> - <translation type="unfinished"></translation> + <translation>Плагин '%1' использует несоместимую библиотеку Qt. Ожидается ключ "%2", но получен ключ "%3"</translation> </message> <message> <location line="+340"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> <message> <location line="-377"/> <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+280"/> <source>The shared library was not found.</source> - <translation type="unfinished"></translation> + <translation>Динамическая библиотека не найдена.</translation> </message> <message> <location line="+2"/> <source>The file '%1' is not a valid Qt plugin.</source> - <translation type="unfinished"></translation> + <translation>Файл '%1' - не может быть корректным модулем Qt.</translation> </message> <message> <location line="+43"/> <source>The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)</source> - <translation type="unfinished"></translation> + <translation>Плагин '%1' использует несоместимую библиотеку Qt. (Нельзя совмещать релизные и отладочные библиотеки.)</translation> </message> <message> <location filename="../src/corelib/plugin/qlibrary_unix.cpp" line="+209"/> <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+99"/> <source>Cannot load library %1: %2</source> - <translation type="unfinished"></translation> + <translation>Невозможно загрузить библиотеку %1: %2</translation> </message> <message> <location line="+16"/> <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+26"/> <source>Cannot unload library %1: %2</source> - <translation type="unfinished"></translation> + <translation>Невозможно выгрузить библиотеку %1: %2</translation> </message> <message> <location line="+31"/> <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+15"/> <source>Cannot resolve symbol "%1" in %2: %3</source> - <translation type="unfinished"></translation> + <translation>Невозможно разрешить символ "%1" в %2: %3</translation> </message> </context> <context> @@ -2620,62 +2642,61 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/widgets/qlineedit.cpp" line="+2680"/> <source>&Undo</source> - <translation type="unfinished">&Отменить</translation> + <translation>&Отменить действие</translation> </message> <message> <location line="+4"/> <source>&Redo</source> - <translation type="unfinished">&Повторить</translation> + <translation>&Повторить действие</translation> </message> <message> <location line="+7"/> <source>Cu&t</source> - <translation type="unfinished">&Вырезать</translation> + <translation>&Вырезать</translation> </message> <message> <location line="+4"/> <source>&Copy</source> - <translation type="unfinished">&Копировать</translation> + <translation>&Копировать</translation> </message> <message> <location line="+4"/> <source>&Paste</source> - <translation type="unfinished">В&ставить</translation> + <translation>В&ставить</translation> </message> <message> - <location line="+11"/> - <source>Select All</source> - <translation type="unfinished">Выделить все</translation> + <location line="+5"/> + <source>Delete</source> + <translation>Удалить</translation> </message> <message> - <location line="-6"/> - <source>Delete</source> - <translation type="unfinished">Удалить</translation> + <location line="+6"/> + <source>Select All</source> + <translation>Выделить все</translation> </message> </context> <context> <name>QLocalServer</name> <message> <location filename="../src/network/socket/qlocalserver.cpp" line="+226"/> - <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+231"/> + <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+233"/> <source>%1: Name error</source> - <translation type="unfinished"></translation> + <translation>%1: Некорректное имя</translation> </message> <message> <location filename="../src/network/socket/qlocalserver_unix.cpp" line="-8"/> <source>%1: Permission denied</source> - <translation type="unfinished"></translation> + <translation>%1: Доступ запрещён</translation> </message> <message> <location line="+12"/> <source>%1: Address in use</source> - <translation type="unfinished"></translation> + <translation>%1: Адрес используется</translation> </message> <message> <location line="+5"/> - <location filename="../src/network/socket/qlocalserver_win.cpp" line="+158"/> <source>%1: Unknown error %2</source> - <translation type="unfinished"></translation> + <translation>%1: Неизвестная ошибка %2</translation> </message> </context> <context> @@ -2684,13 +2705,13 @@ Do you want to delete it anyway?</source> <location filename="../src/network/socket/qlocalsocket_tcp.cpp" line="+132"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+134"/> <source>%1: Connection refused</source> - <translation type="unfinished"></translation> + <translation>%1: Отказано в соединении</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Remote closed</source> - <translation type="unfinished"></translation> + <translation>%1: Удалённое закрытие</translation> </message> <message> <location line="+3"/> @@ -2698,143 +2719,143 @@ Do you want to delete it anyway?</source> <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+80"/> <location line="+43"/> <source>%1: Invalid name</source> - <translation type="unfinished"></translation> + <translation>%1: Некорректное имя</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Socket access error</source> - <translation type="unfinished"></translation> + <translation>%1: Ошибка обращения к сокету</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Socket resource error</source> - <translation type="unfinished"></translation> + <translation>%1: Ошибка выделения ресурсов сокета</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Socket operation timed out</source> - <translation type="unfinished"></translation> + <translation>%1: Время на операцию с сокетом истекло</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: Datagram too large</source> - <translation type="unfinished"></translation> + <translation>%1: Датаграмма слишком большая</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <location filename="../src/network/socket/qlocalsocket_win.cpp" line="-48"/> <source>%1: Connection error</source> - <translation type="unfinished"></translation> + <translation>%1: Ошибка соединения</translation> </message> <message> <location line="+3"/> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/> <source>%1: The socket operation is not supported</source> - <translation type="unfinished"></translation> + <translation>%1: Операция с сокетом не поддерживается</translation> </message> <message> <location line="+4"/> <source>%1: Unknown error</source> - <translation type="unfinished"></translation> + <translation>%1: Неизвестная ошибка</translation> </message> <message> <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+4"/> <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+10"/> <source>%1: Unknown error %2</source> - <translation type="unfinished"></translation> + <translation>%1: Неизвестная ошибка %2</translation> </message> </context> <context> <name>QMYSQLDriver</name> <message> - <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1231"/> + <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1251"/> <source>Unable to open database '</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть базу данных '</translation> </message> <message> <location line="+7"/> <source>Unable to connect</source> - <translation type="unfinished"></translation> + <translation>Невозможно соединиться</translation> </message> <message> - <location line="+127"/> + <location line="+135"/> <source>Unable to begin transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно начать транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> </context> <context> <name>QMYSQLResult</name> <message> - <location line="-922"/> + <location line="-942"/> <source>Unable to fetch data</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить данные</translation> </message> <message> - <location line="+176"/> + <location line="+183"/> <source>Unable to execute query</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить запрос</translation> </message> <message> <location line="+6"/> <source>Unable to store result</source> - <translation type="unfinished"></translation> + <translation>Невозможно сохранить результат</translation> </message> <message> - <location line="+190"/> + <location line="+194"/> <location line="+8"/> <source>Unable to prepare statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно подготовить выражение</translation> </message> <message> - <location line="+34"/> + <location line="+36"/> <source>Unable to reset statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно сбросить выражение</translation> </message> <message> - <location line="+87"/> + <location line="+86"/> <source>Unable to bind value</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать значение</translation> </message> <message> <location line="+11"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> <message> <location line="+14"/> <location line="+21"/> <source>Unable to bind outvalues</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать результирующие значения</translation> </message> <message> <location line="-12"/> <source>Unable to store statement results</source> - <translation type="unfinished"></translation> + <translation>Невозможно сохранить результат выполнения выражения</translation> </message> <message> - <location line="-253"/> + <location line="-256"/> <source>Unable to execute next query</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить следующий запрос</translation> </message> <message> <location line="+10"/> <source>Unable to store next result</source> - <translation type="unfinished"></translation> + <translation>Невозможно сохранить следующий результат</translation> </message> </context> <context> @@ -2842,7 +2863,7 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/widgets/qmdiarea.cpp" line="+290"/> <source>(Untitled)</source> - <translation type="unfinished"></translation> + <translation>(Неозаглавлено)</translation> </message> </context> <context> @@ -2850,92 +2871,92 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/widgets/qmdisubwindow.cpp" line="+280"/> <source>%1 - [%2]</source> - <translation type="unfinished">%1 - [%2]</translation> + <translation>%1 - [%2]</translation> </message> <message> <location line="+72"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> <message> <location line="-18"/> <source>Minimize</source> - <translation type="unfinished">Свернуть</translation> + <translation>Минимизировать</translation> </message> <message> <location line="+13"/> <source>Restore Down</source> - <translation type="unfinished">Восстановить</translation> + <translation>Восстановить</translation> </message> <message> <location line="+707"/> <source>&Restore</source> - <translation type="unfinished">&Восстановить</translation> + <translation>&Восстановить</translation> </message> <message> <location line="+3"/> <source>&Move</source> - <translation type="unfinished">&Переместить</translation> + <translation>&Переместить</translation> </message> <message> <location line="+1"/> <source>&Size</source> - <translation type="unfinished">&Размер</translation> + <translation>&Размер</translation> </message> <message> <location line="+1"/> <source>Mi&nimize</source> - <translation type="unfinished">&Свернуть</translation> + <translation>&Минимизировать</translation> </message> <message> <location line="+2"/> <source>Ma&ximize</source> - <translation type="unfinished">Р&азвернуть</translation> + <translation>Р&аспахнуть</translation> </message> <message> <location line="+2"/> <source>Stay on &Top</source> - <translation type="unfinished">Всегда &наверху</translation> + <translation>Оставаться &сверху</translation> </message> <message> <location line="+3"/> <source>&Close</source> - <translation type="unfinished">&Закрыть</translation> + <translation>&Закрыть</translation> </message> <message> <location line="-787"/> <source>- [%1]</source> - <translation type="unfinished"></translation> + <translation>- [%1]</translation> </message> <message> <location line="+58"/> <source>Maximize</source> - <translation type="unfinished">Развернуть</translation> + <translation>Распахнуть</translation> </message> <message> <location line="+3"/> <source>Unshade</source> - <translation type="unfinished"></translation> + <translation>Восстановить из заголовка</translation> </message> <message> <location line="+3"/> <source>Shade</source> - <translation type="unfinished"></translation> + <translation>Свернуть в заголовок</translation> </message> <message> <location line="+6"/> <source>Restore</source> - <translation type="unfinished"></translation> + <translation>Восстановить</translation> </message> <message> <location line="+6"/> <source>Help</source> - <translation type="unfinished">Справка</translation> + <translation>Справка</translation> </message> <message> <location line="+3"/> <source>Menu</source> - <translation type="unfinished">Меню</translation> + <translation>Меню</translation> </message> </context> <context> @@ -2944,91 +2965,68 @@ Do you want to delete it anyway?</source> <location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/> <location line="+225"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> <message> <location line="-224"/> <location line="+225"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> <message> <location line="-223"/> <location line="+225"/> <location line="+51"/> <source>Execute</source> - <translation type="unfinished"></translation> + <translation>Выполнить</translation> </message> </context> <context> - <name>QMenuBar</name> - <message> - <source>About</source> - <translation type="obsolete">О программе</translation> - </message> - <message> - <source>Config</source> - <translation type="obsolete">Конфигурация</translation> - </message> - <message> - <source>Preference</source> - <translation type="obsolete">Настройки</translation> - </message> - <message> - <source>Options</source> - <translation type="obsolete">Параметры</translation> - </message> - <message> - <source>Setting</source> - <translation type="obsolete">Настройки</translation> - </message> - <message> - <source>Setup</source> - <translation type="obsolete">Настройки</translation> - </message> - <message> - <source>Quit</source> - <translation type="obsolete">Выход</translation> - </message> + <name>QMessageBox</name> <message> - <source>Exit</source> - <translation type="obsolete">Выход</translation> + <location filename="../src/gui/dialogs/qmessagebox.cpp" line="-1111"/> + <source>Help</source> + <translation>Справка</translation> </message> -</context> -<context> - <name>QMessageBox</name> <message> - <location filename="../src/gui/dialogs/qmessagebox.cpp" line="-1964"/> - <location line="+852"/> + <location line="-848"/> + <location line="+847"/> <location filename="../src/gui/dialogs/qmessagebox.h" line="-52"/> <location line="+8"/> <source>OK</source> - <translation>OK</translation> + <translation>Готово</translation> </message> <message> - <location line="+509"/> + <location line="+475"/> + <source><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></source> + <translation type="unfinished"><h3>О Qt</h3><p>Данная программа использует Qt версии %1.</p><p>Qt - это инструмент для разработки крссплатформенных приложений на C++.</p><p>Qt предоставляет переносимость между MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux и всеми популярными вариантами коммерческой Unix. Также Qt доступна для встраиваемых устройств в виде Qt для Embedded Linux и Qt для Windows CE.</p><p>Qt доступна под тремя различными лицензиями, разработанными для удовлетворения требований различных пользователей.</p>Qt, лицензированая нашей коммерческой лицензией, предназначена для развития проприетарного/коммерческого программного обеспечения, когда Вы не желаете предоставлять исходные коды третьим сторонам; коммерческая лицензия не соответствует условиям лицензий GNU LGPL версии 2.1 или GNU GPL версии 3.0.</p><p>Qt под лицензией GNU LGPL версии 2.1 предназначена для разработки программного обеспечения с открытым исходным кодом или коммерческого программного обеспечения при соблюдении сроков и условий лицензии GNU LGPL версии 2.1.</p><p>Qt под лицензией GNU General Public License версии 3.0 предназначена для разработки программных приложений в тех случаях, когда Вы хотели бы использовать такие приложения в сочетании с программным обеспечением на условиях лицензии GNU GPL с версии 3.0 или если Вы готовы соблюдать условия лицензии GNU GPL версии 3.0.</p><p>Обратитесь к <a href="http://www.qtsoftware.com/products/licensing">www.qtsoftware.com/products/licensing</a> для обзора лицензий Qt.</p><p>Copyright (C) 2009 Корпорация Nokia и/или её дочерние подразделения.</p><p>Qt - продукт Nokia. Обратитесь к <a href="http://www.qtsoftware.com/qt/">www.qtsoftware.com/qt</a> для получения дополнительной информации.</p></translation> + </message> + <message> + <location line="+34"/> <source>About Qt</source> - <translation type="unfinished"></translation> + <translation>О Qt</translation> </message> <message> - <location line="-508"/> - <source>Help</source> - <translation type="unfinished">Справка</translation> + <source><p>This program uses Qt version %1.</p></source> + <translation type="obsolete"><p>Данная программа использует Qt версии %1.</p></translation> </message> <message> - <location line="-1097"/> + <location line="-1600"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>Показать подробности...</translation> </message> <message> <location line="+1"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>Скрыть подробности...</translation> </message> <message> - <location line="+1570"/> - <source><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></source> - <translation type="unfinished"></translation> + <source><h3>About Qt</h3>%1<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 a Nokia product. See <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> for more information.</p></source> + <translation type="obsolete"><h3>О Qt</h3>%1<p>Qt - это инструмент для разработчки крссплатформенных приложений на C++.</p><p>Qt предоставляет переносимость между MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux и всеми популярными вариантами коммерческой Unix. Также Qt доступна для встраиваемых устройств в виде Qt for Embedded Linux и Qt for Windows CE.</p><p>Qt - продукт Nokia. Обратитесь к <a href="http://qtsoftware.com/qt/">qtsoftware.com/qt/</a> для получения дополнительной информации.</p></translation> + </message> + <message> + <source><p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> for an overview of Qt licensing.</p></source> + <translation type="obsolete"><p>Данная программа использует Qt Open Source Edition версии %1.</p><p>Qt Open Source Edition предназначена для разработки Open Source приложений. Для разработки проприетарных (с закрытым исходным кодом) приложений необходима коммерческая лицензия Qt.</p><p>Обратитесь к официальносй странице <a href="http://qtsoftware.com/company/model/">qtsoftware.com/company/model/</a> для ознакомления с моделями лицензирования Qt.</p></translation> </message> </context> <context> @@ -3057,132 +3055,132 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/network/socket/qnativesocketengine.cpp" line="+206"/> <source>The remote host closed the connection</source> - <translation type="unfinished"></translation> + <translation>Удалённый узел закрыл соединение</translation> </message> <message> <location line="+3"/> <source>Network operation timed out</source> - <translation type="unfinished"></translation> + <translation>Время на сетевую операцию истекло</translation> </message> <message> <location line="+3"/> <source>Out of resources</source> - <translation type="unfinished"></translation> + <translation>Недостаточно ресурсов</translation> </message> <message> <location line="+3"/> <source>Unsupported socket operation</source> - <translation type="unfinished"></translation> + <translation>Операция с сокетом не поддерживается</translation> </message> <message> <location line="+3"/> <source>Protocol type not supported</source> - <translation type="unfinished"></translation> + <translation>Протокол не поддерживается</translation> </message> <message> <location line="+3"/> <source>Invalid socket descriptor</source> - <translation type="unfinished"></translation> + <translation>Некорректный дескриптор сокета</translation> </message> <message> <location line="+6"/> <source>Network unreachable</source> - <translation type="unfinished"></translation> + <translation>Сеть недоступна</translation> </message> <message> <location line="+3"/> <source>Permission denied</source> - <translation type="unfinished"></translation> + <translation>Доступ запрещён</translation> </message> <message> <location line="+3"/> <source>Connection timed out</source> - <translation type="unfinished"></translation> + <translation>Время на соединение истекло</translation> </message> <message> <location line="+3"/> <source>Connection refused</source> - <translation type="unfinished">Отказано в соединении</translation> + <translation>Отказано в соединении</translation> </message> <message> <location line="+3"/> <source>The bound address is already in use</source> - <translation type="unfinished"></translation> + <translation>Адрес уже используется</translation> </message> <message> <location line="+3"/> <source>The address is not available</source> - <translation type="unfinished"></translation> + <translation>Адрес недоступен</translation> </message> <message> <location line="+3"/> <source>The address is protected</source> - <translation type="unfinished"></translation> + <translation>Адрес защищён</translation> </message> <message> <location line="+6"/> <source>Unable to send a message</source> - <translation type="unfinished"></translation> + <translation>Невозможно отправить сообщение</translation> </message> <message> <location line="+3"/> <source>Unable to receive a message</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить сообщение</translation> </message> <message> <location line="+3"/> <source>Unable to write</source> - <translation type="unfinished"></translation> + <translation>Невозможно записать</translation> </message> <message> <location line="+3"/> <source>Network error</source> - <translation type="unfinished"></translation> + <translation>Ошибка сети</translation> </message> <message> <location line="+3"/> <source>Another socket is already listening on the same port</source> - <translation type="unfinished"></translation> + <translation>Другой сокет уже прослушивает этот порт</translation> </message> <message> <location line="-66"/> <source>Unable to initialize non-blocking socket</source> - <translation type="unfinished"></translation> + <translation>Невозможно инициализировать не-блочный сокет</translation> </message> <message> <location line="+3"/> <source>Unable to initialize broadcast socket</source> - <translation type="unfinished"></translation> + <translation>Невозможно инициализировать широковещательный сокет</translation> </message> <message> <location line="+3"/> <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source> - <translation type="unfinished"></translation> + <translation>Попытка использовать IPv6 на платформе, не поддерживающей IPv6</translation> </message> <message> <location line="+21"/> <source>Host unreachable</source> - <translation type="unfinished"></translation> + <translation>Узел недоступен</translation> </message> <message> <location line="+24"/> <source>Datagram was too large to send</source> - <translation type="unfinished"></translation> + <translation>Датаграмма слишком большая для отправки</translation> </message> <message> <location line="+18"/> <source>Operation on non-socket</source> - <translation type="unfinished"></translation> + <translation>Операция с не-сокетом</translation> </message> <message> <location line="+6"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> <message> <location line="-3"/> <source>The proxy type is invalid for this operation</source> - <translation type="unfinished"></translation> + <translation>Некорректный тип прокси-сервера для данной операции</translation> </message> </context> <context> @@ -3190,195 +3188,212 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/network/access/qnetworkaccesscachebackend.cpp" line="+65"/> <source>Error opening %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка открытия %1</translation> + </message> +</context> +<context> + <name>QNetworkAccessDebugPipeBackend</name> + <message> + <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+191"/> + <source>Write error writing to %1: %2</source> + <translation type="unfinished">Ошибка записи в %1: %2</translation> </message> </context> <context> <name>QNetworkAccessFileBackend</name> <message> - <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+99"/> + <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+100"/> <source>Request for opening non-local file %1</source> - <translation type="unfinished"></translation> + <translation>Запрос на открытие файла вне файловой системы %1</translation> </message> <message> - <location line="+42"/> + <location line="+45"/> <source>Error opening %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка открытия %1: %2</translation> </message> <message> - <location line="+56"/> + <location line="+38"/> <source>Write error writing to %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка записи в %1: %2</translation> </message> <message> - <location line="+33"/> + <location line="+48"/> <source>Cannot open %1: Path is a directory</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть %1: Указан путь к каталогу</translation> </message> <message> <location line="+21"/> <source>Read error reading from %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка чтения из %1: %2</translation> </message> </context> <context> <name>QNetworkAccessFtpBackend</name> <message> - <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+165"/> + <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+131"/> <source>No suitable proxy found</source> - <translation type="unfinished"></translation> + <translation>Подходящий прокси-сервер не найден</translation> </message> <message> <location line="+14"/> <source>Cannot open %1: is a directory</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть %1: Указан путь к каталогу</translation> </message> <message> - <location line="+130"/> + <location line="+112"/> <source>Logging in to %1 failed: authentication required</source> - <translation type="unfinished"></translation> + <translation>Соединение с %1 не удалось: требуется авторизация</translation> </message> <message> <location line="+39"/> <source>Error while downloading %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка в процессе загрузки %1: %2</translation> </message> <message> <location line="+2"/> <source>Error while uploading %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка в процессе отгрузки %1: %2</translation> </message> </context> <context> <name>QNetworkAccessHttpBackend</name> <message> - <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+597"/> + <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+567"/> <source>No suitable proxy found</source> - <translation type="unfinished"></translation> + <translation>Подходящий прокси-сервер не найден</translation> </message> </context> <context> <name>QNetworkReply</name> <message> - <location line="+128"/> + <location line="+88"/> <source>Error downloading %1 - server replied: %2</source> - <translation type="unfinished"></translation> + <translation>Ошибка загрузки %1 - ответ сервера: %2</translation> </message> <message> - <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+68"/> + <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+75"/> <source>Protocol "%1" is unknown</source> - <translation type="unfinished"></translation> + <translation>Неизвестный протокол "%1"</translation> </message> </context> <context> <name>QNetworkReplyImpl</name> <message> - <location line="+432"/> + <location line="+459"/> <location line="+22"/> <source>Operation canceled</source> - <translation type="unfinished"></translation> + <translation>Операция отменена</translation> </message> </context> <context> <name>QOCIDriver</name> <message> - <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2069"/> + <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2079"/> <source>Unable to logon</source> - <translation type="unfinished"></translation> + <translation>Невозможно авторизоваться</translation> </message> <message> <location line="-144"/> <source>Unable to initialize</source> <comment>QOCIDriver</comment> - <translation type="unfinished"></translation> + <translation>Невозможно инициализировать</translation> </message> <message> <location line="+215"/> <source>Unable to begin transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно начать транзакцию</translation> </message> <message> <location line="+19"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+19"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> </context> <context> <name>QOCIResult</name> <message> - <location line="-963"/> + <location line="-973"/> <location line="+161"/> <location line="+15"/> <source>Unable to bind column for batch execute</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать столбец для пакетного выполнения</translation> </message> <message> <location line="+15"/> <source>Unable to execute batch statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить пакетное выражение</translation> </message> <message> <location line="+302"/> <source>Unable to goto next</source> - <translation type="unfinished"></translation> + <translation>Невозможно перейти к следующей строке</translation> </message> <message> <location line="+59"/> <source>Unable to alloc statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно создать выражение</translation> </message> <message> <location line="+15"/> <source>Unable to prepare statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно подготовить выражение</translation> </message> <message> - <location line="+36"/> + <location line="+26"/> + <source>Unable to get statement type</source> + <translation>Невозможно определить тип выражения</translation> + </message> + <message> + <location line="+20"/> <source>Unable to bind value</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать результирующие значения</translation> + </message> + <message> + <source>Unable to execute select statement</source> + <translation type="obsolete">Невозможно выполнить утверждение SELECT</translation> </message> <message> <location line="+19"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> </context> <context> <name>QODBCDriver</name> <message> - <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1785"/> + <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1781"/> <source>Unable to connect</source> - <translation type="unfinished"></translation> + <translation>Невозможно соединиться</translation> </message> <message> <location line="+6"/> <source>Unable to connect - Driver doesn't support all needed functionality</source> - <translation type="unfinished"></translation> + <translation>Невозможно соединиться - Драйвер не поддерживает требуемый функционал</translation> </message> <message> <location line="+242"/> <source>Unable to disable autocommit</source> - <translation type="unfinished"></translation> + <translation>Невозможно отключить автовыполнение транзакции</translation> </message> <message> <location line="+17"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> <message> <location line="+15"/> <source>Unable to enable autocommit</source> - <translation type="unfinished"></translation> + <translation>Невозможно установить автовыполнение транзакции</translation> </message> </context> <context> @@ -3387,50 +3402,50 @@ Do you want to delete it anyway?</source> <location line="-1218"/> <location line="+349"/> <source>QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration</source> - <translation type="unfinished"></translation> + <translation>QODBCResult::reset: Невозможно установить 'SQL_CURSOR_STATIC' атрибутом выражение. Проверьте настройки драйвера ODBC</translation> </message> <message> <location line="-332"/> <location line="+626"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> <message> <location line="-555"/> <source>Unable to fetch next</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить следующую строку</translation> </message> <message> <location line="+279"/> <source>Unable to prepare statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно подготовить выражение</translation> </message> <message> <location line="+268"/> <source>Unable to bind variable</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать значение</translation> </message> <message> <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+194"/> <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-475"/> <location line="+578"/> <source>Unable to fetch last</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить последнюю строку</translation> </message> <message> <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-672"/> <source>Unable to fetch</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить данные</translation> </message> <message> <location line="+44"/> <source>Unable to fetch first</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить первую строку</translation> </message> <message> <location line="+19"/> <source>Unable to fetch previous</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить предыдущую строку</translation> </message> </context> <context> @@ -3438,61 +3453,58 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/util/qdesktopservices_mac.cpp" line="+165"/> <source>Home</source> - <translation type="unfinished">Home</translation> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+74"/> <source>Operation not supported on %1</source> - <translation type="unfinished"></translation> + <translation>Операция не поддерживается для %1</translation> </message> <message> <location line="+53"/> <source>Invalid URI: %1</source> - <translation type="unfinished"></translation> + <translation>Некорректный URI: %1</translation> </message> <message> - <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+175"/> <source>Write error writing to %1: %2</source> - <translation type="unfinished"></translation> + <translation type="obsolete">Ошибка записи в %1: %2</translation> </message> <message> - <location line="+57"/> <source>Read error reading from %1: %2</source> - <translation type="unfinished"></translation> + <translation type="obsolete">Ошибка чтения из %1: %2</translation> </message> <message> - <location line="+31"/> + <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+60"/> <source>Socket error on %1: %2</source> - <translation type="unfinished"></translation> + <translation>Ошика сокета для %1: %2</translation> </message> <message> <location line="+15"/> <source>Remote host closed the connection prematurely on %1</source> - <translation type="unfinished"></translation> + <translation>Удалённый узел неожиданно прервал соединение для %1</translation> </message> <message> - <location line="+53"/> <source>Protocol error: packet of size 0 received</source> - <translation type="unfinished"></translation> + <translation type="obsolete">Ошибка протокола: получен пакет нулевого размера</translation> </message> <message> <location filename="../src/network/kernel/qhostinfo.cpp" line="+177"/> <location line="+57"/> <source>No host name given</source> - <translation type="unfinished"></translation> + <translation>Имя узла не задано</translation> </message> </context> <context> <name>QPPDOptionsModel</name> <message> - <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1195"/> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/> <source>Name</source> - <translation type="unfinished">Имя</translation> + <translation>Имя</translation> </message> <message> <location line="+2"/> <source>Value</source> - <translation type="unfinished"></translation> + <translation>Значение</translation> </message> </context> <context> @@ -3500,32 +3512,32 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/sql/drivers/psql/qsql_psql.cpp" line="+763"/> <source>Unable to connect</source> - <translation type="unfinished"></translation> + <translation>Невозможно соединиться</translation> </message> <message> <location line="+49"/> <source>Could not begin transaction</source> - <translation type="unfinished"></translation> + <translation>Не удалось начать транзакцию</translation> </message> <message> <location line="+17"/> <source>Could not commit transaction</source> - <translation type="unfinished"></translation> + <translation>Не удалось выполнить транзакцию</translation> </message> <message> <location line="+16"/> <source>Could not rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Не удалось откатить транзакцию</translation> </message> <message> <location line="+358"/> <source>Unable to subscribe</source> - <translation type="unfinished"></translation> + <translation>Невозможно подписаться</translation> </message> <message> <location line="+32"/> <source>Unable to unsubscribe</source> - <translation type="unfinished"></translation> + <translation>Невозможно отписаться</translation> </message> </context> <context> @@ -3533,12 +3545,12 @@ Do you want to delete it anyway?</source> <message> <location line="-1058"/> <source>Unable to create query</source> - <translation type="unfinished"></translation> + <translation>Невозможно создать запрос</translation> </message> <message> <location line="+374"/> <source>Unable to prepare statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно подготовить выражение</translation> </message> </context> <context> @@ -3546,102 +3558,106 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="+304"/> <source>Centimeters (cm)</source> - <translation type="unfinished"></translation> + <translation>Сантиметры (cm)</translation> </message> <message> <location line="+0"/> <source>Millimeters (mm)</source> - <translation type="unfinished"></translation> + <translation>Миллиметры (mm)</translation> </message> <message> <location line="+0"/> <source>Inches (in)</source> - <translation type="unfinished"></translation> + <translation>Дюймы (in)</translation> </message> <message> <location line="+0"/> <source>Points (pt)</source> - <translation type="unfinished"></translation> + <translation>Точки (pt)</translation> </message> <message> - <location filename="../src/gui/dialogs/qpagesetupwidget.ui"/> + <location filename="../src/gui/dialogs/qpagesetupwidget.ui" line="+13"/> <source>Form</source> - <translation type="unfinished"></translation> + <translation>Форма</translation> </message> <message> - <location/> + <location line="+29"/> <source>Paper</source> - <translation type="unfinished"></translation> + <translation>Бумага</translation> </message> <message> - <location/> + <location line="+6"/> <source>Page size:</source> - <translation type="unfinished"></translation> + <translation>Размер страницы:</translation> </message> <message> - <location/> + <location line="+13"/> <source>Width:</source> - <translation type="unfinished"></translation> + <translation>Ширина:</translation> </message> <message> - <location/> + <location line="+19"/> <source>Height:</source> - <translation type="unfinished"></translation> + <translation>Высота:</translation> </message> <message> - <location/> + <location line="+19"/> <source>Paper source:</source> - <translation type="unfinished"></translation> + <translation>Источник бумаги:</translation> </message> <message> - <location/> + <location line="+29"/> <source>Orientation</source> - <translation type="unfinished"></translation> + <translation>Ориентация страницы</translation> </message> <message> - <location/> + <location line="+6"/> <source>Portrait</source> - <translation type="unfinished">Портрет</translation> + <translation>Книжная</translation> </message> <message> - <location/> + <location line="+10"/> <source>Landscape</source> - <translation type="unfinished">Альбом</translation> + <translation>Альбомная</translation> </message> <message> - <location/> + <location line="+7"/> <source>Reverse landscape</source> - <translation type="unfinished"></translation> + <translation>Перевёрнутая альбомная</translation> </message> <message> - <location/> + <location line="+7"/> <source>Reverse portrait</source> - <translation type="unfinished"></translation> + <translation>Перевёрнутая книжная</translation> </message> <message> - <location/> + <location line="+26"/> <source>Margins</source> - <translation type="unfinished"></translation> + <translation>Поля</translation> </message> <message> - <location/> + <location line="+8"/> + <location line="+3"/> <source>top margin</source> - <translation type="unfinished"></translation> + <translation>верхнее поле</translation> </message> <message> - <location/> + <location line="+28"/> + <location line="+3"/> <source>left margin</source> - <translation type="unfinished"></translation> + <translation>Левое поле</translation> </message> <message> - <location/> + <location line="+29"/> + <location line="+3"/> <source>right margin</source> - <translation type="unfinished"></translation> + <translation>правое поле</translation> </message> <message> - <location/> + <location line="+28"/> + <location line="+3"/> <source>bottom margin</source> - <translation type="unfinished"></translation> + <translation>Нижнее поле</translation> </message> </context> <context> @@ -3649,12 +3665,12 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+24"/> <source>Unknown error</source> - <translation type="unfinished">Неизвестная ошибка</translation> + <translation>Неизвестная ошибка</translation> </message> <message> <location line="-68"/> <source>The plugin was not loaded.</source> - <translation type="unfinished"></translation> + <translation>Модуль не был загружен.</translation> </message> </context> <context> @@ -3662,13 +3678,13 @@ Do you want to delete it anyway?</source> <message> <location filename="../src/gui/painting/qprinterinfo_unix.cpp" line="+98"/> <source>locally connected</source> - <translation>локальный</translation> + <translation>соединено локально</translation> </message> <message> <location line="+23"/> <location line="+225"/> <source>Aliases: %1</source> - <translation>Алиасы: %1</translation> + <translation>Псевдонимы: %1</translation> </message> <message> <location line="+223"/> @@ -3677,54 +3693,7 @@ Do you want to delete it anyway?</source> <translation>неизвестно</translation> </message> <message> - <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+268"/> - <source>OK</source> - <translation type="unfinished">OK</translation> - </message> - <message> - <source>Cancel</source> - <translation type="obsolete">Отмена</translation> - </message> - <message> - <source>Print in color if available</source> - <translation type="obsolete">Цветная печать</translation> - </message> - <message> - <source>Printer</source> - <translation type="obsolete">Принтер</translation> - </message> - <message> - <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+375"/> - <source>Print all</source> - <translation type="unfinished">Печатать все</translation> - </message> - <message> - <location line="+2"/> - <source>Print range</source> - <translation type="unfinished">Печатать диапазон</translation> - </message> - <message> - <source>Print last page first</source> - <translation type="obsolete">Начать с последней страницы</translation> - </message> - <message> - <source>Number of copies:</source> - <translation type="obsolete">Число копий:</translation> - </message> - <message> - <source>Paper format</source> - <translation type="obsolete">Формат бумаги</translation> - </message> - <message> - <source>Portrait</source> - <translation type="obsolete">Портрет</translation> - </message> - <message> - <source>Landscape</source> - <translation type="obsolete">Альбом</translation> - </message> - <message> - <location line="-48"/> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+329"/> <source>A0 (841 x 1189 mm)</source> <translation>A0 (841 x 1189 мм)</translation> </message> @@ -3744,7 +3713,12 @@ Do you want to delete it anyway?</source> <translation>A3 (297 x 420 мм)</translation> </message> <message> - <location line="+2"/> + <location line="+1"/> + <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source> + <translation>A4 (210 x 297 мм, 8.26 x 11.7 дюймов)</translation> + </message> + <message> + <location line="+1"/> <source>A5 (148 x 210 mm)</source> <translation>A5 (148 x 210 мм)</translation> </message> @@ -3794,7 +3768,12 @@ Do you want to delete it anyway?</source> <translation>B4 (250 x 353 мм)</translation> </message> <message> - <location line="+2"/> + <location line="+1"/> + <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source> + <translation>B5 (176 x 250 мм, 6.93 x 9.84 дюймов)</translation> + </message> + <message> + <location line="+1"/> <source>B6 (125 x 176 mm)</source> <translation>B6 (125 x 176 мм)</translation> </message> @@ -3829,7 +3808,12 @@ Do you want to delete it anyway?</source> <translation>DLE (110 x 220 мм)</translation> </message> <message> - <location line="+2"/> + <location line="+1"/> + <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source> + <translation>Executive (191 x 254 мм, 7.5 x 10 дюймов)</translation> + </message> + <message> + <location line="+1"/> <source>Folio (210 x 330 mm)</source> <translation>Folio (210 x 330 мм)</translation> </message> @@ -3839,88 +3823,87 @@ Do you want to delete it anyway?</source> <translation>Ledger (432 x 279 мм)</translation> </message> <message> - <location line="+3"/> - <source>Tabloid (279 x 432 mm)</source> - <translation>Tabloid (279 x 432 мм)</translation> - </message> - <message> <location line="+1"/> - <source>US Common #10 Envelope (105 x 241 mm)</source> - <translation>Конверт US #10 (105x241 мм)</translation> - </message> - <message> - <location line="-25"/> - <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source> - <translation type="unfinished"></translation> + <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source> + <translation>Legal (216 x 356 мм, 8.5 x 14 дюймов)</translation> </message> <message> - <location line="+11"/> - <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source> - <translation type="unfinished"></translation> + <location line="+1"/> + <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source> + <translation>Letter (216 x 279 мм, 8.5 x 11 дюймов)</translation> </message> <message> - <location line="+8"/> - <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source> - <translation type="unfinished"></translation> + <location line="+1"/> + <source>Tabloid (279 x 432 mm)</source> + <translation>Tabloid (279 x 432 мм)</translation> </message> <message> - <location line="+3"/> - <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source> - <translation type="unfinished"></translation> + <location line="+1"/> + <source>US Common #10 Envelope (105 x 241 mm)</source> + <translation>Конверт US #10 (105x241 мм)</translation> </message> <message> - <location line="+1"/> - <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source> - <translation type="unfinished"></translation> + <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+268"/> + <source>OK</source> + <translation>Готово</translation> </message> <message> <location filename="../src/gui/dialogs/qabstractprintdialog.cpp" line="+110"/> <location line="+13"/> <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="-2"/> <source>Print</source> - <translation type="unfinished">Print</translation> - </message> - <message> - <source>File</source> - <translation type="obsolete">Файл</translation> + <translation>Печатать</translation> </message> <message> <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-357"/> <source>Print To File ...</source> - <translation type="unfinished"></translation> + <translation>Печатать в файл ...</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+19"/> + <source>Print range</source> + <translation>Печатать диапазон</translation> </message> <message> - <location line="+80"/> + <location line="-2"/> + <source>Print all</source> + <translation>Печатать все</translation> + </message> + <message> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+80"/> <source>File %1 is not writable. Please choose a different file name.</source> - <translation type="unfinished"></translation> + <translation>%1 недоступен для записи. +Выберите другое имя файла.</translation> </message> <message> <location line="+4"/> <source>%1 already exists. Do you want to overwrite it?</source> - <translation type="unfinished"></translation> + <translation>%1 уже существует. +Хотите заменить его?</translation> </message> <message> - <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="-208"/> + <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="-227"/> <source>File exists</source> - <translation type="unfinished"></translation> + <translation>Файл существует</translation> </message> <message> <location line="+1"/> <source><qt>Do you want to overwrite it?</qt></source> - <translation type="unfinished"></translation> + <translation><qt>Хотите заменить?</qt></translation> </message> <message> <location line="+227"/> <source>Print selection</source> - <translation type="unfinished"></translation> + <translation>Печатать выделенное</translation> </message> <message> <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-8"/> <source>%1 is a directory. Please choose a different file name.</source> - <translation type="unfinished"></translation> + <translation>%1 - это каталог. +Выберите другое имя файла.</translation> </message> <message> <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="-232"/> @@ -4075,48 +4058,48 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Custom</source> - <translation type="unfinished"></translation> + <translation>Произвольный</translation> </message> <message> - <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-522"/> + <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-524"/> <location line="+68"/> <source>&Options >></source> - <translation type="unfinished"></translation> + <translation>&Параметры >></translation> </message> <message> <location line="-63"/> <source>&Print</source> - <translation type="unfinished"></translation> + <translation>&Печатать</translation> </message> <message> <location line="+67"/> <source>&Options <<</source> - <translation type="unfinished"></translation> + <translation>&Параметры <<</translation> </message> <message> <location line="+253"/> <source>Print to File (PDF)</source> - <translation type="unfinished"></translation> + <translation>Печатать в файл (PDF)</translation> </message> <message> <location line="+1"/> <source>Print to File (Postscript)</source> - <translation type="unfinished"></translation> + <translation>Печатать в файл (Postscript)</translation> </message> <message> - <location line="+45"/> + <location line="+47"/> <source>Local file</source> - <translation type="unfinished"></translation> + <translation>Локальный файл</translation> </message> <message> <location line="+1"/> <source>Write %1 file</source> - <translation type="unfinished"></translation> + <translation>Запись %1 файл</translation> </message> <message> <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+1"/> <source>The 'From' value cannot be greater than the 'To' value.</source> - <translation type="unfinished"></translation> + <translation>Значение 'от' не может быть больше значения 'до'.</translation> </message> </context> <context> @@ -4125,345 +4108,333 @@ Please choose a different file name.</source> <location filename="../src/gui/dialogs/qabstractpagesetupdialog.cpp" line="+68"/> <location line="+12"/> <source>Page Setup</source> - <translation type="unfinished"></translation> + <translation>Свойства страницы</translation> </message> <message> - <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+252"/> + <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+246"/> <source>%1%</source> - <translation type="unfinished"></translation> + <translation>%1%</translation> </message> <message> - <location line="+79"/> + <location line="+68"/> <source>Print Preview</source> - <translation type="unfinished"></translation> + <translation>Просмотр печати</translation> </message> <message> - <location line="+29"/> + <location line="+30"/> <source>Next page</source> - <translation type="unfinished"></translation> + <translation>Следующая страница</translation> </message> <message> <location line="+1"/> <source>Previous page</source> - <translation type="unfinished"></translation> + <translation>Предыдущая страница</translation> </message> <message> <location line="+1"/> <source>First page</source> - <translation type="unfinished"></translation> + <translation>Первая страница</translation> </message> <message> <location line="+1"/> <source>Last page</source> - <translation type="unfinished"></translation> + <translation>Последняя страница</translation> </message> <message> <location line="+9"/> <source>Fit width</source> - <translation type="unfinished"></translation> + <translation>По ширине</translation> </message> <message> <location line="+1"/> <source>Fit page</source> - <translation type="unfinished"></translation> + <translation>На всю страницу</translation> </message> <message> <location line="+11"/> <source>Zoom in</source> - <translation type="unfinished"></translation> + <translation>Увеличить</translation> </message> <message> <location line="+1"/> <source>Zoom out</source> - <translation type="unfinished"></translation> + <translation>Уменьшить</translation> </message> <message> <location line="+6"/> <source>Portrait</source> - <translation type="unfinished">Портрет</translation> + <translation>Книжная</translation> </message> <message> <location line="+1"/> <source>Landscape</source> - <translation type="unfinished">Альбом</translation> + <translation>Альбомная</translation> </message> <message> <location line="+10"/> <source>Show single page</source> - <translation type="unfinished"></translation> + <translation>Показать одну страницу</translation> </message> <message> <location line="+1"/> <source>Show facing pages</source> - <translation type="unfinished"></translation> + <translation>Показать титульные страницы</translation> </message> <message> <location line="+1"/> <source>Show overview of all pages</source> - <translation type="unfinished"></translation> + <translation>Показать обзор всех страниц</translation> </message> <message> <location line="+15"/> <source>Print</source> - <translation type="unfinished">Print</translation> + <translation>Печатать</translation> </message> <message> <location line="+1"/> <source>Page setup</source> - <translation type="unfinished"></translation> + <translation>Свойства страницы</translation> </message> <message> - <location line="+1"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation type="obsolete">Закрыть</translation> </message> <message> - <location line="+151"/> + <location line="+150"/> <source>Export to PDF</source> - <translation type="unfinished"></translation> + <translation>Экспорт в PDF</translation> </message> <message> <location line="+3"/> <source>Export to PostScript</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QPrintPropertiesDialog</name> - <message> - <source>Save</source> - <translation type="obsolete">Сохранить</translation> - </message> - <message> - <source>OK</source> - <translation type="obsolete">OK</translation> + <translation>Экспорт в Postscript</translation> </message> </context> <context> <name>QPrintPropertiesWidget</name> <message> - <location filename="../src/gui/dialogs/qprintpropertieswidget.ui"/> + <location filename="../src/gui/dialogs/qprintpropertieswidget.ui" line="+13"/> <source>Form</source> - <translation type="unfinished"></translation> + <translation>Форма</translation> </message> <message> - <location/> + <location line="+21"/> <source>Page</source> - <translation type="unfinished"></translation> + <translation>Страница</translation> </message> <message> - <location/> + <location line="+10"/> <source>Advanced</source> - <translation type="unfinished"></translation> + <translation>Дополнительно</translation> </message> </context> <context> <name>QPrintSettingsOutput</name> <message> - <location filename="../src/gui/dialogs/qprintsettingsoutput.ui"/> + <location filename="../src/gui/dialogs/qprintsettingsoutput.ui" line="+13"/> <source>Form</source> - <translation type="unfinished"></translation> + <translation>Форма</translation> </message> <message> - <location/> + <location line="+21"/> <source>Copies</source> - <translation type="unfinished"></translation> + <translation>Копии</translation> </message> <message> - <location/> + <location line="+12"/> <source>Print range</source> - <translation type="unfinished">Печатать диапазон</translation> + <translation>Печатать диапазон</translation> </message> <message> - <location/> + <location line="+12"/> <source>Print all</source> - <translation type="unfinished">Печатать все</translation> + <translation>Печатать все</translation> </message> <message> - <location/> + <location line="+18"/> <source>Pages from</source> - <translation type="unfinished"></translation> + <translation>Страницы от</translation> </message> <message> - <location/> + <location line="+20"/> <source>to</source> - <translation type="unfinished"></translation> + <translation>до</translation> </message> <message> - <location/> + <location line="+35"/> <source>Selection</source> - <translation type="unfinished"></translation> + <translation>Выделенные</translation> </message> <message> - <location/> + <location line="+23"/> <source>Output Settings</source> - <translation type="unfinished"></translation> + <translation>Настройки вывода</translation> </message> <message> - <location/> + <location line="+6"/> <source>Copies:</source> - <translation type="unfinished"></translation> + <translation>Количество копий:</translation> </message> <message> - <location/> + <location line="+33"/> <source>Collate</source> - <translation type="unfinished"></translation> + <translation>Разобрать про копиям</translation> </message> <message> - <location/> + <location line="+17"/> <source>Reverse</source> - <translation type="unfinished"></translation> + <translation>Обратный порядок</translation> </message> <message> - <location/> + <location line="+32"/> <source>Options</source> - <translation type="unfinished">Параметры</translation> + <translation>Параметры</translation> </message> <message> - <location/> + <location line="+6"/> <source>Color Mode</source> - <translation type="unfinished"></translation> + <translation>Режим цвета</translation> </message> <message> - <location/> + <location line="+19"/> <source>Color</source> - <translation type="unfinished"></translation> + <translation>Цвет</translation> </message> <message> - <location/> + <location line="+10"/> <source>Grayscale</source> - <translation type="unfinished"></translation> + <translation>Оттенки серого</translation> </message> <message> - <location/> + <location line="+10"/> <source>Duplex Printing</source> - <translation type="unfinished"></translation> + <translation>Двусторонняя печать</translation> </message> <message> - <location/> + <location line="+6"/> <source>None</source> - <translation type="unfinished"></translation> + <translation>Нет</translation> </message> <message> - <location/> + <location line="+10"/> <source>Long side</source> - <translation type="unfinished"></translation> + <translation>По длинной стороне</translation> </message> <message> - <location/> + <location line="+7"/> <source>Short side</source> - <translation type="unfinished"></translation> + <translation>По короткой стороне</translation> </message> </context> <context> <name>QPrintWidget</name> <message> - <location filename="../src/gui/dialogs/qprintwidget.ui"/> + <location filename="../src/gui/dialogs/qprintwidget.ui" line="+13"/> <source>Form</source> - <translation type="unfinished"></translation> + <translation>Форма</translation> </message> <message> - <location/> + <location line="+9"/> <source>Printer</source> - <translation type="unfinished">Принтер</translation> + <translation>Принтер</translation> </message> <message> - <location/> + <location line="+6"/> <source>&Name:</source> - <translation type="unfinished"></translation> + <translation>&Имя:</translation> </message> <message> - <location/> + <location line="+26"/> <source>P&roperties</source> - <translation type="unfinished"></translation> + <translation>С&войства</translation> </message> <message> - <location/> + <location line="+7"/> <source>Location:</source> - <translation type="unfinished"></translation> + <translation>Положение:</translation> </message> <message> - <location/> + <location line="+10"/> <source>Preview</source> - <translation type="unfinished"></translation> + <translation>Предпросмотр</translation> </message> <message> - <location/> + <location line="+7"/> <source>Type:</source> - <translation type="unfinished"></translation> + <translation>Тип:</translation> </message> <message> - <location/> + <location line="+10"/> <source>Output &file:</source> - <translation type="unfinished"></translation> + <translation>Выходной &файл:</translation> </message> <message> - <location/> + <location line="+15"/> <source>...</source> - <translation type="unfinished"></translation> + <translation>...</translation> </message> </context> <context> <name>QProcess</name> <message> - <location filename="../src/corelib/io/qprocess_unix.cpp" line="+475"/> + <location filename="../src/corelib/io/qprocess_unix.cpp" line="+459"/> <location filename="../src/corelib/io/qprocess_win.cpp" line="+147"/> <source>Could not open input redirection for reading</source> - <translation type="unfinished"></translation> + <translation>Не удалось открыть перенаправление ввода для чтения</translation> </message> <message> <location line="+12"/> <location filename="../src/corelib/io/qprocess_win.cpp" line="+36"/> <source>Could not open output redirection for writing</source> - <translation type="unfinished"></translation> + <translation>Не удалось открыть перенаправление вывода для записи</translation> </message> <message> - <location line="+235"/> + <location line="+239"/> <source>Resource error (fork failure): %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка выделения ресурсов (fork не удался): %1</translation> </message> <message> <location line="+259"/> <location line="+53"/> <location line="+74"/> <location line="+67"/> - <location filename="../src/corelib/io/qprocess_win.cpp" line="+422"/> + <location filename="../src/corelib/io/qprocess_win.cpp" line="+447"/> <location line="+50"/> <location line="+75"/> <location line="+42"/> <location line="+54"/> <source>Process operation timed out</source> - <translation type="unfinished"></translation> + <translation>Время на операцию с процессом истекло</translation> </message> <message> - <location filename="../src/corelib/io/qprocess.cpp" line="+533"/> + <location filename="../src/corelib/io/qprocess.cpp" line="+558"/> <location line="+52"/> <location filename="../src/corelib/io/qprocess_win.cpp" line="-211"/> <location line="+50"/> <source>Error reading from process</source> - <translation type="unfinished"></translation> + <translation>Ошибка получения данных от процесса</translation> </message> <message> <location line="+47"/> - <location line="+779"/> + <location line="+833"/> <location filename="../src/corelib/io/qprocess_win.cpp" line="+140"/> <source>Error writing to process</source> - <translation type="unfinished"></translation> + <translation>Ошибка отправки данных процессу</translation> </message> <message> - <location line="-709"/> + <location line="-763"/> <source>Process crashed</source> - <translation type="unfinished"></translation> + <translation>Процесс завершился с ошибкой</translation> </message> <message> - <location line="+912"/> + <location line="+966"/> <source>No program defined</source> - <translation type="unfinished"></translation> + <translation>Программа не указана</translation> </message> <message> <location filename="../src/corelib/io/qprocess_win.cpp" line="-341"/> <source>Process failed to start</source> - <translation type="unfinished"></translation> + <translation>Не удалось запустить процесс</translation> </message> </context> <context> @@ -4479,7 +4450,7 @@ Please choose a different file name.</source> <message> <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="-8"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> </context> <context> @@ -4487,7 +4458,7 @@ Please choose a different file name.</source> <message> <location line="+12"/> <source>Check</source> - <translation type="unfinished"></translation> + <translation>Отметить</translation> </message> </context> <context> @@ -4500,22 +4471,22 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>disabled feature used</source> - <translation>использовались отключенные возможности</translation> + <translation>использование отключённых возможностей</translation> </message> <message> <location line="+1"/> <source>bad char class syntax</source> - <translation>bad char class syntax</translation> + <translation>неправильный синтаксис класса символов</translation> </message> <message> <location line="+1"/> <source>bad lookahead syntax</source> - <translation>bad lookahead syntax</translation> + <translation>неправильный предварительный синтаксис</translation> </message> <message> <location line="+1"/> <source>bad repetition syntax</source> - <translation>bad repetition syntax</translation> + <translation>неправильный синтаксис повторения</translation> </message> <message> <location line="+1"/> @@ -4543,22 +4514,22 @@ Please choose a different file name.</source> <message> <location filename="../src/sql/drivers/sqlite2/qsql_sqlite2.cpp" line="+396"/> <source>Error to open database</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть базу данных</translation> </message> <message> <location line="+41"/> <source>Unable to begin transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно начать транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+17"/> <source>Unable to rollback Transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> </context> <context> @@ -4566,12 +4537,12 @@ Please choose a different file name.</source> <message> <location line="-323"/> <source>Unable to fetch results</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить результат</translation> </message> <message> <location line="+147"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> </context> <context> @@ -4579,27 +4550,27 @@ Please choose a different file name.</source> <message> <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+528"/> <source>Error opening database</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть базу данных</translation> </message> <message> <location line="+11"/> <source>Error closing database</source> - <translation type="unfinished"></translation> + <translation>Невозможно закрыть базу данных</translation> </message> <message> <location line="+20"/> <source>Unable to begin transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно начать транзакцию</translation> </message> <message> <location line="+15"/> <source>Unable to commit transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить транзакцию</translation> </message> <message> <location line="+15"/> <source>Unable to rollback transaction</source> - <translation type="unfinished"></translation> + <translation>Невозможно откатить транзакцию</translation> </message> </context> <context> @@ -4609,32 +4580,32 @@ Please choose a different file name.</source> <location line="+66"/> <location line="+8"/> <source>Unable to fetch row</source> - <translation type="unfinished"></translation> + <translation>Невозможно получить строку</translation> </message> <message> <location line="+63"/> <source>Unable to execute statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно выполнить выражение</translation> </message> <message> <location line="+20"/> <source>Unable to reset statement</source> - <translation type="unfinished"></translation> + <translation>Невозможно сбросить выражение</translation> </message> <message> <location line="+45"/> <source>Unable to bind parameters</source> - <translation type="unfinished"></translation> + <translation>Невозможно привязать параметр</translation> </message> <message> <location line="+7"/> <source>Parameter count mismatch</source> - <translation type="unfinished"></translation> + <translation>Количество параметров не совпадает</translation> </message> <message> <location line="-208"/> <source>No query</source> - <translation type="unfinished"></translation> + <translation>Отсутствует запрос</translation> </message> </context> <context> @@ -4642,302 +4613,302 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/widgets/qscrollbar.cpp" line="+448"/> <source>Scroll here</source> - <translation type="unfinished"></translation> + <translation>Прокрутить сюда</translation> </message> <message> <location line="+2"/> <source>Left edge</source> - <translation type="unfinished"></translation> + <translation>К левой границе</translation> </message> <message> <location line="+0"/> <source>Top</source> - <translation type="unfinished"></translation> + <translation>Вверх</translation> </message> <message> <location line="+1"/> <source>Right edge</source> - <translation type="unfinished"></translation> + <translation>К правой границе</translation> </message> <message> <location line="+0"/> <source>Bottom</source> - <translation type="unfinished"></translation> + <translation>Вниз</translation> </message> <message> <location line="+2"/> <source>Page left</source> - <translation type="unfinished"></translation> + <translation>На страницу влево</translation> </message> <message> <location line="+0"/> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+143"/> <source>Page up</source> - <translation type="unfinished"></translation> + <translation>На страницу вверх</translation> </message> <message> <location line="+1"/> <source>Page right</source> - <translation type="unfinished"></translation> + <translation>На страницу вправо</translation> </message> <message> <location line="+0"/> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+4"/> <source>Page down</source> - <translation type="unfinished"></translation> + <translation>На страницу вниз</translation> </message> <message> <location line="+2"/> <source>Scroll left</source> - <translation type="unfinished"></translation> + <translation>Прокрутить влево</translation> </message> <message> <location line="+0"/> <source>Scroll up</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вверх</translation> </message> <message> <location line="+1"/> <source>Scroll right</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вправо</translation> </message> <message> <location line="+0"/> <source>Scroll down</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вниз</translation> </message> <message> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-6"/> <source>Line up</source> - <translation type="unfinished">Выровнять</translation> + <translation>На строку вверх</translation> </message> <message> <location line="+4"/> <source>Position</source> - <translation type="unfinished"></translation> + <translation>Позиция</translation> </message> <message> <location line="+4"/> <source>Line down</source> - <translation type="unfinished"></translation> + <translation>На строку вниз</translation> </message> </context> <context> <name>QSharedMemory</name> <message> - <location filename="../src/corelib/kernel/qsharedmemory.cpp" line="+207"/> + <location filename="../src/corelib/kernel/qsharedmemory.cpp" line="+211"/> <source>%1: unable to set key on lock</source> - <translation type="unfinished"></translation> + <translation>%1: невозможно установить ключ на блокировку</translation> </message> <message> <location line="+81"/> <source>%1: create size is less then 0</source> - <translation type="unfinished"></translation> + <translation>%1: размер меньше нуля</translation> </message> <message> <location line="+168"/> <location filename="../src/corelib/kernel/qsharedmemory_p.h" line="+148"/> <source>%1: unable to lock</source> - <translation type="unfinished"></translation> + <translation>%1: невозможно заблокировать</translation> </message> <message> <location line="+22"/> <source>%1: unable to unlock</source> - <translation type="unfinished"></translation> + <translation>%1: невозможно разблокировать</translation> </message> <message> - <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+78"/> + <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+80"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+87"/> <source>%1: permission denied</source> - <translation type="unfinished"></translation> + <translation>%1: доступ запрещён</translation> </message> <message> <location line="+4"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-22"/> <source>%1: already exists</source> - <translation type="unfinished"></translation> + <translation>%1: уже существует</translation> </message> <message> <location line="+4"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/> <source>%1: doesn't exists</source> - <translation type="unfinished"></translation> + <translation>%1: не существует</translation> </message> <message> <location line="+6"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/> <source>%1: out of resources</source> - <translation type="unfinished"></translation> + <translation>%1: недостаточно ресурсов</translation> </message> <message> <location line="+4"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+7"/> <source>%1: unknown error %2</source> - <translation type="unfinished"></translation> + <translation>%1: неизвестная ошибка %2</translation> </message> <message> <location line="+21"/> <source>%1: key is empty</source> - <translation type="unfinished"></translation> + <translation>%1: пустой ключ</translation> </message> <message> <location line="+8"/> <source>%1: unix key file doesn't exists</source> - <translation type="unfinished"></translation> + <translation>%1: специфический ключ unix не существует</translation> </message> <message> <location line="+7"/> <source>%1: ftok failed</source> - <translation type="unfinished"></translation> + <translation>%1: ошибка ftok</translation> </message> <message> <location line="+51"/> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+15"/> <source>%1: unable to make key</source> - <translation type="unfinished"></translation> + <translation>%1: невозможно создать ключ</translation> </message> <message> <location line="+20"/> <source>%1: system-imposed size restrictions</source> - <translation type="unfinished"></translation> + <translation>%1: системой наложены ограничения на размер</translation> </message> <message> <location line="+53"/> <source>%1: not attached</source> - <translation type="unfinished"></translation> + <translation>%1: не приложенный</translation> </message> <message> <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-27"/> <source>%1: invalid size</source> - <translation type="unfinished"></translation> + <translation>%1: некорректный размер</translation> </message> <message> <location line="+68"/> <source>%1: key error</source> - <translation type="unfinished"></translation> + <translation>%1: некорректный ключ</translation> </message> <message> <location line="+38"/> <source>%1: size query failed</source> - <translation type="unfinished"></translation> + <translation>%1: не удалось запросить размер</translation> </message> </context> <context> <name>QShortcut</name> <message> - <location filename="../src/gui/kernel/qkeysequence.cpp" line="+373"/> + <location filename="../src/gui/kernel/qkeysequence.cpp" line="+394"/> <source>Space</source> - <translation type="unfinished">Space</translation> + <translation type="unfinished">Пробел</translation> </message> <message> <location line="+1"/> <source>Esc</source> - <translation type="unfinished">Esc</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Tab</source> - <translation type="unfinished">Tab</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Backtab</source> - <translation type="unfinished">Backtab</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Backspace</source> - <translation type="unfinished">Backspace</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Return</source> - <translation type="unfinished">Return</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter</source> - <translation type="unfinished">Enter</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Ins</source> - <translation type="unfinished">Ins</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Del</source> - <translation type="unfinished">Del</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Pause</source> - <translation type="unfinished">Pause</translation> + <translation type="unfinished">Пауза</translation> </message> <message> <location line="+1"/> <source>Print</source> - <translation type="unfinished">Print</translation> + <translation type="unfinished">Печатать</translation> </message> <message> <location line="+1"/> <source>SysReq</source> - <translation type="unfinished">SysReq</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Home</source> - <translation type="unfinished">Home</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>End</source> - <translation type="unfinished">End</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Left</source> - <translation type="unfinished">Left</translation> + <translation type="unfinished">Влево</translation> </message> <message> <location line="+1"/> <source>Up</source> - <translation type="unfinished">Up</translation> + <translation type="unfinished">Вверх</translation> </message> <message> <location line="+1"/> <source>Right</source> - <translation type="unfinished">Right</translation> + <translation type="unfinished">Вправо</translation> </message> <message> <location line="+1"/> <source>Down</source> - <translation type="unfinished">Down</translation> + <translation type="unfinished">Вниз</translation> </message> <message> <location line="+1"/> <source>PgUp</source> - <translation type="unfinished">PgUp</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>PgDown</source> - <translation type="unfinished">PgDown</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>CapsLock</source> - <translation type="unfinished">CapsLock</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>NumLock</source> - <translation type="unfinished">NumLock</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>ScrollLock</source> - <translation type="unfinished">ScrollLock</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> @@ -4962,7 +4933,7 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Stop</source> - <translation type="unfinished">Стоп</translation> + <translation type="unfinished">Остановить</translation> </message> <message> <location line="+1"/> @@ -4972,72 +4943,72 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Volume Down</source> - <translation type="unfinished">Тише</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Volume Mute</source> - <translation type="unfinished">Выключить звук</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Volume Up</source> - <translation type="unfinished">Громче</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Bass Boost</source> - <translation type="unfinished">Bass Boost</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Bass Up</source> - <translation type="unfinished">Bass Up</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Bass Down</source> - <translation type="unfinished">Bass Down</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Treble Up</source> - <translation type="unfinished">Treble Up</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Treble Down</source> - <translation type="unfinished">Treble Down</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Media Play</source> - <translation type="unfinished">Воспроизведение</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Media Stop</source> - <translation type="unfinished">Остановить воспроизведение</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Media Previous</source> - <translation type="unfinished">Воспроизвести предыдущее</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Media Next</source> - <translation type="unfinished">Воспроизвести следующее</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Media Record</source> - <translation type="unfinished">Запись</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Favorites</source> - <translation type="unfinished">Избранное</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> @@ -5047,102 +5018,102 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Standby</source> - <translation type="unfinished">Дежурный режим</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Open URL</source> - <translation type="unfinished">Открыть URL</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch Mail</source> - <translation type="unfinished">Почта</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch Media</source> - <translation type="unfinished">Проигрыватель</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (0)</source> - <translation type="unfinished">Запустить (0)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (1)</source> - <translation type="unfinished">Запустить (1)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (2)</source> - <translation type="unfinished">Запустить (2)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (3)</source> - <translation type="unfinished">Запустить (3)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (4)</source> - <translation type="unfinished">Запустить (4)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (5)</source> - <translation type="unfinished">Запустить (5)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (6)</source> - <translation type="unfinished">Запустить (6)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (7)</source> - <translation type="unfinished">Запустить (7)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (8)</source> - <translation type="unfinished">Запустить (8)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (9)</source> - <translation type="unfinished">Запустить (9)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (A)</source> - <translation type="unfinished">Запустить (A)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (B)</source> - <translation type="unfinished">Запустить (B)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (C)</source> - <translation type="unfinished">Запустить (C)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (D)</source> - <translation type="unfinished">Запустить (D)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (E)</source> - <translation type="unfinished">Запустить (E)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Launch (F)</source> - <translation type="unfinished">Запустить (F)</translation> + <translation type="unfinished"></translation> </message> <message> <location line="+4"/> @@ -5182,12 +5153,12 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Insert</source> - <translation type="unfinished">Вставить</translation> + <translation type="unfinished">Вставка</translation> </message> <message> <location line="+1"/> <source>Delete</source> - <translation type="unfinished">Удалить</translation> + <translation type="unfinished">Удаление</translation> </message> <message> <location line="+1"/> @@ -5250,41 +5221,41 @@ Please choose a different file name.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+527"/> - <location line="+122"/> + <location line="+559"/> + <location line="+135"/> <source>Ctrl</source> - <translation type="unfinished">Ctrl</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="-121"/> - <location line="+125"/> + <location line="-134"/> + <location line="+138"/> <source>Shift</source> - <translation type="unfinished">Shift</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="-124"/> - <location line="+122"/> + <location line="-137"/> + <location line="+135"/> <source>Alt</source> - <translation type="unfinished">Alt</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="-121"/> - <location line="+117"/> + <location line="-134"/> + <location line="+130"/> <source>Meta</source> - <translation type="unfinished">Meta</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="-25"/> + <location line="-40"/> <source>+</source> - <translation type="unfinished">+</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="+46"/> + <location line="+61"/> <source>F%1</source> - <translation type="unfinished">F%1</translation> + <translation type="unfinished"></translation> </message> <message> - <location line="-720"/> + <location line="-765"/> <source>Home Page</source> <translation type="unfinished"></translation> </message> @@ -5294,27 +5265,27 @@ Please choose a different file name.</source> <message> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+151"/> <source>Page left</source> - <translation type="unfinished"></translation> + <translation>Страница влево</translation> </message> <message> <location line="+0"/> <source>Page up</source> - <translation type="unfinished"></translation> + <translation>Страница вверх</translation> </message> <message> <location line="+2"/> <source>Position</source> - <translation type="unfinished"></translation> + <translation>Позиция</translation> </message> <message> <location line="+3"/> <source>Page right</source> - <translation type="unfinished"></translation> + <translation>Страница вправо</translation> </message> <message> <location line="+0"/> <source>Page down</source> - <translation type="unfinished"></translation> + <translation>Страница вниз</translation> </message> </context> <context> @@ -5322,72 +5293,72 @@ Please choose a different file name.</source> <message> <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-67"/> <source>Connection to proxy refused</source> - <translation type="unfinished"></translation> + <translation>В соединении прокси-сервером отказано</translation> </message> <message> <location line="+4"/> <source>Connection to proxy closed prematurely</source> - <translation type="unfinished"></translation> + <translation>Соединение с прокси-сервером неожиданно закрыто</translation> </message> <message> <location line="+4"/> <source>Proxy host not found</source> - <translation type="unfinished"></translation> + <translation>Прокси-сервер не найден</translation> </message> <message> <location line="+5"/> <source>Connection to proxy timed out</source> - <translation type="unfinished"></translation> + <translation>Время на соединение с прокси-сервером истекло</translation> </message> <message> <location line="+17"/> <source>Proxy authentication failed</source> - <translation type="unfinished"></translation> + <translation>Не удалось авторизоваться на прокси-сервере</translation> </message> <message> <location line="+1"/> <source>Proxy authentication failed: %1</source> - <translation type="unfinished"></translation> + <translation>Не удалось авторизоваться на прокси-сервере: %1</translation> </message> <message> <location line="+9"/> <source>SOCKS version 5 protocol error</source> - <translation type="unfinished"></translation> + <translation>Ошибка протокола SOCKSv5</translation> </message> <message> <location line="+19"/> <source>General SOCKSv5 server failure</source> - <translation type="unfinished"></translation> + <translation>Ошибка сервере SOCKSv5</translation> </message> <message> <location line="+4"/> <source>Connection not allowed by SOCKSv5 server</source> - <translation type="unfinished"></translation> + <translation>Соединение не разрешено сервером SOCKSv5</translation> </message> <message> <location line="+16"/> <source>TTL expired</source> - <translation type="unfinished"></translation> + <translation>TTL истекло</translation> </message> <message> <location line="+4"/> <source>SOCKSv5 command not supported</source> - <translation type="unfinished"></translation> + <translation>Команда SOCKSv5 не поддерживается</translation> </message> <message> <location line="+4"/> <source>Address type not supported</source> - <translation type="unfinished"></translation> + <translation>Тип адреса не поддерживается</translation> </message> <message> <location line="+5"/> <source>Unknown SOCKSv5 proxy error code 0x%1</source> - <translation type="unfinished"></translation> + <translation>Неизвестная ошибка SOCKSv5 прокси (код 0x%1)</translation> </message> <message> <location line="+685"/> <source>Network operation timed out</source> - <translation type="unfinished"></translation> + <translation>Время на сетевую операцию истекло</translation> </message> </context> <context> @@ -5395,12 +5366,12 @@ Please choose a different file name.</source> <message> <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-574"/> <source>More</source> - <translation type="unfinished"></translation> + <translation>Больше</translation> </message> <message> <location line="+2"/> <source>Less</source> - <translation type="unfinished"></translation> + <translation>Меньше</translation> </message> </context> <context> @@ -5413,7 +5384,7 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>Delete this record?</source> - <translation>Удалить эту запись?</translation> + <translation>Удалить данную запись?</translation> </message> <message> <location line="+1"/> @@ -5452,7 +5423,7 @@ Please choose a different file name.</source> <message> <location line="+32"/> <source>Confirm</source> - <translation>Подтвердить</translation> + <translation>Подтверждение</translation> </message> <message> <location line="+1"/> @@ -5465,12 +5436,12 @@ Please choose a different file name.</source> <message> <location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+569"/> <source>Unable to write data: %1</source> - <translation type="unfinished"></translation> + <translation>Невозможно записать данные: %1</translation> </message> <message> <location line="+119"/> <source>Error while reading: %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка чтения: %1</translation> </message> <message> <location line="+96"/> @@ -5490,12 +5461,12 @@ Please choose a different file name.</source> <message> <location line="+62"/> <source>Error creating SSL session, %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка создания SSL-сессии, %1</translation> </message> <message> <location line="+15"/> <source>Error creating SSL session: %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка создания SSL-сессии: %1</translation> </message> <message> <location line="-61"/> @@ -5505,12 +5476,12 @@ Please choose a different file name.</source> <message> <location line="+7"/> <source>Error loading local certificate, %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка загрузки локального сертификата, %1</translation> </message> <message> <location line="+12"/> <source>Error loading private key, %1</source> - <translation type="unfinished"></translation> + <translation>Ошибка загрузки приватного ключа, %1</translation> </message> <message> <location line="+7"/> @@ -5519,34 +5490,57 @@ Please choose a different file name.</source> </message> </context> <context> + <name>QStateMachine</name> + <message> + <location filename="../src/corelib/statemachine/qstatemachine.cpp" line="+1003"/> + <source>Missing initial state in compound state '%1'</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>Missing default state in history state '%1'</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>No common ancestor for targets and source of transition from state '%1'</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> + <source>Unknown error</source> + <translation type="unfinished">Неизвестная ошибка</translation> + </message> +</context> +<context> <name>QSystemSemaphore</name> <message> <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="-41"/> <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+66"/> <source>%1: out of resources</source> - <translation type="unfinished"></translation> + <translation>%1: недостаточно ресурсов</translation> </message> <message> <location line="-13"/> <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+4"/> <source>%1: permission denied</source> - <translation type="unfinished"></translation> + <translation>%1: доступ запрещён</translation> </message> <message> <location line="+4"/> <source>%1: already exists</source> - <translation type="unfinished"></translation> + <translation>%1: уже существует</translation> </message> <message> <location line="+4"/> <source>%1: does not exist</source> - <translation type="unfinished"></translation> + <translation>%1: не существует</translation> </message> <message> <location line="+9"/> <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+3"/> <source>%1: unknown error %2</source> - <translation type="unfinished"></translation> + <translation>%1: неизвестная ошибка %2</translation> </message> </context> <context> @@ -5554,12 +5548,12 @@ Please choose a different file name.</source> <message> <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+584"/> <source>Unable to open connection</source> - <translation type="unfinished"></translation> + <translation>Невозможно открыть соединение</translation> </message> <message> <location line="+5"/> <source>Unable to use database</source> - <translation type="unfinished"></translation> + <translation>Невозможно использовать базу данных</translation> </message> </context> <context> @@ -5567,12 +5561,12 @@ Please choose a different file name.</source> <message> <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="-326"/> <source>Scroll Left</source> - <translation type="unfinished"></translation> + <translation>Прокрутить влево</translation> </message> <message> <location line="+0"/> <source>Scroll Right</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вправо</translation> </message> </context> <context> @@ -5580,7 +5574,7 @@ Please choose a different file name.</source> <message> <location filename="../src/network/socket/qtcpserver.cpp" line="+282"/> <source>Operation on socket is not supported</source> - <translation type="unfinished"></translation> + <translation>Операция с сокетом не поддерживается</translation> </message> </context> <context> @@ -5588,42 +5582,42 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/text/qtextcontrol.cpp" line="+1973"/> <source>&Undo</source> - <translation type="unfinished">&Отменить</translation> + <translation>&Отменить действие</translation> </message> <message> <location line="+2"/> <source>&Redo</source> - <translation type="unfinished">&Повторить</translation> + <translation>&Повторить действие</translation> </message> <message> <location line="+4"/> <source>Cu&t</source> - <translation type="unfinished">&Вырезать</translation> + <translation>&Вырезать</translation> </message> <message> <location line="+5"/> <source>&Copy</source> - <translation type="unfinished">&Копировать</translation> + <translation>&Копировать</translation> </message> <message> <location line="+7"/> <source>Copy &Link Location</source> - <translation type="unfinished"></translation> + <translation>Скопировать &адрес ссылки</translation> </message> <message> <location line="+6"/> <source>&Paste</source> - <translation type="unfinished">&Вставить</translation> + <translation>В&ставить</translation> </message> <message> <location line="+3"/> <source>Delete</source> - <translation type="unfinished">Удалить</translation> + <translation>Удалить</translation> </message> <message> <location line="+7"/> <source>Select All</source> - <translation type="unfinished">Выделить все</translation> + <translation>Выделить все</translation> </message> </context> <context> @@ -5632,13 +5626,13 @@ Please choose a different file name.</source> <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+254"/> <location line="+6"/> <source>Press</source> - <translation type="unfinished"></translation> + <translation>Нажать</translation> </message> <message> <location line="-4"/> <location line="+8"/> <source>Open</source> - <translation type="unfinished">Открыть</translation> + <translation>Открыть</translation> </message> </context> <context> @@ -5646,7 +5640,7 @@ Please choose a different file name.</source> <message> <location filename="../src/network/socket/qudpsocket.cpp" line="+169"/> <source>This platform does not support IPv6</source> - <translation type="unfinished"></translation> + <translation>Данная платформа не поддерживает IPv6</translation> </message> </context> <context> @@ -5654,12 +5648,12 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/util/qundogroup.cpp" line="+386"/> <source>Undo</source> - <translation type="unfinished">Отменить</translation> + <translation>Отменить действие</translation> </message> <message> <location line="+28"/> <source>Redo</source> - <translation type="unfinished">Повторить</translation> + <translation>Повторить действие</translation> </message> </context> <context> @@ -5667,7 +5661,7 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/util/qundoview.cpp" line="+101"/> <source><empty></source> - <translation type="unfinished"></translation> + <translation><пусто></translation> </message> </context> <context> @@ -5675,12 +5669,12 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/util/qundostack.cpp" line="+834"/> <source>Undo</source> - <translation type="unfinished">Отменить</translation> + <translation>Отменить действие</translation> </message> <message> <location line="+27"/> <source>Redo</source> - <translation type="unfinished">Повторить</translation> + <translation>Повторить действие</translation> </message> </context> <context> @@ -5746,160 +5740,160 @@ Please choose a different file name.</source> <message> <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+692"/> <source>Request cancelled</source> - <translation type="unfinished"></translation> + <translation>Запрос отменён</translation> </message> <message> <location line="+17"/> <source>Request blocked</source> - <translation type="unfinished"></translation> + <translation>Запрос блокирован</translation> </message> <message> <location line="+7"/> <source>Cannot show URL</source> - <translation type="unfinished"></translation> + <translation>Невозможно отобразить URL</translation> </message> <message> <location line="+6"/> <source>Frame load interruped by policy change</source> - <translation type="unfinished"></translation> + <translation>Загрузка фрэйма прервана изменением политики</translation> </message> <message> <location line="+6"/> <source>Cannot show mimetype</source> - <translation type="unfinished"></translation> + <translation>Невозможно отобразить тип MIME</translation> </message> <message> <location line="+6"/> <source>File does not exist</source> - <translation type="unfinished"></translation> + <translation>Файл не существует</translation> </message> </context> <context> <name>QWebPage</name> <message> - <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+382"/> + <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+385"/> <source>Bad HTTP request</source> - <translation type="unfinished"></translation> + <translation>Некорректный HTTP-запрос</translation> </message> <message> <location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="+42"/> <source>Submit</source> <comment>default label for Submit buttons in forms on web pages</comment> - <translation type="unfinished"></translation> + <translation>Отправить</translation> </message> <message> <location line="+5"/> <source>Submit</source> <comment>Submit (input element) alt text for <input> elements with no alt, title, or value</comment> - <translation type="unfinished"></translation> + <translation>Отправить</translation> </message> <message> <location line="+5"/> <source>Reset</source> <comment>default label for Reset buttons in forms on web pages</comment> - <translation type="unfinished"></translation> + <translation>Сбросить</translation> </message> <message> <location line="+10"/> <source>This is a searchable index. Enter search keywords: </source> <comment>text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'</comment> - <translation type="unfinished"></translation> + <translation>Индекс поиска. Введите ключевые слова для поиска: </translation> </message> <message> <location line="+5"/> <source>Choose File</source> <comment>title for file button used in HTML forms</comment> - <translation type="unfinished"></translation> + <translation>Обзор...</translation> </message> <message> <location line="+5"/> <source>No file selected</source> <comment>text to display in file button used in HTML forms when no file is selected</comment> - <translation type="unfinished"></translation> + <translation>Файл не указан</translation> </message> <message> <location line="+5"/> <source>Open in New Window</source> <comment>Open in New Window context menu item</comment> - <translation type="unfinished"></translation> + <translation>Открыть в новом окне</translation> </message> <message> <location line="+5"/> <source>Save Link...</source> <comment>Download Linked File context menu item</comment> - <translation type="unfinished"></translation> + <translation>Сохранить по ссылке как...</translation> </message> <message> <location line="+5"/> <source>Copy Link</source> <comment>Copy Link context menu item</comment> - <translation type="unfinished"></translation> + <translation>Копировать адрес ссылки</translation> </message> <message> <location line="+5"/> <source>Open Image</source> <comment>Open Image in New Window context menu item</comment> - <translation type="unfinished"></translation> + <translation>Открыть изображение</translation> </message> <message> <location line="+5"/> <source>Save Image</source> <comment>Download Image context menu item</comment> - <translation type="unfinished"></translation> + <translation>Сохранить изображение</translation> </message> <message> <location line="+5"/> <source>Copy Image</source> <comment>Copy Link context menu item</comment> - <translation type="unfinished"></translation> + <translation>Копировать изображение в буффер обмена</translation> </message> <message> <location line="+5"/> <source>Open Frame</source> <comment>Open Frame in New Window context menu item</comment> - <translation type="unfinished"></translation> + <translation>Открыть фрэйм</translation> </message> <message> <location line="+5"/> <source>Copy</source> <comment>Copy context menu item</comment> - <translation type="unfinished"></translation> + <translation>Копировать</translation> </message> <message> <location line="+5"/> <source>Go Back</source> <comment>Back context menu item</comment> - <translation type="unfinished"></translation> + <translation>Назад</translation> </message> <message> <location line="+5"/> <source>Go Forward</source> <comment>Forward context menu item</comment> - <translation type="unfinished"></translation> + <translation>Вперед</translation> </message> <message> <location line="+5"/> <source>Stop</source> <comment>Stop context menu item</comment> - <translation type="unfinished">Стоп</translation> + <translation>Остановить</translation> </message> <message> <location line="+5"/> <source>Reload</source> <comment>Reload context menu item</comment> - <translation type="unfinished"></translation> + <translation>Обновить</translation> </message> <message> <location line="+5"/> <source>Cut</source> <comment>Cut context menu item</comment> - <translation type="unfinished"></translation> + <translation>Вырезать</translation> </message> <message> <location line="+5"/> <source>Paste</source> <comment>Paste context menu item</comment> - <translation type="unfinished"></translation> + <translation>Вставить</translation> </message> <message> <location line="+5"/> @@ -5911,7 +5905,7 @@ Please choose a different file name.</source> <location line="+5"/> <source>Ignore</source> <comment>Ignore Spelling context menu item</comment> - <translation type="unfinished"></translation> + <translation type="unfinished">Игнорировать</translation> </message> <message> <location line="+5"/> @@ -5935,13 +5929,13 @@ Please choose a different file name.</source> <location line="+5"/> <source>Open Link</source> <comment>Open Link context menu item</comment> - <translation type="unfinished"></translation> + <translation>Открыть ссылку</translation> </message> <message> <location line="+5"/> <source>Ignore</source> <comment>Ignore Grammar context menu item</comment> - <translation type="unfinished"></translation> + <translation type="unfinished">Игнорировать</translation> </message> <message> <location line="+5"/> @@ -5983,97 +5977,97 @@ Please choose a different file name.</source> <location line="+5"/> <source>Fonts</source> <comment>Font context sub-menu item</comment> - <translation type="unfinished"></translation> + <translation>Шрифты</translation> </message> <message> <location line="+5"/> <source>Bold</source> <comment>Bold context menu item</comment> - <translation type="unfinished"></translation> + <translation>Жирный</translation> </message> <message> <location line="+5"/> <source>Italic</source> <comment>Italic context menu item</comment> - <translation type="unfinished"></translation> + <translation>Курсив</translation> </message> <message> <location line="+5"/> <source>Underline</source> <comment>Underline context menu item</comment> - <translation type="unfinished"></translation> + <translation>Подчёркнутый</translation> </message> <message> <location line="+5"/> <source>Outline</source> <comment>Outline context menu item</comment> - <translation type="unfinished"></translation> + <translation>Перечёркнутый</translation> </message> <message> <location line="+5"/> <source>Direction</source> <comment>Writing direction context sub-menu item</comment> - <translation type="unfinished"></translation> + <translation>Направление</translation> </message> <message> <location line="+5"/> <source>Text Direction</source> <comment>Text direction context sub-menu item</comment> - <translation type="unfinished"></translation> + <translation>Направление текста</translation> </message> <message> <location line="+5"/> <source>Default</source> <comment>Default writing direction context menu item</comment> - <translation type="unfinished"></translation> + <translation>По умолчанию</translation> </message> <message> <location line="+5"/> <source>LTR</source> <comment>Left to Right context menu item</comment> - <translation type="unfinished"></translation> + <translation>Слева направо</translation> </message> <message> <location line="+5"/> <source>RTL</source> <comment>Right to Left context menu item</comment> - <translation type="unfinished"></translation> + <translation>Справа налево</translation> </message> <message> <location line="+5"/> <source>Inspect</source> <comment>Inspect Element context menu item</comment> - <translation type="unfinished"></translation> + <translation>Проверить</translation> </message> <message> <location line="+5"/> <source>No recent searches</source> <comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment> - <translation type="unfinished"></translation> + <translation>История поиска пуста</translation> </message> <message> <location line="+5"/> <source>Recent searches</source> <comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment> - <translation type="unfinished"></translation> + <translation>История поиска</translation> </message> <message> <location line="+5"/> <source>Clear recent searches</source> <comment>menu item in Recent Searches menu that empties menu's contents</comment> - <translation type="unfinished"></translation> + <translation>Очистить историю поиска</translation> </message> <message> <location line="+75"/> <source>Unknown</source> <comment>Unknown filesize FTP directory listing item</comment> - <translation type="unfinished"></translation> + <translation>Неизвестно</translation> </message> <message> <location line="+5"/> <source>%1 (%2x%3 pixels)</source> <comment>Title string for images</comment> - <translation type="unfinished"></translation> + <translation>%1 (%2x%3 px)</translation> </message> <message> <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+185"/> @@ -6083,74 +6077,76 @@ Please choose a different file name.</source> <message> <location filename="../src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp" line="+58"/> <source>Scroll here</source> - <translation type="unfinished"></translation> + <translation>Прокрутить сюда</translation> </message> <message> <location line="+3"/> <source>Left edge</source> - <translation type="unfinished"></translation> + <translation>К левой границе</translation> </message> <message> <location line="+0"/> <source>Top</source> - <translation type="unfinished"></translation> + <translation>Вверх</translation> </message> <message> <location line="+1"/> <source>Right edge</source> - <translation type="unfinished"></translation> + <translation>К правой границе</translation> </message> <message> <location line="+0"/> <source>Bottom</source> - <translation type="unfinished"></translation> + <translation>Вниз</translation> </message> <message> <location line="+3"/> <source>Page left</source> - <translation type="unfinished"></translation> + <translation>На страницу влево</translation> </message> <message> <location line="+0"/> <source>Page up</source> - <translation type="unfinished"></translation> + <translation>На страницу вверх</translation> </message> <message> <location line="+1"/> <source>Page right</source> - <translation type="unfinished"></translation> + <translation>На страницу вправо</translation> </message> <message> <location line="+0"/> <source>Page down</source> - <translation type="unfinished"></translation> + <translation>На страницу вниз</translation> </message> <message> <location line="+3"/> <source>Scroll left</source> - <translation type="unfinished"></translation> + <translation>Прокрутить влево</translation> </message> <message> <location line="+0"/> <source>Scroll up</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вверх</translation> </message> <message> <location line="+1"/> <source>Scroll right</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вправо</translation> </message> <message> <location line="+0"/> <source>Scroll down</source> - <translation type="unfinished"></translation> + <translation>Прокрутить вниз</translation> </message> <message numerus="yes"> <location filename="../src/3rdparty/webkit/WebCore/platform/qt/FileChooserQt.cpp" line="+45"/> <source>%n file(s)</source> <comment>number of chosen file</comment> - <translation type="unfinished"> - <numerusform></numerusform> + <translation> + <numerusform>%n файл(а)</numerusform> + <numerusform>%n файла</numerusform> + <numerusform>%n файлов</numerusform> </translation> </message> <message> @@ -6169,149 +6165,149 @@ Please choose a different file name.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+333"/> + <location line="+340"/> <source>Move the cursor to the next character</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель к следующему символу</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the previous character</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель к предыдущему символу</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the next word</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель к следующему слову</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the previous word</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель к предыдущему слову</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the next line</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель на следующую строку</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the previous line</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель на предыдущую строку</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the start of the line</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в начало строки</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the end of the line</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в конец строки</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the start of the block</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в начало блока</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the end of the block</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в конец блока</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the start of the document</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в начало документа</translation> </message> <message> <location line="+3"/> <source>Move the cursor to the end of the document</source> - <translation type="unfinished"></translation> + <translation>Переместить указатель в конец документа</translation> </message> <message> <location line="+3"/> <source>Select all</source> - <translation type="unfinished"></translation> + <translation>Выделить всё</translation> </message> <message> <location line="+3"/> <source>Select to the next character</source> - <translation type="unfinished"></translation> + <translation>Выделить до следующего символа</translation> </message> <message> <location line="+3"/> <source>Select to the previous character</source> - <translation type="unfinished"></translation> + <translation>Выделить до предыдущего символа</translation> </message> <message> <location line="+3"/> <source>Select to the next word</source> - <translation type="unfinished"></translation> + <translation>Выделить до следующего слова</translation> </message> <message> <location line="+3"/> <source>Select to the previous word</source> - <translation type="unfinished"></translation> + <translation>Выделить до предыдущего слова</translation> </message> <message> <location line="+3"/> <source>Select to the next line</source> - <translation type="unfinished"></translation> + <translation>Выделить до следующей строки</translation> </message> <message> <location line="+3"/> <source>Select to the previous line</source> - <translation type="unfinished"></translation> + <translation>Выделить до предыдущей строки</translation> </message> <message> <location line="+3"/> <source>Select to the start of the line</source> - <translation type="unfinished"></translation> + <translation>Выделить до начала строки</translation> </message> <message> <location line="+3"/> <source>Select to the end of the line</source> - <translation type="unfinished"></translation> + <translation>Выделить до конца строки</translation> </message> <message> <location line="+3"/> <source>Select to the start of the block</source> - <translation type="unfinished"></translation> + <translation>Выделить до начала блока</translation> </message> <message> <location line="+3"/> <source>Select to the end of the block</source> - <translation type="unfinished"></translation> + <translation>Выделить до конца блока</translation> </message> <message> <location line="+3"/> <source>Select to the start of the document</source> - <translation type="unfinished"></translation> + <translation>Выделить до начала документа</translation> </message> <message> <location line="+3"/> <source>Select to the end of the document</source> - <translation type="unfinished"></translation> + <translation>Выделить до конца документа</translation> </message> <message> <location line="+3"/> <source>Delete to the start of the word</source> - <translation type="unfinished"></translation> + <translation>Удалить до начала слова</translation> </message> <message> <location line="+3"/> <source>Delete to the end of the word</source> - <translation type="unfinished"></translation> + <translation>Удалить до конца слова</translation> </message> <message> <location line="+33"/> <source>Insert a new paragraph</source> - <translation type="unfinished"></translation> + <translation>Вставить новый параграф</translation> </message> <message> <location line="+3"/> <source>Insert a new line</source> - <translation type="unfinished"></translation> + <translation>Вставить новую строку</translation> </message> </context> <context> @@ -6319,77 +6315,73 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/kernel/qwhatsthis.cpp" line="+522"/> <source>What's This?</source> - <translation type="unfinished">Что это?</translation> + <translation>Что это?</translation> </message> </context> <context> <name>QWidget</name> <message> - <location filename="../src/gui/kernel/qwidget.cpp" line="+5326"/> + <location filename="../src/gui/kernel/qwidget.cpp" line="+5301"/> <source>*</source> - <translation type="unfinished"></translation> + <translation>*</translation> </message> </context> <context> <name>QWizard</name> <message> <location filename="../src/gui/dialogs/qwizard.cpp" line="+637"/> - <source>< &Back</source> - <translation type="unfinished">< &Назад</translation> - </message> - <message> - <location line="+10"/> - <source>&Finish</source> - <translation type="unfinished">&Финиш</translation> - </message> - <message> - <location line="+4"/> - <source>&Help</source> - <translation type="unfinished">&Справка</translation> - </message> - <message> - <location line="-14"/> <source>Go Back</source> - <translation type="unfinished"></translation> + <translation>Назад</translation> </message> <message> <location line="+3"/> <source>Continue</source> - <translation type="unfinished"></translation> + <translation>Продолжить</translation> </message> <message> <location line="+5"/> <source>Commit</source> - <translation type="unfinished"></translation> + <translation>Отправить</translation> </message> <message> <location line="+2"/> <source>Done</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Quit</source> - <translation type="obsolete">Выход</translation> + <translation>Готово</translation> </message> <message> <location line="+4"/> <source>Help</source> - <translation type="unfinished">Справка</translation> + <translation>Справка</translation> </message> <message> - <location line="-2"/> + <location line="-14"/> + <source>< &Back</source> + <translation>< &Назад</translation> + </message> + <message> + <location line="+10"/> + <source>&Finish</source> + <translation>&Закончить</translation> + </message> + <message> + <location line="+2"/> <source>Cancel</source> - <translation type="unfinished">Отмена</translation> + <translation>Отмена</translation> </message> <message> - <location line="-6"/> + <location line="+2"/> + <source>&Help</source> + <translation>&Справка</translation> + </message> + <message> + <location line="-8"/> <source>&Next</source> - <translation type="unfinished"></translation> + <translation>&Вперед</translation> </message> <message> <location line="+0"/> <source>&Next ></source> - <translation type="unfinished">&Вперед ></translation> + <translation>&Вперед ></translation> </message> </context> <context> @@ -6397,43 +6389,43 @@ Please choose a different file name.</source> <message> <location filename="../src/gui/widgets/qworkspace.cpp" line="+1094"/> <source>&Restore</source> - <translation type="unfinished">&Восстановить</translation> + <translation>&Восстановить</translation> </message> <message> <location line="+1"/> <source>&Move</source> - <translation type="unfinished">&Переместить</translation> + <translation>&Переместить</translation> </message> <message> <location line="+1"/> <source>&Size</source> - <translation type="unfinished">&Размер</translation> + <translation>&Размер</translation> </message> <message> <location line="+2"/> <source>Mi&nimize</source> - <translation type="unfinished">&Свернуть</translation> + <translation>&Минимизировать</translation> </message> <message> <location line="+2"/> <source>Ma&ximize</source> - <translation type="unfinished">Р&азвернуть</translation> + <translation>Р&аспахнуть</translation> </message> <message> <location line="+2"/> <source>&Close</source> - <translation type="unfinished">&Закрыть</translation> + <translation>&Закрыть</translation> </message> <message> <location line="+6"/> <source>Stay on &Top</source> - <translation type="unfinished">Всегда &наверху</translation> + <translation>Оставаться &сверху</translation> </message> <message> <location line="+3"/> <location line="+1059"/> <source>Sh&ade</source> - <translation type="unfinished">Свернуть в за&головок</translation> + <translation>Св&ернуть в заголовок</translation> </message> <message> <location line="-278"/> @@ -6444,22 +6436,22 @@ Please choose a different file name.</source> <message> <location line="-1837"/> <source>Minimize</source> - <translation type="unfinished">Свернуть</translation> + <translation>Минимизировать</translation> </message> <message> <location line="+2"/> <source>Restore Down</source> - <translation type="unfinished">Восстановить</translation> + <translation>Восстановить</translation> </message> <message> <location line="-4"/> <source>Close</source> - <translation type="unfinished">Закрыть</translation> + <translation>Закрыть</translation> </message> <message> <location line="+2053"/> <source>&Unshade</source> - <translation type="unfinished">Восстановить из за&головка</translation> + <translation>В&осстановить из заголовка</translation> </message> </context> <context> @@ -6472,7 +6464,7 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>error triggered by consumer</source> - <translation>ошибка инициирована пользователем</translation> + <translation>ошибка вызвана пользователем</translation> </message> <message> <location line="+1"/> @@ -6482,22 +6474,22 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>more than one document type definition</source> - <translation>определен более, чем один тип документов</translation> + <translation>указано более одного типа документа</translation> </message> <message> <location line="+1"/> <source>error occurred while parsing element</source> - <translation>в процессе грамматического разбора элемента произошла ошибка</translation> + <translation>ошибка разбора элемента</translation> </message> <message> <location line="+1"/> <source>tag mismatch</source> - <translation>отсутствует тег</translation> + <translation>тэг не совпадает</translation> </message> <message> <location line="+1"/> <source>error occurred while parsing content</source> - <translation>в процессе грамматического разбора произошла ошибка</translation> + <translation>ошибка разбора документа</translation> </message> <message> <location line="+1"/> @@ -6507,101 +6499,101 @@ Please choose a different file name.</source> <message> <location line="+1"/> <source>invalid name for processing instruction</source> - <translation>некорректное имя директивы</translation> + <translation>некорректное имя директивы разбора</translation> </message> <message> <location line="+1"/> <source>version expected while reading the XML declaration</source> - <translation>при чтении XML-тега ожидался параметр version</translation> + <translation>в объявлении XML ожидается объявление параметра version</translation> </message> <message> <location line="+1"/> <source>wrong value for standalone declaration</source> - <translation>некорректное значение параметра standalone</translation> + <translation>некорректное значение объявления standalone</translation> </message> <message> <location line="+1"/> <source>encoding declaration or standalone declaration expected while reading the XML declaration</source> - <translation>при чтении XML-тега ожидался параметр encoding или параметр standalone</translation> + <translation>в объявлении XML ожидается объявление параметра encoding или standalone</translation> </message> <message> <location line="+1"/> <source>standalone declaration expected while reading the XML declaration</source> - <translation>при чтении XML-тега ожидался параметр standalone</translation> + <translation>в объявлении XML ожидается объявление параметра standalone</translation> </message> <message> <location line="+1"/> <source>error occurred while parsing document type definition</source> - <translation>в процессе грамматического разбора типа документа произошла ошибка</translation> + <translation>ошибка разбора объявления типа документа</translation> </message> <message> <location line="+1"/> <source>letter is expected</source> - <translation>ожидался символ</translation> + <translation>ожидалась буква</translation> </message> <message> <location line="+1"/> <source>error occurred while parsing comment</source> - <translation>в процессе грамматического разбора комментария произошла ошибка</translation> + <translation>ошибка разбора комментария</translation> </message> <message> <location line="+1"/> <source>error occurred while parsing reference</source> - <translation>в процессе грамматического разбора ссылки произошла ошибка</translation> + <translation>ошибка разбора ссылки</translation> </message> <message> <location line="+1"/> <source>internal general entity reference not allowed in DTD</source> - <translation>internal general entity reference not allowed in DTD</translation> + <translation>внутренняя ссылка на общий объкт недопустима в DTD</translation> </message> <message> <location line="+1"/> <source>external parsed general entity reference not allowed in attribute value</source> - <translation>external parsed general entity reference not allowed in attribute value</translation> + <translation>внешняя ссылка на общий объект недопустима в значении атрибута</translation> </message> <message> <location line="+1"/> <source>external parsed general entity reference not allowed in DTD</source> - <translation>external parsed general entity reference not allowed in DTD</translation> + <translation>внешняя ссылка на общий объект недопустима в DTD</translation> </message> <message> <location line="+1"/> <source>unparsed entity reference in wrong context</source> - <translation>unparsed entity reference in wrong context</translation> + <translation>неразобранная ссылка на объект в неправильном контексте</translation> </message> <message> <location line="+1"/> <source>recursive entities</source> - <translation>рекурсивные объекты</translation> + <translation>рекурсия объектов</translation> </message> <message> <location line="+1"/> <source>error in the text declaration of an external entity</source> - <translation>error in the text declaration of an external entity</translation> + <translation>ошибка в объявлении внешнего объекта</translation> </message> </context> <context> <name>QXmlStream</name> <message> <location filename="../src/corelib/xml/qxmlstream.cpp" line="+592"/> - <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1769"/> + <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1770"/> <source>Extra content at end of document.</source> <translation type="unfinished"></translation> </message> <message> <location line="+222"/> <source>Invalid entity value.</source> - <translation type="unfinished"></translation> + <translation>Некорректное значение объекта.</translation> </message> <message> <location line="+107"/> <source>Invalid XML character.</source> - <translation type="unfinished"></translation> + <translation>Некорректный символ XML.</translation> </message> <message> <location line="+259"/> <source>Sequence ']]>' not allowed in content.</source> - <translation type="unfinished"></translation> + <translation>Последовательность ']]>' не допускается в содержимом.</translation> </message> <message> <location line="+309"/> @@ -6626,7 +6618,7 @@ Please choose a different file name.</source> <message> <location line="+2"/> <source>Unsupported XML version.</source> - <translation type="unfinished"></translation> + <translation>Неподдерживаемая версия XML.</translation> </message> <message> <location line="+23"/> @@ -6641,37 +6633,37 @@ Please choose a different file name.</source> <message> <location line="+16"/> <source>Standalone accepts only yes or no.</source> - <translation type="unfinished"></translation> + <translation>Псевдоатрибут 'standalone' может принимать только значение yes или no.</translation> </message> <message> <location line="+2"/> <source>Invalid attribute in XML declaration.</source> - <translation type="unfinished"></translation> + <translation>Некорректный атрибут в объявлении XML.</translation> </message> <message> <location line="+16"/> <source>Premature end of document.</source> - <translation type="unfinished"></translation> + <translation>Неожиданный конец документа.</translation> </message> <message> <location line="+2"/> <source>Invalid document.</source> - <translation type="unfinished"></translation> + <translation>Некорректный документ.</translation> </message> <message> <location line="+40"/> <source>Expected </source> - <translation type="unfinished"></translation> + <translation>Ожидалось </translation> </message> <message> <location line="+11"/> <source>, but got '</source> - <translation type="unfinished"></translation> + <translation>, получили '</translation> </message> <message> <location line="+4"/> <source>Unexpected '</source> - <translation type="unfinished"></translation> + <translation>Неожиданное '</translation> </message> <message> <location line="+210"/> @@ -6686,7 +6678,7 @@ Please choose a different file name.</source> <message> <location line="+516"/> <source>Start tag expected.</source> - <translation type="unfinished"></translation> + <translation>Ожидается начало тэга.</translation> </message> <message> <location line="+222"/> @@ -6719,12 +6711,12 @@ Please choose a different file name.</source> <message> <location filename="../src/corelib/xml/qxmlstream_p.h" line="+15"/> <source>Invalid XML name.</source> - <translation type="unfinished"></translation> + <translation>Некорректное имя XML.</translation> </message> <message> <location line="+23"/> <source>Opening and ending tag mismatch.</source> - <translation type="unfinished"></translation> + <translation>Открывающий тэг не совпадает с закрывающим.</translation> </message> <message> <location line="+18"/> @@ -6757,7 +6749,7 @@ Please choose a different file name.</source> <message> <location line="+274"/> <source>The standalone pseudo attribute must appear after the encoding.</source> - <translation type="unfinished"></translation> + <translation>Псевдоатрибут 'standalone' должен находиться после указания кодировки.</translation> </message> <message> <location filename="../src/corelib/xml/qxmlstream_p.h" line="+562"/> @@ -6788,11 +6780,6 @@ Please choose a different file name.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+60"/> - <source>Attribute %1 can't be serialized because it appears at the top level.</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../src/xmlpatterns/data/qabstractdatetime.cpp" line="+80"/> <source>Year %1 is invalid because it begins with %2.</source> <translation type="unfinished"></translation> @@ -7070,6 +7057,8 @@ Please choose a different file name.</source> <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source> <translation type="unfinished"> <numerusform></numerusform> + <numerusform></numerusform> + <numerusform></numerusform> </translation> </message> <message numerus="yes"> @@ -7077,6 +7066,8 @@ Please choose a different file name.</source> <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source> <translation type="unfinished"> <numerusform></numerusform> + <numerusform></numerusform> + <numerusform></numerusform> </translation> </message> <message> @@ -7165,7 +7156,7 @@ Please choose a different file name.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+347"/> + <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+346"/> <source>It will not be possible to retrieve %1.</source> <translation type="unfinished"></translation> </message> @@ -7568,6 +7559,11 @@ Please choose a different file name.</source> <translation type="unfinished"></translation> </message> <message> + <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+60"/> + <source>Attribute %1 can't be serialized because it appears at the top level.</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp" line="+314"/> <source>%1 is an unsupported encoding.</source> <translation type="unfinished"></translation> @@ -7809,13 +7805,13 @@ Please choose a different file name.</source> <message> <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+67"/> <source>Muted</source> - <translation type="unfinished"></translation> + <translation>Без звука</translation> </message> <message> <location line="+5"/> <location line="+15"/> <source>Volume: %1%</source> - <translation type="unfinished"></translation> + <translation>Громкость: %1%</translation> </message> </context> </TS> diff --git a/translations/translations.pri b/translations/translations.pri index 20d4467..480849f 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -21,7 +21,7 @@ LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease) ###### Qt Libraries -QT_TS = de fr zh_CN untranslated ar es iw ja_JP pl pt ru sk sv uk zh_TW +QT_TS = de fr zh_CN untranslated ar es iw ja_JP pl pt ru sk sv uk zh_TW da ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ -I../include -I../include/Qt \ diff --git a/util/normalize/main.cpp b/util/normalize/main.cpp index 905c1ec..b16335e 100644 --- a/util/normalize/main.cpp +++ b/util/normalize/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ #include <qcoreapplication.h> -#include <qdir.h> +#include <qdiriterator.h> #include <qfile.h> #include <qmetaobject.h> #include <qstring.h> @@ -140,18 +140,14 @@ void check(const QString &fileName) void traverse(const QString &path) { - QDir dir(path); - dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoSymLinks); - - const QFileInfoList list = dir.entryInfoList(); - for (int i = 0; i < list.count(); ++i) { - const QFileInfo fi = list.at(i); - if (fi.fileName() == QLatin1String(".") || fi.fileName() == QLatin1String("..")) - continue; - if (fi.fileName().endsWith(".cpp")) - check(path + fi.fileName()); - if (fi.isDir()) - traverse(path + fi.fileName() + "/"); // recurse + QDirIterator dirIterator(path, QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks); + + while (dirIterator.hasNext()) { + QString filePath = dirIterator.next(); + if (filePath.endsWith(".cpp")) + check(filePath); + else if (QFileInfo(filePath).isDir()) + traverse(filePath); // recurse } } |