From dca90252a785236df9f435b2b5e4cc297345ae7f Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 14 Jan 2013 14:10:40 +0000 Subject: Prevent GL/gl.h from including system glext.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows us to then use the up-to-date qopenglext.h header on Linux too. Some distro's are not yet shipping OpenGL 4.x compatible headers. This fixes compilation of Qt on CentOS 5.8 and RHEL Change-Id: Ia8022e0aaf215dac7ea2a23dc82c3ac117d9fd53 Reviewed-by: Samuel Rødal --- src/gui/opengl/qopengl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui') diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h index 5928b0be2f..ae02356f81 100644 --- a/src/gui/opengl/qopengl.h +++ b/src/gui/opengl/qopengl.h @@ -95,6 +95,7 @@ typedef GLfloat GLdouble; # if defined(Q_OS_WIN) # include # endif +# define GL_GLEXT_LEGACY // Prevents GL/gl.h form #including system glext.h # include # include # endif // Q_OS_MAC -- cgit v1.2.3 From dac925a4d1bc325e2f4fefa25b0b9aa524285332 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Mon, 28 Jan 2013 10:23:08 +0800 Subject: Doc: Fix very minor typo Change-Id: I6af8e81296ef0dc3fcdfd67fae6899bc7c93b206 Reviewed-by: Jerome Pasion --- src/gui/kernel/qevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 33e3b7e1b7..d36204e5ad 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1752,7 +1752,7 @@ QInputMethodEvent::QInputMethodEvent() } /*! - Construcs an event of type QEvent::InputMethod. The + Constructs an event of type QEvent::InputMethod. The preedit text is set to \a preeditText, the attributes to \a attributes. -- cgit v1.2.3 From e778042ed7dc5c12aeea0dfcd5401bc9d002dc53 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Mon, 28 Jan 2013 11:17:55 +0800 Subject: Doc, Qt GUI: Fix "no \inmodule command" warnings Explicitly add "\inmodule QtGui" to Qt GUI classes Change-Id: Id641c1dc98770fbd994cecc375ca46c01f083236 Reviewed-by: Friedemann Kleint Reviewed-by: Jerome Pasion --- src/gui/image/qpicture.cpp | 1 + src/gui/image/qpictureformatplugin.cpp | 1 + src/gui/kernel/qevent.cpp | 5 +++++ src/gui/kernel/qgenericplugin.cpp | 1 + src/gui/kernel/qgenericpluginfactory.cpp | 1 + src/gui/kernel/qplatformsystemtrayicon_qpa.cpp | 1 + src/gui/painting/qpaintdevice.qdoc | 1 + src/gui/painting/qpaintengine_raster.cpp | 1 + 8 files changed, 12 insertions(+) (limited to 'src/gui') diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index bfc31930dd..f6de22851d 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -1278,6 +1278,7 @@ QList QPicture::outputFormats() \ingroup painting \ingroup io + \inmodule QtGui QPictureIO contains a QIODevice object that is used for picture data I/O. The programmer can install new picture file formats in addition diff --git a/src/gui/image/qpictureformatplugin.cpp b/src/gui/image/qpictureformatplugin.cpp index bef72595ad..29d6912201 100644 --- a/src/gui/image/qpictureformatplugin.cpp +++ b/src/gui/image/qpictureformatplugin.cpp @@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE for custom picture format plugins. \ingroup plugins + \inmodule QtGui The picture format plugin is a simple plugin interface that makes it easy to create custom picture formats that can be used diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index d36204e5ad..e9527bdc48 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -58,6 +58,7 @@ QT_BEGIN_NAMESPACE /*! \class QEnterEvent \ingroup events + \inmodule QtGui \brief The QEnterEvent class contains parameters that describe an enter event. @@ -144,6 +145,7 @@ QInputEvent::~QInputEvent() /*! \class QMouseEvent \ingroup events + \inmodule QtGui \brief The QMouseEvent class contains parameters that describe a mouse event. @@ -412,6 +414,7 @@ QMouseEvent::~QMouseEvent() /*! \class QHoverEvent \ingroup events + \inmodule QtGui \brief The QHoverEvent class contains parameters that describe a mouse event. @@ -797,6 +800,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, \brief The QKeyEvent class describes a key event. \ingroup events + \inmodule QtGui Key events are sent to the widget with keyboard input focus when keys are pressed or released. @@ -1728,6 +1732,7 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos) /*! \class QInputMethodEvent::Attribute + \inmodule QtGui \brief The QInputMethodEvent::Attribute class stores an input method attribute. */ diff --git a/src/gui/kernel/qgenericplugin.cpp b/src/gui/kernel/qgenericplugin.cpp index c3301a4e34..98709804de 100644 --- a/src/gui/kernel/qgenericplugin.cpp +++ b/src/gui/kernel/qgenericplugin.cpp @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE /*! \class QGenericPlugin \ingroup plugins + \inmodule QtGui \brief The QGenericPlugin class is an abstract base class for plugins. diff --git a/src/gui/kernel/qgenericpluginfactory.cpp b/src/gui/kernel/qgenericpluginfactory.cpp index cecaf060ce..8e3b45d1a8 100644 --- a/src/gui/kernel/qgenericpluginfactory.cpp +++ b/src/gui/kernel/qgenericpluginfactory.cpp @@ -61,6 +61,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, /*! \class QGenericPluginFactory \ingroup plugins + \inmodule QtGui \brief The QGenericPluginFactory class creates plugin drivers. diff --git a/src/gui/kernel/qplatformsystemtrayicon_qpa.cpp b/src/gui/kernel/qplatformsystemtrayicon_qpa.cpp index 0976bf320d..13de2c658a 100644 --- a/src/gui/kernel/qplatformsystemtrayicon_qpa.cpp +++ b/src/gui/kernel/qplatformsystemtrayicon_qpa.cpp @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE /*! \class QPlatformSystemTrayIcon + \inmodule QtGui \brief The QPlatformSystemTrayIcon class abstracts the system tray icon and interaction. \sa QSystemTray diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc index 5582f777a5..7397dc7fc2 100644 --- a/src/gui/painting/qpaintdevice.qdoc +++ b/src/gui/painting/qpaintdevice.qdoc @@ -31,6 +31,7 @@ can be painted on with QPainter. \ingroup painting + \inmodule QtGui A paint device is an abstraction of a two-dimensional space that can be drawn on using a QPainter. Its default coordinate system has diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index f6a749f979..aaa0a4b87e 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -296,6 +296,7 @@ QRasterPaintEnginePrivate::QRasterPaintEnginePrivate() : \class QRasterPaintEngine \preliminary \ingroup qws + \inmodule QtGui \since 4.2 \brief The QRasterPaintEngine class enables hardware acceleration -- cgit v1.2.3 From f262815f2ef147113780312a410eccdf4b318a82 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 26 Jan 2013 13:39:56 +0100 Subject: Fix some more old references and links to Nokia Task-number: QTBUG-28156 Change-Id: I9ba0d6f1e92103219bec1e61e716b6b2f269a8ad Reviewed-by: Laszlo Papp Reviewed-by: Jerome Pasion --- src/gui/image/qpixmapcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index c9560fd816..f996d032b8 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE memory. The \e{Qt Quarterly} article - \l{http://qt.nokia.com/doc/qq/qq12-qpixmapcache.html}{Optimizing + \l{http://doc.qt.digia.com/qq/qq12-qpixmapcache.html}{Optimizing with QPixmapCache} explains how to use QPixmapCache to speed up applications by caching the results of painting. -- cgit v1.2.3 From 7bb43454b83ab0f055248b80defe0b985e59ed64 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sun, 27 Jan 2013 12:58:38 +0800 Subject: Fix minor typos in docs, printed messages & comments Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion --- src/gui/itemmodels/qstandarditemmodel.cpp | 2 +- src/gui/kernel/qopenglcontext.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp index 3a6c0804ab..d6161671b1 100644 --- a/src/gui/itemmodels/qstandarditemmodel.cpp +++ b/src/gui/itemmodels/qstandarditemmodel.cpp @@ -1470,7 +1470,7 @@ void QStandardItem::insertRow(int row, const QList &items) } /*! - Inserts \a items at \a row. The column count wont be changed. + Inserts \a items at \a row. The column count won't be changed. \sa insertRow(), insertColumn() */ diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index bf3de0de8d..645c13a2ea 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -165,7 +165,7 @@ QOpenGLContext *QOpenGLContextPrivate::setCurrentContext(QOpenGLContext *context QGuiGLThreadContext *threadContext = qwindow_context_storage.localData(); if (!threadContext) { if (!QThread::currentThread()) { - qWarning("No QTLS available. currentContext wont work"); + qWarning("No QTLS available. currentContext won't work"); return 0; } threadContext = new QGuiGLThreadContext; @@ -667,7 +667,7 @@ QScreen *QOpenGLContext::screen() const } /*! - internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we cant + internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we can't have any type information. \internal -- cgit v1.2.3 From 8995453263721507a4c923b905f50f800010d9ad Mon Sep 17 00:00:00 2001 From: Poul Sysolyatin Date: Mon, 21 Jan 2013 13:48:21 +0700 Subject: Added 'jpeg' to QImageReader::supportedImageFormats() When Qt build statically result of QImageReader::supportedImageFormats() must contain 'jpeg' and 'jpg' if JPEG support enabled. Task-number: QTBUG-29222 Change-Id: I94d731c2d1e2ede148e2e5261a310a840a1d5523 Reviewed-by: Gunnar Sletta --- src/gui/image/qimagereader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 71408ecd23..a6e15ede11 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -162,6 +162,7 @@ enum _qt_BuiltInFormatType { #endif #ifndef QT_NO_IMAGEFORMAT_JPEG _qt_JpgFormat, + _qt_JpegFormat, #endif #ifdef QT_BUILTIN_GIF_READER _qt_GifFormat, @@ -194,6 +195,7 @@ static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = { #endif #ifndef QT_NO_IMAGEFORMAT_JPEG {_qt_JpgFormat, "jpg"}, + {_qt_JpegFormat, "jpeg"}, #endif #ifdef QT_BUILTIN_GIF_READER {_qt_GifFormat, "gif"}, @@ -422,6 +424,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, #endif #ifndef QT_NO_IMAGEFORMAT_JPEG case _qt_JpgFormat: + case _qt_JpegFormat: if (QJpegHandler::canRead(device)) handler = new QJpegHandler; break; -- cgit v1.2.3 From 9d432881804edc3f680de610e40b669f97df6f9b Mon Sep 17 00:00:00 2001 From: Poul Sysolyatin Date: Mon, 21 Jan 2013 14:00:07 +0700 Subject: Exclude BMP from supported formats if it disabled by Qt build If Qt build without BMP support, we need exclude this format from output of QImageWriter::supportedImageFormats() and QImageReader::supportedImageFormats() methods. Task-number: QTBUG-27028 Change-Id: I44e8956247066c0836b1ff7bf9a1f356fe568af1 Reviewed-by: Gunnar Sletta --- src/gui/image/qimagereader.cpp | 4 ++++ src/gui/image/qimagewriter.cpp | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src/gui') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index a6e15ede11..5eaf7bb8f2 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -167,7 +167,9 @@ enum _qt_BuiltInFormatType { #ifdef QT_BUILTIN_GIF_READER _qt_GifFormat, #endif +#ifndef QT_NO_IMAGEFORMAT_BMP _qt_BmpFormat, +#endif #ifndef QT_NO_IMAGEFORMAT_PPM _qt_PpmFormat, _qt_PgmFormat, @@ -200,7 +202,9 @@ static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = { #ifdef QT_BUILTIN_GIF_READER {_qt_GifFormat, "gif"}, #endif +#ifndef QT_NO_IMAGEFORMAT_BMP {_qt_BmpFormat, "bmp"}, +#endif #ifndef QT_NO_IMAGEFORMAT_PPM {_qt_PpmFormat, "ppm"}, {_qt_PgmFormat, "pgm"}, diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 8e0f3fdcf0..20e601be03 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -708,7 +708,9 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, QList QImageWriter::supportedImageFormats() { QSet formats; +#ifndef QT_NO_IMAGEFORMAT_BMP formats << "bmp"; +#endif #ifndef QT_NO_IMAGEFORMAT_PPM formats << "pbm" << "pgm" << "ppm"; #endif -- cgit v1.2.3 From a9458a175598a0da0fdfbfed7f9470878af25b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 24 Jan 2013 09:09:28 +0100 Subject: Clean up logical dpi for QImage. Revert to the pre highdpi-patch behaviour. Before, both physical and logical DPI would be based on the dpmx/dpmy variables, which could be changed with setDotsPerMeter(). The highdpi patch introduced separate ldpmx/ldpmy variables, which were not changed by setDotsPerMeter(). This broke when loading images: setDotsPerMeter would be called but the logical dpi would not change. Remove ldpmx/ldpmy. Keep scaling the physical dpi by the devicePixelRatio, which will be set to 1 by default. Task-number: QTBUG-29187 Change-Id: I0d6f5f3b8efae5fb1adc0a50b22a5da78324a282 Reviewed-by: Gunnar Sletta --- src/gui/image/qimage.cpp | 6 ++---- src/gui/image/qimage_p.h | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index de1e555771..975ef54d6b 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -99,8 +99,6 @@ QImageData::QImageData() format(QImage::Format_ARGB32), bytes_per_line(0), ser_no(qimage_serial_number.fetchAndAddRelaxed(1)), detach_no(0), - ldpmx(qt_defaultDpiX() * 100 / qreal(2.54)), - ldpmy(qt_defaultDpiY() * 100 / qreal(2.54)), dpmx(qt_defaultDpiX() * 100 / qreal(2.54)), dpmy(qt_defaultDpiY() * 100 / qreal(2.54)), offset(0, 0), own_data(true), ro_data(false), has_alpha_clut(false), @@ -4984,11 +4982,11 @@ int QImage::metric(PaintDeviceMetric metric) const return d->depth; case PdmDpiX: - return qRound(d->ldpmx * 0.0254); + return qRound(d->dpmx * 0.0254); break; case PdmDpiY: - return qRound(d->ldpmy * 0.0254); + return qRound(d->dpmy * 0.0254); break; case PdmPhysicalDpiX: diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index e79eb9d562..18c686e917 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -82,10 +82,8 @@ struct Q_GUI_EXPORT QImageData { // internal image data int ser_no; // serial number int detach_no; - qreal ldpmx; // logical dots per meter X (or 0) - qreal ldpmy; // logical dots per meter Y (or 0) - qreal dpmx; // device dots per meter X (or 0) - qreal dpmy; // device dots per meter Y (or 0) + qreal dpmx; // dots per meter X (or 0) + qreal dpmy; // dots per meter Y (or 0) QPoint offset; // offset in pixels uint own_data : 1; -- cgit v1.2.3 From 06a6d1da589d68d72ef70bc0b19ab9ef39593164 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 17:20:33 +0100 Subject: substitute fixed version numbers in qdocconf files with variables Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion Reviewed-by: Joerg Bornemann --- src/gui/doc/qtgui.qdocconf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf index a46aa9b3d1..3fc03aec73 100644 --- a/src/gui/doc/qtgui.qdocconf +++ b/src/gui/doc/qtgui.qdocconf @@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtGui description = Qt GUI Reference Documentation url = http://qt-project.org/doc/qtgui -version = 5.0.1 +version = $QT_VERSION examplesinstallpath = gui qhp.projects = QtGui qhp.QtGui.file = qtgui.qhp -qhp.QtGui.namespace = org.qt-project.qtgui.501 +qhp.QtGui.namespace = org.qt-project.qtgui.$QT_VERSION_TAG qhp.QtGui.virtualFolder = qtgui qhp.QtGui.indexTitle = Qt GUI qhp.QtGui.indexRoot = -qhp.QtGui.filterAttributes = qtgui 5.0.1 qtrefdoc -qhp.QtGui.customFilters.Qt.name = Qtgui 5.0.1 -qhp.QtGui.customFilters.Qt.filterAttributes = qtgui 5.0.1 +qhp.QtGui.filterAttributes = qtgui $QT_VERSION qtrefdoc +qhp.QtGui.customFilters.Qt.name = Qtgui $QT_VERSION +qhp.QtGui.customFilters.Qt.filterAttributes = qtgui $QT_VERSION qhp.QtGui.subprojects = classes qhp.QtGui.subprojects.classes.title = C++ Classes -- cgit v1.2.3 From e01343352ed8c1ac9cde0418bf72b6dec5099246 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 18:00:01 +0100 Subject: fix doc page urls they are versioned nowadays Change-Id: I839db633e9d7d63c9d445f8e914b529bd7ce60a2 Reviewed-by: Jerome Pasion --- src/gui/doc/qtgui.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf index 3fc03aec73..fcf6cdf57c 100644 --- a/src/gui/doc/qtgui.qdocconf +++ b/src/gui/doc/qtgui.qdocconf @@ -2,7 +2,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtGui description = Qt GUI Reference Documentation -url = http://qt-project.org/doc/qtgui +url = http://qt-project.org/doc/qt-$QT_VER/qtgui version = $QT_VERSION examplesinstallpath = gui -- cgit v1.2.3 From 85b2ba2a928ee9c50d2b8191851f2ef816a52412 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Tue, 5 Feb 2013 12:00:49 +0100 Subject: doc: Fix QPixmapCache size default value in doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QPixmapCache size default value is always 10 Mb since change I2ac33765 Change-Id: I28c99433948b07e9c84d0afda7aa5a8f49d2cd18 Reviewed-by: Samuel Rødal --- src/gui/image/qpixmapcache.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 4a8330d9f3..f4d2afed7a 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -75,10 +75,8 @@ QT_BEGIN_NAMESPACE behavior of the QHash and QCache classes. The cache becomes full when the total size of all pixmaps in the - cache exceeds cacheLimit(). The initial cache limit is - 2048 KB (2 MB) on embedded platforms, 10240 KB (10 MB) on desktop - platforms; you can change this by calling setCacheLimit() with the - required value. + cache exceeds cacheLimit(). The initial cache limit is 10240 KB (10 MB); + you can change this by calling setCacheLimit() with the required value. A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of memory. @@ -90,7 +88,7 @@ QT_BEGIN_NAMESPACE \sa QCache, QPixmap */ -static int cache_limit = 10240; // 10 MB cache limit for desktop +static int cache_limit = 10240; // 10 MB cache limit /*! \class QPixmapCache::Key @@ -596,8 +594,7 @@ bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap) /*! Returns the cache limit (in kilobytes). - The default cache limit is 2048 KB on embedded platforms, 10240 KB on - desktop platforms. + The default cache limit is 10240 KB. \sa setCacheLimit() */ @@ -610,8 +607,7 @@ int QPixmapCache::cacheLimit() /*! Sets the cache limit to \a n kilobytes. - The default setting is 2048 KB on embedded platforms, 10240 KB on - desktop platforms. + The default setting is 10240 KB. \sa cacheLimit() */ -- cgit v1.2.3 From a1f4a821fc068958621c4d1aad5a366e77c46399 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 5 Feb 2013 19:27:37 +0100 Subject: Nokia -> Qt Project Change-Id: Iadd29ee918dc181d2a468f5198e66351c7cb3548 Reviewed-by: Simon Hausmann --- src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp index 79cef3b5ef..6a012879d4 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp @@ -213,7 +213,7 @@ painter.drawPixmap(target, image, source); //! [17] QPainter painter(this); -painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nNokia")); +painter.drawText(rect, Qt::AlignCenter, tr("Qt\nProject")); //! [17] -- cgit v1.2.3 From af84313c622af880e95d461ea8b7dbca58d2dffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 5 Feb 2013 09:44:26 +0100 Subject: Fixed crash in image reader when reading certain BMP files. If the high bit in a mask is set, for instance if the mask is 0xff000000, and we shift it to the right by 24 positions, since the mask was not declared as unsigned we ended up with a mask value of 0xffffffff. We then add 1 to this value and divide by the result, causing a division by zero crash. The masks need to be declared unsigned to prevent sign bit extension when shifting right. Task-number: QTBUG-29194 Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999 Reviewed-by: Gunnar Sletta --- src/gui/image/qbmphandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 062714c769..6abde5e420 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -143,7 +143,7 @@ static QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi) return s; } -static int calc_shift(int mask) +static int calc_shift(uint mask) { int result = 0; while (mask && !(mask & 1)) { @@ -207,9 +207,9 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int #endif int w = bi.biWidth, h = bi.biHeight, nbits = bi.biBitCount; int t = bi.biSize, comp = bi.biCompression; - int red_mask = 0; - int green_mask = 0; - int blue_mask = 0; + uint red_mask = 0; + uint green_mask = 0; + uint blue_mask = 0; int red_shift = 0; int green_shift = 0; int blue_shift = 0; -- cgit v1.2.3 From ca19cba2ac3cf9785b9a2211c4ba7d1e14d87bf2 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 14 Dec 2012 18:25:03 +0100 Subject: Factorize code for formatting window titles into QPlatformWindow. Change-Id: I0dcccd08916fc2ea1b795681e9b98a9550ef51b6 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qplatformwindow.cpp | 24 ++++++++++++++++++++++++ src/gui/kernel/qplatformwindow.h | 2 ++ 2 files changed, 26 insertions(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index 01377d1aa0..b710701e7f 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -42,6 +42,7 @@ #include "qplatformwindow.h" #include "qplatformwindow_p.h" +#include #include #include #include @@ -424,6 +425,29 @@ bool QPlatformWindow::frameStrutEventsEnabled() const return false; } +/*! + Call this method to put together a window title composed of + \a title + \a separator + the application display name + + If the display name isn't set, and the title is empty, the raw app name is used. +*/ +QString QPlatformWindow::formatWindowTitle(const QString &title, const QString &separator) +{ + QString fullTitle = title; + if (QGuiApplicationPrivate::displayName) { + // Append display name, if set. + if (!fullTitle.isEmpty()) + fullTitle += separator; + fullTitle += *QGuiApplicationPrivate::displayName; + } else if (fullTitle.isEmpty()) { + // Don't let the window title be completely empty, use the app name as fallback. + fullTitle = QCoreApplication::applicationName(); + } + return fullTitle; +} + /*! \class QPlatformWindow \since 4.8 diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index d435198349..fe62d7b67b 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -131,6 +131,8 @@ public: virtual bool frameStrutEventsEnabled() const; protected: + static QString formatWindowTitle(const QString &title, const QString &separator); + QScopedPointer d_ptr; private: Q_DISABLE_COPY(QPlatformWindow) -- cgit v1.2.3 From bc8727cbbc751cc8a10289cb5ec78065fefe9bcc Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 7 Feb 2013 15:11:55 +0100 Subject: Add translator help for accessibility strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is also one string fix: cursor was twice, the second one should have been text caret. These roles follow IAccessible/MSAA as reference. Change-Id: I39b64fd01376fec9e8d9b743c43a24611a1d9fbd Reviewed-by: Friedemann Kleint Reviewed-by: Jan Arve Sæther --- src/gui/accessible/qaccessible.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index b26f592e11..d316ec4f10 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -284,10 +284,10 @@ public: Canvas = 0x00000035, Animation = 0x00000036, Equation = 0x00000037, - ButtonDropDown = 0x00000038, + ButtonDropDown = 0x00000038, // The object represents a button that expands a grid. ButtonMenu = 0x00000039, ButtonDropGrid = 0x0000003A, - Whitespace = 0x0000003B, + Whitespace = 0x0000003B, // The object represents blank space between other objects. PageTabList = 0x0000003C, Clock = 0x0000003D, Splitter = 0x0000003E, -- cgit v1.2.3 From d180560e148722071f30fbbbfcdce01b01ba8cdf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Feb 2013 17:26:47 +0100 Subject: Fix QWindow::setFramePosition() to keep the size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4 Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index db19aa9366..2fcad5706f 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1186,7 +1186,7 @@ void QWindow::setFramePosition(const QPoint &point) if (d->platformWindow) { d->platformWindow->setGeometry(QRect(point, size())); } else { - d->geometry.setTopLeft(point); + d->geometry.moveTopLeft(point); } } -- cgit v1.2.3 From f5acd545a8bf8b187be6b3dd29f095b1fa7e94ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 12 Feb 2013 11:34:55 +0100 Subject: Mac: Remove broken platformPluginPath code. The missing "/" in front of "../Plugins" prevents this from working - platformPluginPath is never set. Deployed platform plugin loading works in spite of this via qt.conf which adds the plugin path to QCoreApplication::libraryPaths(). Change-Id: I7ae4d13c65a380ddad72bffd29b776c39ea91c8a Reviewed-by: Gabriel de Dietrich --- src/gui/kernel/qguiapplication.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3044c1dee2..02ae51bfc2 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -851,15 +851,6 @@ void QGuiApplicationPrivate::createPlatformIntegration() // Load the platform integration QString platformPluginPath = QLatin1String(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH")); - // On Mac, look inside the application bundle for the platform plugin. - // TODO (msorvig): Create proper cross-platform solution for loading - // deployed platform plugins -#ifdef Q_OS_MAC - const QString bundlePluginPath = QCoreApplication::applicationDirPath() + QLatin1String("../Plugins/"); - if (platformPluginPath.isEmpty() && QDir(bundlePluginPath).exists()) { - platformPluginPath = bundlePluginPath; - } -#endif QByteArray platformName; #ifdef QT_QPA_DEFAULT_PLATFORM_NAME -- cgit v1.2.3 From 62d25e4d4f02a53da25b9f14cc9e0244d6655312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 12 Feb 2013 12:58:08 +0100 Subject: Fixed QPixmapCache associating path with wrong QPixmap. QPixmap::load() would not detach, so multiple paths could get associated with the same QPixmap, causing the wrong pixmap to be shown. Task-number: QTBUG-29639 Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62 Reviewed-by: aavit --- src/gui/image/qpixmap.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui') diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 852025117b..b6a21f588e 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -760,6 +760,8 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers return false; } + detach(); + QFileInfo info(fileName); QString key = QLatin1String("qt_pixmap") % info.absoluteFilePath() -- cgit v1.2.3 From c76ec20e55a194664045c61094f8aea75ff6a756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 12 Feb 2013 15:48:19 +0100 Subject: Fixed QSurfaceFormat documentation about DebugContext requiring GL3+. GL_ARB_debug_output only requires OpenGL 1.1 and above. Change-Id: Ib79d370fac36fa737817ea678f0dee25283dfa31 Reviewed-by: Giuseppe D'Angelo --- src/gui/kernel/qsurfaceformat.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index e7c93f4e48..2c26a172a4 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -130,7 +130,6 @@ public: \value StereoBuffers Used to request stereo buffers in the surface format. \value DebugContext Used to request a debug context with extra debugging information. - This requires OpenGL version 3.0 or higher. \value DeprecatedFunctions Used to request that deprecated functions be included in the OpenGL context profile. If not specified, you should get a forward compatible context without support functionality marked as deprecated. This requires OpenGL version 3.0 or higher. -- cgit v1.2.3