From c9ae652487514acd19f3631224ced7ac14f756c8 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Tue, 22 Jan 2013 17:41:46 +0400 Subject: QPdfEnginePrivate: Fix invalid format for rectangles on some locales This is done by using locale-independent QByteArray::setNum() instead of qvsnprintf() for printing doubles. Task-number: QTBUG-24949 Change-Id: I68cb192417d9a94f72e039c40f647b4a6826a3b7 Reviewed-by: John Layt --- src/gui/painting/qpdf.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 07a3caa51b..eed64180e5 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2461,15 +2461,19 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti) trans.map(ti.width.toReal()/size, (ti.ascent.toReal()-ti.descent.toReal())/size, &x2, &y2); uint annot = addXrefEntry(-1); + QByteArray x1s, y1s, x2s, y2s; + x1s.setNum(static_cast(x1), 'f'); + y1s.setNum(static_cast(y1), 'f'); + x2s.setNum(static_cast(x2), 'f'); + y2s.setNum(static_cast(y2), 'f'); + QByteArray rectData = x1s + ' ' + y1s + ' ' + x2s + ' ' + y2s; + xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect ["); + xprintf(rectData.constData()); #ifdef Q_DEBUG_PDF_LINKS - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [16 16 1]\n/A <<\n", + xprintf("]\n/Border [16 16 1]\n/A <<\n"); #else - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [0 0 0]\n/A <<\n", + xprintf("]\n/Border [0 0 0]\n/A <<\n"); #endif - static_cast(x1), - static_cast(y1), - static_cast(x2), - static_cast(y2)); xprintf("/Type /Action\n/S /URI\n/URI (%s)\n", ti.charFormat.anchorHref().toLatin1().constData()); xprintf(">>\n>>\n"); -- cgit v1.2.3 From e3ac2b6392bfd1449f94393804fe7f4b4207b5a7 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Fri, 25 Jan 2013 00:23:39 +0000 Subject: Minor QWindow documentation improvement for the accessor/mutators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I003e5dbf1e87fd98cb24c2efdfd39560326f2731 Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 27881c9db3..db19aa9366 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -216,7 +216,7 @@ QWindow::~QWindow() } /*! - Set the \a surfaceType of the window. + Sets the \a surfaceType of the window. Specifies whether the window is meant for raster rendering with QBackingStore, or OpenGL rendering with QOpenGLContext. @@ -593,7 +593,7 @@ QString QWindow::filePath() const } /*! - \brief set the window's \a icon in the windowing system + \brief Sets the window's \a icon in the windowing system The window icon might be used by the windowing system for example to decorate the window, and/or in the task switcher. @@ -607,7 +607,7 @@ void QWindow::setIcon(const QIcon &icon) } /*! - \brief set the window's icon in the windowing system + \brief Sets the window's icon in the windowing system \sa setIcon() */ @@ -1212,14 +1212,14 @@ void QWindow::setPosition(int posx, int posy) /*! \fn QPoint QWindow::position() const - \brief get the position of the window on the desktop excluding any window frame + \brief Returns the position of the window on the desktop excluding any window frame \sa setPosition() */ /*! \fn QSize QWindow::size() const - \brief get the size of the window excluding any window frame + \brief Returns the size of the window excluding any window frame \sa resize() */ @@ -1298,7 +1298,7 @@ QPlatformSurface *QWindow::surfaceHandle() const } /*! - Set whether keyboard grab should be enabled or not (\a grab). + Sets whether keyboard grab should be enabled or not (\a grab). If the return value is true, the window receives all key events until setKeyboardGrabEnabled(false) is called; other windows get no key events at -- cgit v1.2.3 From 63569a68d2fd5ca90c4660e632fba2f3f3b37d73 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sat, 29 Dec 2012 02:09:39 +0800 Subject: Doc: Fix module name format Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion --- src/gui/doc/src/qtgui.qdoc | 10 +++++----- src/gui/image/qimagereader.cpp | 5 ++--- src/gui/image/qimagewriter.cpp | 5 ++--- src/gui/image/qplatformpixmap.cpp | 2 +- src/gui/kernel/qguiapplication.cpp | 2 +- src/gui/kernel/qopenglcontext.cpp | 2 +- src/gui/kernel/qplatformopenglcontext.cpp | 2 +- src/gui/painting/qpainter.cpp | 2 +- src/gui/text/qfontengine_qpa.cpp | 4 ++-- 9 files changed, 16 insertions(+), 18 deletions(-) (limited to 'src/gui') diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc index f41c1c7c91..aa44dcfad5 100644 --- a/src/gui/doc/src/qtgui.qdoc +++ b/src/gui/doc/src/qtgui.qdoc @@ -147,15 +147,15 @@ \section1 Qt GUI prior to Qt 5.0 - Prior to Qt 5.0, the Qt GUI library was the monolithic container + Prior to Qt 5.0, the Qt GUI module was the monolithic container for all things relating to graphical user interfaces in Qt, and included the Qt widget set, the item views, the graphics view framework and also printing. Starting Qt 5, these classes have - been moved to the QtWidgets library. Printing has been - moved to the QtPrintSupport library. Please note that these - libraries can be excluded from a Qt installation. + been moved to the Qt Widgets module. Printing has been + moved to the Qt Print Support module. Please note that these + modules can be excluded from a Qt installation. - QtGui now contains only a small set of enablers, which are generally + Qt GUI now contains only a small set of enablers, which are generally useful for all graphical applications. \section1 Drag and Drop diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 6836035e59..71408ecd23 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -1456,9 +1456,8 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, \row \li SVG \li Scalable Vector Graphics \endtable - Reading and writing SVG files is supported through Qt's - \l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} - provides support for additional image formats. + Reading and writing SVG files is supported through the \l{Qt SVG} module. + The \l{Qt Image Formats} module provides support for additional image formats. Note that the QApplication instance must be created before this function is called. diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 3270a5ca01..8e0f3fdcf0 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -697,9 +697,8 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, \row \li XPM \li X11 Pixmap \endtable - Reading and writing SVG files is supported through Qt's - \l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} - provides support for additional image formats. + Reading and writing SVG files is supported through the \l{Qt SVG} module. + The \l{Qt Image Formats} module provides support for additional image formats. Note that the QApplication instance must be created before this function is called. diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp index ba8a52d14f..ce66972dc3 100644 --- a/src/gui/image/qplatformpixmap.cpp +++ b/src/gui/image/qplatformpixmap.cpp @@ -83,7 +83,7 @@ QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId) QPlatformPixmap::~QPlatformPixmap() { // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will - // then set is_cached to false. For example, on X11 QtGui needs to delete the GLXPixmap + // then set is_cached to false. For example, on X11 Qt GUI needs to delete the GLXPixmap // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted, // otherwise some drivers will leak the GL surface. In this case, QX11PlatformPixmap will // call the cleanup hooks itself before deleting the native pixmap and set is_cached to diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 694ba3fc1b..3044c1dee2 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -220,7 +220,7 @@ static inline void clearFontUnlocked() For any GUI application using Qt, there is precisely \b one QGuiApplication object no matter whether the application has 0, 1, 2 or more windows at any given time. For non-GUI Qt applications, use QCoreApplication instead, - as it does not depend on the \l QtGui library. For QWidget based Qt applications, + as it does not depend on the Qt GUI module. For QWidget based Qt applications, use QApplication instead, as it provides some functionality needed for creating QWidget instances. diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 65a7ac19ef..bf3de0de8d 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -667,7 +667,7 @@ QScreen *QOpenGLContext::screen() const } /*! - internal: Needs to have a pointer to qGLContext. But since this is in QtGui we cant + internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we cant have any type information. \internal diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp index 0b30884f06..f4d343d78a 100644 --- a/src/gui/kernel/qplatformopenglcontext.cpp +++ b/src/gui/kernel/qplatformopenglcontext.cpp @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE The only place to retrieve a QPlatformOpenGLContext from is through a QPlatformWindow. The context which is current for a specific thread can be collected by the currentContext() - function. This is how QPlatformOpenGLContext also makes it possible to use the QtGui module + function. This is how QPlatformOpenGLContext also makes it possible to use the Qt GUI module withhout using QOpenGLWidget. When using QOpenGLContext::currentContext(), it will ask QPlatformOpenGLContext for the currentContext. Then a corresponding QOpenGLContext will be returned, which maps to the QPlatformOpenGLContext. diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 0ab2ab5589..0811b5282f 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1387,7 +1387,7 @@ void QPainterPrivate::updateState(QPainterState *newState) cases where expensive operations are ok to use, for instance when the result is cached in a QPixmap. - \sa QPaintDevice, QPaintEngine, {QtSvg Module}, {Basic Drawing Example}, + \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, {Drawing Utility Functions} */ diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index b083e20428..4a61b27298 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -732,10 +732,10 @@ void QFontEngineMultiQPA::setFallbackFamiliesList(const QStringList &fallbacks) } /* - This is used indirectly by QtWebKit when using QTextLayout::setRawFont + This is used indirectly by Qt WebKit when using QTextLayout::setRawFont The purpose of this is to provide the necessary font fallbacks when drawing complex - text. Since QtWebKit ends up repeatedly creating QTextLayout instances and passing them + text. Since Qt WebKit ends up repeatedly creating QTextLayout instances and passing them the same raw font over and over again, we want to cache the corresponding multi font engine as it may contain fallback font engines already. */ -- cgit v1.2.3 From 8a0a09f6d1cbeba0a88402c4318b1caaefa90d06 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 16 Jan 2013 14:07:50 +0100 Subject: Doc: Add a note for QDesktopServices about deprecated functions Add a note in QDesktopServices class reference about storageLocation() and displayName() functions being deprecated since Qt 5. Task-number: QTBUG-27869 Change-Id: I739771fef15534823071beabd62aa7b4e7b34cc0 Reviewed-by: Jerome Pasion Reviewed-by: David Faure (KDE) --- src/gui/util/qdesktopservices.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 61f9393dfb..97847af8ea 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -143,7 +143,10 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) same argument, and it will try to open the URL using the appropriate mechanism for the user's desktop environment. - \sa QSystemTrayIcon, QProcess + \note Since Qt 5, storageLocation() and displayName() are replaced by functionality + provided by the QStandardPaths class. + + \sa QSystemTrayIcon, QProcess, QStandardPaths */ /*! -- cgit v1.2.3