diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-09 06:51:12 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-09 06:51:12 (GMT) |
commit | 80892f907be2f271d567d902c2b3d909b0178853 (patch) | |
tree | b965540aa9a4d09d9c378acdcfb39551d7d7d79a /src | |
parent | db1162da76f1d257ba9bfcaef574275e7430385f (diff) | |
parent | f370b5d986529155baf7d9dd95678854df4105e0 (diff) | |
download | Qt-80892f907be2f271d567d902c2b3d909b0178853.zip Qt-80892f907be2f271d567d902c2b3d909b0178853.tar.gz Qt-80892f907be2f271d567d902c2b3d909b0178853.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
46 files changed, 438 insertions, 263 deletions
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h index 9af2615..a3c72b2 100644 --- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h +++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h @@ -139,6 +139,21 @@ namespace Phonon ObjectDescriptionModelDataPrivate *const d; }; +/* Required to ensure template class vtables are exported on both symbian +and existing builds. */ +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) +// RVCT compiler (2.2.686) requires the export declaration to be on the class to export vtables +// MWC compiler works both ways +// GCCE compiler is unknown (it can't compile QtCore yet) +#define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT +#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT +#else +// Windows builds (at least) do not support export declaration on templated class +// But if you export a member function, the vtable is implicitly exported +#define PHONON_TEMPLATE_CLASS_EXPORT +#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT +#endif + /** \class ObjectDescriptionModel objectdescriptionmodel.h Phonon/ObjectDescriptionModel * \short The ObjectDescriptionModel class provides a model from * a list of ObjectDescription objects. @@ -175,18 +190,26 @@ namespace Phonon * \author Matthias Kretz <kretz@kde.org> */ template<ObjectDescriptionType type> - class PHONON_EXPORT ObjectDescriptionModel : public QAbstractListModel + class PHONON_TEMPLATE_CLASS_EXPORT ObjectDescriptionModel : public QAbstractListModel { public: Q_OBJECT_CHECK +/* MinGW 3.4.x gives an ICE when trying to instantiate one of the + ObjectDescriptionModel<foo> classes because it can't handle + half exported classes correct. gcc 4.3.x has a fix for this but + we currently there's no official gcc 4.3 on windows available. + Because of this we need this little hack + */ +#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4 /** \internal */ - static const QMetaObject staticMetaObject; + static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject; /** \internal */ - const QMetaObject *metaObject() const; + PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject *metaObject() const; /** \internal */ - void *qt_metacast(const char *_clname); + PHONON_TEMPLATE_CLASS_MEMBER_EXPORT void *qt_metacast(const char *_clname); //int qt_metacall(QMetaObject::Call _c, int _id, void **_a); +#endif /** * Returns the number of rows in the model. This value corresponds diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 9d76dcc..4234a7e 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -71,8 +71,8 @@ Qt { Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle) Q_ENUMS(FillRule MaskMode BGMode ClipOperation SizeMode) Q_ENUMS(BackgroundMode) // Qt3 - Q_ENUMS(Axis Corner LayoutDirection SizeHint Orientation) - Q_FLAGS(Alignment Orientations) + Q_ENUMS(Axis Corner LayoutDirection SizeHint Orientation DropAction) + Q_FLAGS(Alignment Orientations DropActions) Q_FLAGS(DockWidgetAreas ToolBarAreas) Q_ENUMS(DockWidgetArea ToolBarArea) Q_ENUMS(TextFormat) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index b7775bd..ab232bf 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -713,7 +713,13 @@ \omitvalue Dither_Mask \omitvalue AlphaDither_Mask \omitvalue DitherMode_Mask - \omitvalue NoOpaqueDetection + + \value NoOpaqueDetection Do not check whether the image contains non-opaque + pixels. Use this if you know that the image is semi-transparent and + you want to avoid the overhead of checking the pixels in the image + until a non-opaque pixel is found, or if you want the pixmap to + retain an alpha channel for some other reason. If the image has no + alpha channel this flag has no effect. */ /*! \enum Qt::GUIStyle diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 1b559cf..1277623 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -54,7 +54,6 @@ #ifndef Q_WS_WIN #include <locale.h> #endif - #include <time.h> #if defined(Q_OS_WINCE) #include "qfunctions_wince.h" @@ -69,6 +68,31 @@ # define QDTPDEBUGN if (false) qDebug #endif +#if defined(Q_OS_SYMBIAN) + // Workaround for OpenC bug. + + // OpenC incorrectly caches DST information between localtime_r + // calls, i.e. if previous call to localtime_r has been called for DST + // affected date, also the second call will be affected by DST even + // the date is such that DST should not be applied. + + // The workaround is to call mktime with non-DST affected date before + // calling localtime_r. mktime call resets the OpenC internal DST cache + // to right value and localtime_r will return correct values. +#define FIX_OPENC_DSTCACHE \ + tm localTM; \ + localTM.tm_sec = 0; \ + localTM.tm_min = 0; \ + localTM.tm_hour = 12; \ + localTM.tm_mday = 1; \ + localTM.tm_mon = 1; \ + localTM.tm_year = 2002 - 1900; \ + localTM.tm_isdst = -1; \ + time_t temp = mktime(&localTM); +#else +#define FIX_OPENC_DSTCACHE +#endif + #if defined(Q_WS_MAC) #include <private/qcore_mac_p.h> #endif @@ -1138,6 +1162,7 @@ QDate QDate::currentDate() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); @@ -1834,12 +1859,13 @@ QTime QTime::currentTime() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); #endif Q_CHECK_PTR(t); - + ct.mds = MSECS_PER_HOUR * t->tm_hour + MSECS_PER_MIN * t->tm_min + 1000 * t->tm_sec + tv.tv_usec / 1000; #else @@ -2887,6 +2913,7 @@ QDateTime QDateTime::currentDateTime() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); @@ -3704,6 +3731,7 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE brokenDown = localtime_r(&secsSince1Jan1970UTC, &res); #elif defined(_MSC_VER) && _MSC_VER >= 1400 tm res; diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 7df49fa..ed2d676 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -673,28 +673,6 @@ void QDialog::keyPressEvent(QKeyEvent *e) case Qt::Key_Escape: reject(); break; - case Qt::Key_Up: - case Qt::Key_Left: - if (focusWidget() && - (focusWidget()->focusPolicy() == Qt::StrongFocus || - focusWidget()->focusPolicy() == Qt::WheelFocus)) { - e->ignore(); - break; - } - // call ours, since c++ blocks us from calling the one - // belonging to focusWidget(). - focusNextPrevChild(false); - break; - case Qt::Key_Down: - case Qt::Key_Right: - if (focusWidget() && - (focusWidget()->focusPolicy() == Qt::StrongFocus || - focusWidget()->focusPolicy() == Qt::WheelFocus)) { - e->ignore(); - break; - } - focusNextPrevChild(true); - break; default: e->ignore(); return; diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h index 44289d9..32cd397 100644 --- a/src/gui/dialogs/qfiledialog_p.h +++ b/src/gui/dialogs/qfiledialog_p.h @@ -76,7 +76,7 @@ #include <qdebug.h> #include "qsidebar_p.h" #include "qfscompleter_p.h" -#include "../kernel/qguiplatformplugin_p.h" +#include "private/qguiplatformplugin_p.h" #if defined (Q_OS_UNIX) diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp index f66c27f..843c4e2 100644 --- a/src/gui/dialogs/qprintdialog_win.cpp +++ b/src/gui/dialogs/qprintdialog_win.cpp @@ -52,6 +52,13 @@ #include <private/qprintengine_win_p.h> #include <private/qprinter_p.h> +#if defined(Q_CC_MINGW) && !defined(PD_NOCURRENTPAGE) +#define PD_NOCURRENTPAGE 0x00800000 +#define PD_RESULT_PRINT 1 +#define PD_RESULT_APPLY 2 +#define START_PAGE_GENERAL 0XFFFFFFFF +#endif + QT_BEGIN_NAMESPACE extern void qt_win_eatMouseMove(); diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 02ae729..c61e1d3 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -313,7 +313,7 @@ QString QEglProperties::toString() const int alpha = value(EGL_ALPHA_SIZE); int bufferSize = value(EGL_BUFFER_SIZE); if (bufferSize == (red + green + blue + alpha)) - bufferSize = EGL_DONT_CARE; + bufferSize = 0; str += QLatin1String(" rgba="); str += QString::number(red); str += QLatin1Char(','); @@ -322,7 +322,7 @@ QString QEglProperties::toString() const str += QString::number(blue); str += QLatin1Char(','); str += QString::number(alpha); - if (bufferSize != EGL_DONT_CARE) { + if (bufferSize != 0) { // Only report buffer size if different than r+g+b+a. str += QLatin1String(" buffer-size="); str += QString::number(bufferSize); diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 3448459..e0779a0 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -962,15 +962,10 @@ QString QIcon::themeName() */ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) { - static QCache <QString, QIcon> iconCache; QIcon icon; - icon = qt_guiPlatformPlugin()->loadIcon(name); - if (!icon.isNull()) - return icon; - if (iconCache.contains(name)) { icon = *iconCache.object(name); } else { diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index adc2967..5412e11 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -43,7 +43,7 @@ #include <private/qapplication_p.h> #include <private/qicon_p.h> -#include <private/qkde_p.h> +#include <private/qguiplatformplugin_p.h> #include <QtGui/QIconEnginePlugin> #include <QtGui/QPixmapCache> @@ -68,47 +68,25 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) +/* Theme to use in last resort, if the theme does not have the icon, neither the parents */ static QString fallbackTheme() { - QString defaultTheme; -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_GNOME) - defaultTheme = QLatin1String("gnome"); - else if (X11->desktopEnvironment == DE_KDE) - defaultTheme = X11->desktopVersion >= 4 ? - QString::fromLatin1("oxygen") : - QString::fromLatin1("crystalsvg"); -#endif - return defaultTheme; -} - -static QString systemThemeName() -{ - QString result = fallbackTheme(); #ifdef Q_WS_X11 if (X11->desktopEnvironment == DE_GNOME) { -#ifndef QT_NO_STYLE_GTK - result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), - result); -#endif + return QLatin1String("gnome"); } else if (X11->desktopEnvironment == DE_KDE) { - QSettings settings(QKde::kdeHome() + - QLatin1String("/share/config/kdeglobals"), - QSettings::IniFormat); - - settings.beginGroup(QLatin1String("Icons")); - - result = settings.value(QLatin1String("Theme"), result).toString(); + return X11->desktopVersion >= 4 + ? QString::fromLatin1("oxygen") + : QString::fromLatin1("crystalsvg"); } #endif - return result; + return QString(); } - QIconLoader::QIconLoader() : m_themeKey(1), m_supportsSvg(false) { - m_systemTheme = systemThemeName(); + m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName(); QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid, QLatin1String("/iconengines"), @@ -128,7 +106,7 @@ void QIconLoader::updateSystemTheme() { // Only change if this is not explicitly set by the user if (m_userTheme.isEmpty()) { - QString theme = systemThemeName(); + QString theme = qt_guiPlatformPlugin()->systemIconThemeName(); if (theme != m_systemTheme) { m_systemTheme = theme; invalidateKey(); @@ -152,51 +130,7 @@ void QIconLoader::setThemeSearchPath(const QStringList &searchPaths) QStringList QIconLoader::themeSearchPaths() const { if (m_iconDirs.isEmpty()) { - -#if defined(Q_WS_X11) - - QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); - if (xdgDirString.isEmpty()) - xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); - - QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); - - for (int i = 0 ; i < xdgDirs.size() ; ++i) { - QDir dir(xdgDirs[i]); - if (dir.exists()) - m_iconDirs.append(dir.path() + - QLatin1String("/icons")); - } - - if (X11->desktopEnvironment == DE_KDE) { - - m_iconDirs << QLatin1Char(':') + - QKde::kdeHome() + - QLatin1String("/share/icons"); - QStringList kdeDirs = - QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); - - for (int i = 0 ; i< kdeDirs.count() ; ++i) { - QDir dir(QLatin1Char(':') + kdeDirs.at(i) + - QLatin1String("/share/icons")); - if (dir.exists()) - m_iconDirs.append(dir.path()); - } - } - - // Add home directory first in search path - QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); - if (homeDir.exists()) - m_iconDirs.prepend(homeDir.path()); -#endif - -#if defined(Q_WS_WIN) - m_iconDirs.append(qApp->applicationDirPath() + - QLatin1String("/icons")); -#elif defined(Q_WS_MAC) - m_iconDirs.append(qApp->applicationDirPath() + - QLatin1String("/../Resources/icons")); -#endif + m_iconDirs = qt_guiPlatformPlugin()->iconThemeSearchPaths(); // Allways add resource directory as search path m_iconDirs.append(QLatin1String(":/icons")); } @@ -291,7 +225,7 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, if (!theme.isValid()) { theme = QIconTheme(themeName); if (!theme.isValid()) - theme = fallbackTheme(); + theme = QIconTheme(fallbackTheme()); themeList.insert(themeName, theme); } diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 37b6438..554c0f3 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -229,24 +229,15 @@ static CFbsBitmap* uncompress(CFbsBitmap* bitmap) lock.relock(); - CBitmapContext *bitmapContext = 0; CFbsBitmapDevice* bitmapDevice = 0; + CFbsBitGc *bitmapGc = 0; QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(uncompressed)); - TInt err = bitmapDevice->CreateBitmapContext(bitmapContext); - if (err != KErrNone) { - delete bitmap; - delete bitmapDevice; - bitmap = 0; - bitmapDevice = 0; - - lock.relock(); + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); - return bitmap; - } + bitmapGc->DrawBitmap(TPoint(), bitmap); - bitmapContext->DrawBitmap(TPoint(), bitmap); - - delete bitmapContext; + delete bitmapGc; delete bitmapDevice; return uncompressed; @@ -355,7 +346,7 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), symbianBitmapDataAccess(new QSymbianBitmapDataAccess), cfbsBitmap(0), bitmapDevice(0), - bitmapContext(0), + bitmapGc(0), pengine(0), bytes(0) { @@ -365,6 +356,7 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), QS60PixmapData::~QS60PixmapData() { release(); + delete symbianBitmapDataAccess; } void QS60PixmapData::resize(int width, int height) @@ -391,6 +383,8 @@ void QS60PixmapData::resize(int width, int height) if(cfbsBitmap->SizeInPixels() != newSize) { cfbsBitmap->Resize(TSize(width, height)); + bitmapDevice->Resize(TSize(width, height)); + bitmapGc->Resized(); if(pengine) { delete pengine; pengine = 0; @@ -404,12 +398,9 @@ void QS60PixmapData::resize(int width, int height) bool QS60PixmapData::initSymbianBitmapContext() { QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(cfbsBitmap)); - TInt err = bitmapDevice->CreateBitmapContext(bitmapContext); - if (err != KErrNone) { - delete bitmapDevice; - bitmapDevice = 0; - return false; - } + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); + return true; } @@ -417,7 +408,7 @@ void QS60PixmapData::release() { if (cfbsBitmap) { QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - delete bitmapContext; + delete bitmapGc; delete bitmapDevice; delete cfbsBitmap; lock.relock(); @@ -426,7 +417,7 @@ void QS60PixmapData::release() delete pengine; image = QImage(); cfbsBitmap = 0; - bitmapContext = 0; + bitmapGc = 0; bitmapDevice = 0; pengine = 0; bytes = 0; @@ -559,13 +550,15 @@ void QS60PixmapData::copy(const QPixmapData *data, const QRect &rect) resize(rect.width(), rect.height()); cfbsBitmap->SetDisplayMode(s60Data->cfbsBitmap->DisplayMode()); - bitmapContext->BitBlt(TPoint(0, 0), s60Data->cfbsBitmap, qt_QRect2TRect(rect)); + bitmapGc->BitBlt(TPoint(0, 0), s60Data->cfbsBitmap, qt_QRect2TRect(rect)); } bool QS60PixmapData::scroll(int dx, int dy, const QRect &rect) { - bitmapContext->CopyRect(TPoint(dx, dy), qt_QRect2TRect(rect)); - return true; + beginDataAccess(); + bool res = QRasterPixmapData::scroll(dx, dy, rect); + endDataAccess(); + return res; } int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index 4498c05..b23961a 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class CFbsBitmap; class CFbsBitmapDevice; -class CBitmapContext; +class CFbsBitGc; class QSymbianBitmapDataAccess; @@ -114,7 +114,7 @@ private: CFbsBitmap *cfbsBitmap; CFbsBitmapDevice *bitmapDevice; - CBitmapContext *bitmapContext; + CFbsBitGc *bitmapGc; QPaintEngine *pengine; uchar* bytes; diff --git a/src/gui/inputmethod/qwininputcontext_p.h b/src/gui/inputmethod/qwininputcontext_p.h index 39d50fd..dd0490d 100644 --- a/src/gui/inputmethod/qwininputcontext_p.h +++ b/src/gui/inputmethod/qwininputcontext_p.h @@ -56,6 +56,19 @@ #include "QtGui/qinputcontext.h" #include "QtCore/qt_windows.h" +#if defined(Q_CC_MINGW) && !defined(IMR_RECONVERTSTRING) +typedef struct tagRECONVERTSTRING { + DWORD dwSize; + DWORD dwVersion; + DWORD dwStrLen; + DWORD dwStrOffset; + DWORD dwCompStrLen; + DWORD dwCompStrOffset; + DWORD dwTargetStrLen; + DWORD dwTargetStrOffset; +} RECONVERTSTRING, *PRECONVERTSTRING; +#endif + QT_BEGIN_NAMESPACE class QWinInputContext : public QInputContext diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index 4a160d7..e9ab870 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -701,7 +701,7 @@ void QWinInputContext::updateImeStatus(QWidget *w, bool hasFocus) if (!focusProxyWidget) focusProxyWidget = w; bool e = w->testAttribute(Qt::WA_InputMethodEnabled) && w->isEnabled() - && !(focusProxyWidget->inputMethodHints() & Qt::ImhExclusiveInputMask); + && !(focusProxyWidget->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)); bool hasIme = e && hasFocus; #ifdef Q_IME_DEBUG qDebug("%s HasFocus = %d hasIme = %d e = %d ", w->className(), hasFocus, hasIme, e); diff --git a/src/gui/inputmethod/qximinputcontext_x11.cpp b/src/gui/inputmethod/qximinputcontext_x11.cpp index bee3ce8..b46b162 100644 --- a/src/gui/inputmethod/qximinputcontext_x11.cpp +++ b/src/gui/inputmethod/qximinputcontext_x11.cpp @@ -612,7 +612,7 @@ void QXIMInputContext::setFocusWidget(QWidget *w) QInputContext::setFocusWidget(w); - if (!w || w->inputMethodHints() & Qt::ImhExclusiveInputMask) + if (!w || w->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)) return; ICData *data = ximData.value(w->effectiveWinId()); diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 27528de..37f4184 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -761,7 +761,7 @@ void QAbstractItemView::setItemDelegate(QAbstractItemDelegate *delegate) } } d->itemDelegate = delegate; - update(); + viewport()->update(); } /*! @@ -826,7 +826,7 @@ void QAbstractItemView::setItemDelegateForRow(int row, QAbstractItemDelegate *de } d->rowDelegates.insert(row, delegate); } - update(); + viewport()->update(); } /*! @@ -883,7 +883,7 @@ void QAbstractItemView::setItemDelegateForColumn(int column, QAbstractItemDelega } d->columnDelegates.insert(column, delegate); } - update(); + viewport()->update(); } /*! diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index c78a49b..e3d17ad 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -61,6 +61,7 @@ #endif #include <private/qfunctions_p.h> +#include <private/qguiplatformplugin_p.h> #ifndef SHGFI_ADDOVERLAYS #define SHGFI_ADDOVERLAYS 0x000000020 @@ -385,6 +386,10 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const { Q_D(const QFileIconProvider); + QIcon platformIcon = qt_guiPlatformPlugin()->fileSystemIcon(info); + if (!platformIcon.isNull()) + return platformIcon; + #if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK) if (X11->desktopEnvironment == DE_GNOME) { QIcon gtkIcon = QGtk::getFilesystemIcon(info); diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index fc9820f..a754579 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -524,8 +524,10 @@ QSize QHeaderView::sizeHint() const Q_D(const QHeaderView); if (d->cachedSizeHint.isValid()) return d->cachedSizeHint; - d->cachedSizeHint = QSize(0, 0); //reinitialize the cached size hint + int width = 0; + int height = 0; const int sectionCount = count(); + d->executePostedLayout(); // get size hint for the first n sections int i = 0; diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index a95ae9d..f9c8aa3 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -1708,12 +1708,30 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event sizeof(axis), 0, &axis); // The 'new' event has acceleration applied by the OS, while the old (on - // Carbon only), has not. So we introduce acceleration here to be consistent: - int scrollFactor = 120 * qMin(5, qAbs(mdelt)); + // Carbon only), has not. So we introduce acceleration here to be consistent. + // The acceleration is trying to respect both pixel based and line scrolling, + // which turns out to be rather difficult. + int linesToScroll = mdelt > 0 ? 1 : -1; + static QTime t; + int elapsed = t.elapsed(); + t.restart(); + if (elapsed < 20) + linesToScroll *= 120; + else if (elapsed < 30) + linesToScroll *= 60; + else if (elapsed < 50) + linesToScroll *= 30; + else if (elapsed < 100) + linesToScroll *= 6; + else if (elapsed < 200) + linesToScroll *= 3; + else if (elapsed < 300) + linesToScroll *= 2; + if (axis == kEventMouseWheelAxisX) - wheel_deltaX = mdelt * scrollFactor; + wheel_deltaX = linesToScroll * 120; else - wheel_deltaY = mdelt * scrollFactor; + wheel_deltaY = linesToScroll * 120; } } diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 44f82b6..270562f 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -171,10 +171,13 @@ typedef struct tagTOUCHINPUT #include <mywinsock.h> #endif +#ifndef IMR_RECONVERTSTRING +#define IMR_RECONVERTSTRING 4 +#endif + #ifndef IMR_CONFIRMRECONVERTSTRING #define IMR_CONFIRMRECONVERTSTRING 0x0005 #endif - QT_BEGIN_NAMESPACE #ifdef Q_WS_WINCE diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp index c48b8f6..6e074a1 100644 --- a/src/gui/kernel/qguiplatformplugin.cpp +++ b/src/gui/kernel/qguiplatformplugin.cpp @@ -41,6 +41,9 @@ #include "qguiplatformplugin_p.h" #include <qdebug.h> +#include <qfile.h> +#include <qdir.h> +#include <qsettings.h> #include "private/qfactoryloader_p.h" #include "qstylefactory.h" #include "qapplication.h" @@ -58,6 +61,7 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp #if defined(Q_WS_X11) #include "qkde_p.h" #include "qt_x11_p.h" +#include <private/gtksymbols_p.h> #endif @@ -194,8 +198,68 @@ QPalette QGuiPlatformPlugin::palette() return QPalette(); } -/* backend for QIcon::fromTheme. A null icon means it uses the default backend */ -QIcon QGuiPlatformPlugin::loadIcon(const QString &name) +/* the default icon theme name for QIcon::fromTheme. */ +QString QGuiPlatformPlugin::systemIconThemeName() +{ + QString result; +#ifdef Q_WS_X11 + if (X11->desktopEnvironment == DE_GNOME) { + result = QString::fromLatin1("gnome"); +#ifndef QT_NO_STYLE_GTK + result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), result); +#endif + } else if (X11->desktopEnvironment == DE_KDE) { + result = X11->desktopVersion >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); + QSettings settings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); + settings.beginGroup(QLatin1String("Icons")); + result = settings.value(QLatin1String("Theme"), result).toString(); + } +#endif + return result; +} + + +QStringList QGuiPlatformPlugin::iconThemeSearchPaths() +{ + QStringList paths; +#if defined(Q_WS_X11) + QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); + if (xdgDirString.isEmpty()) + xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); + + QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); + + for (int i = 0 ; i < xdgDirs.size() ; ++i) { + QDir dir(xdgDirs[i]); + if (dir.exists()) + paths.append(dir.path() + QLatin1String("/icons")); + } + if (X11->desktopEnvironment == DE_KDE) { + paths << QLatin1Char(':') + QKde::kdeHome() + QLatin1String("/share/icons"); + QStringList kdeDirs = QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); + for (int i = 0 ; i< kdeDirs.count() ; ++i) { + QDir dir(QLatin1Char(':') + kdeDirs.at(i) + QLatin1String("/share/icons")); + if (dir.exists()) + paths.append(dir.path()); + } + } + + // Add home directory first in search path + QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); + if (homeDir.exists()) + paths.prepend(homeDir.path()); +#endif + +#if defined(Q_WS_WIN) + paths.append(qApp->applicationDirPath() + QLatin1String("/icons")); +#elif defined(Q_WS_MAC) + paths.append(qApp->applicationDirPath() + QLatin1String("/../Resources/icons")); +#endif + return paths; +} + +/* backend for QFileIconProvider, null icon means default */ +QIcon QGuiPlatformPlugin::fileSystemIcon(const QFileInfo &) { return QIcon(); } diff --git a/src/gui/kernel/qguiplatformplugin_p.h b/src/gui/kernel/qguiplatformplugin_p.h index 57ea8af..2a70ee7 100644 --- a/src/gui/kernel/qguiplatformplugin_p.h +++ b/src/gui/kernel/qguiplatformplugin_p.h @@ -68,6 +68,7 @@ class QPalette; class QIcon; class QFileDialog; class QColorDialog; +class QFileInfo; struct Q_GUI_EXPORT QGuiPlatformPluginInterface : public QFactoryInterface { @@ -89,8 +90,11 @@ class Q_GUI_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPlugi virtual QString styleName(); virtual QPalette palette(); - virtual QIcon loadIcon(const QString &name); - enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize }; + virtual QString systemIconThemeName(); + virtual QStringList iconThemeSearchPaths(); + virtual QIcon fileSystemIcon(const QFileInfo &); + + enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize, PH_ItemView_ActivateItemOnSingleClick }; virtual int platformHint(PlatformHint hint); diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp index 10958f3..be207df 100644 --- a/src/gui/kernel/qkeymapper_win.cpp +++ b/src/gui/kernel/qkeymapper_win.cpp @@ -905,8 +905,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool if(msg.wParam == VK_PROCESSKEY) return true; - // Ignore invalid virtual keycode (see bug 127424) - if (msg.wParam == 0xFF) + // Ignore invalid virtual keycodes (see bugs 127424, QTBUG-3630) + if (msg.wParam == 0 || msg.wParam == 0xFF) return true; // Translate VK_* (native) -> Key_* (Qt) keys diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 3328cee..b0d405a 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -434,7 +434,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de void QWidgetPrivate::show_sys() { Q_Q(QWidget); - + if (q->testAttribute(Qt::WA_OutsideWSRange)) return; @@ -490,7 +490,12 @@ void QWidgetPrivate::hide_sys() QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId()); if (id) { - if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() + //Incorrect optimisation - for popup windows, Qt's focus is moved before + //hide_sys is called, resulting in the popup window keeping its elevated + //position in the CONE control stack. + //This can result in keyboard focus being in an invisible widget in some + //conditions - e.g. QTBUG-4733 + //if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() id->setFocusSafely(false); id->MakeVisible(false); if (QWidgetBackingStore *bs = maybeBackingStore()) @@ -1253,7 +1258,7 @@ void QWidget::grabMouse() WId id = effectiveWinId(); id->SetPointerCapture(true); QWidgetPrivate::mouseGrabber = this; - + #ifndef QT_NO_CURSOR QApplication::setOverrideCursor(cursor()); #endif diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 612258a..5886512 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -5058,7 +5058,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget break; case SH_ItemView_ActivateItemOnSingleClick: - ret = false; + ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ItemView_ActivateItemOnSingleClick); break; case SH_TitleBar_ModifyNotification: diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 5052755..ce2109a 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -3309,7 +3309,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op // Draw the text centered QFont font = painter->font(); - font.setPointSize(font.pointSize() - 1); + font.setPointSize(QFontInfo(font).pointSize() - 1); painter->setFont(font); painter->setPen(dockWidget->palette.windowText().color()); painter->drawText(titleRect, diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 6bdb79e..4fa1d03 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -706,11 +706,10 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const palette->setColor(QPalette::AlternateBase, Qt::transparent); palette->setBrush(QPalette::Base, Qt::transparent); // set button and tooltipbase based on pixel colors -// After natitive pixmap support, colorFromFrameGraphics caused reproducable crashes on some setups. -// const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal); -// palette->setColor(QPalette::Button, buttonColor); -// const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip); -// palette->setColor(QPalette::ToolTipBase, toolTipColor); + const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal); + palette->setColor(QPalette::Button, buttonColor); + const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip); + palette->setColor(QPalette::ToolTipBase, toolTipColor); palette->setColor(QPalette::Light, palette->color(QPalette::Button).lighter()); palette->setColor(QPalette::Dark, palette->color(QPalette::Button).darker()); palette->setColor(QPalette::Midlight, palette->color(QPalette::Button).lighter(125)); @@ -1865,7 +1864,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, painter->save(); painter->setRenderHint(QPainter::Antialiasing); painter->setOpacity(opacity); - painter->setPen(QPen(option->palette.color(QPalette::Highlight), penWidth)); + painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth)); painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius); painter->restore(); } diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp index bf29870..c0bd5e7 100644 --- a/src/gui/util/qdesktopservices_win.cpp +++ b/src/gui/util/qdesktopservices_win.cpp @@ -59,6 +59,11 @@ # endif #endif +#if defined(Q_CC_MINGW) && !defined(CSIDL_MYMUSIC) +#define CSIDL_MYMUSIC 13 +#define CSIDL_MYVIDEO 14 +#endif + #ifndef QT_NO_DESKTOPSERVICES QT_BEGIN_NAMESPACE @@ -186,7 +191,11 @@ QString QDesktopServices::storageLocation(StandardLocation type) switch (type) { case DataLocation: +#if defined Q_WS_WINCE + if (SHGetSpecialFolderPath(0, path, CSIDL_APPDATA, FALSE)) +#else if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE)) +#endif result = QString::fromWCharArray(path); if (!QCoreApplication::organizationName().isEmpty()) result = result + QLatin1String("\\") + QCoreApplication::organizationName(); diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 19a8b63..588a48e 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -715,8 +715,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) #else stepsToScroll = int(d->offset_accumulated) * QApplication::wheelScrollLines() * d->singleStep; #endif - if (qAbs(stepsToScroll) > d->pageStep) - stepsToScroll = currentOffset > 0 ? d->pageStep : -d->pageStep; + stepsToScroll = qBound(-d->pageStep, stepsToScroll, d->pageStep); } if (d->invertedControls) diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 6cc720d..280ca63 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -468,18 +468,6 @@ void QDialogButtonBoxPrivate::layoutButtons() if (center) buttonLayout->addStretch(); - -#ifdef QT_SOFTKEYS_ENABLED - QWidget *dialog = 0; - QWidget *p = q; - while (p && !p->isWindow()) { - p = p->parentWidget(); - if (dialog = qobject_cast<QDialog *>(p)) - break; - } - if (dialog) - q->setFixedSize(0, 0); -#endif } QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardButton sbutton, @@ -1196,10 +1184,12 @@ bool QDialogButtonBox::event(QEvent *event) if (!hasDefault && firstAcceptButton) firstAcceptButton->setDefault(true); #ifdef QT_SOFTKEYS_ENABLED - if (dialog) + if (dialog) { + setFixedSize(0,0); dialog->addActions(d->softKeyActions.values()); - else + } else { addActions(d->softKeyActions.values()); + } #endif }else if (event->type() == QEvent::LanguageChange) { d->retranslateStrings(); diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index c656ef8..d757f98 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -74,12 +74,13 @@ struct SymbianMenuItem QAction* action; }; +Q_GLOBAL_STATIC_WITH_ARGS(QAction, contextAction, (0)) + static QList<SymbianMenuItem*> symbianMenus; static QList<QMenuBar*> nativeMenuBars; static uint qt_symbian_menu_static_cmd_id = QT_SYMBIAN_FIRST_MENU_ITEM; static QPointer<QWidget> widgetWithContextMenu; static QList<QAction*> contextMenuActionList; -static QAction contextAction(0); static int contexMenuCommand=0; bool menuExists() @@ -400,8 +401,8 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::rebuild() contextMenuActionList.clear(); if (widgetWithContextMenu) { contexMenuCommand = qt_symbian_menu_static_cmd_id; // Increased inside insertNativeMenuItems - contextAction.setText(QMenuBar::tr("Actions")); - contextMenuActionList.append(&contextAction); + contextAction()->setText(QMenuBar::tr("Actions")); + contextMenuActionList.append(contextAction()); insertNativeMenuItems(contextMenuActionList); } } diff --git a/src/gui/widgets/qtoolbarextension_p.h b/src/gui/widgets/qtoolbarextension_p.h index 5d622ec..5fe74a9 100644 --- a/src/gui/widgets/qtoolbarextension_p.h +++ b/src/gui/widgets/qtoolbarextension_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_TOOLBUTTON -class QToolBarExtension : public QToolButton +class Q_AUTOTEST_EXPORT QToolBarExtension : public QToolButton { Q_OBJECT Qt::Orientation orientation; diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index 866d1a2..1fe3999 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -67,7 +67,30 @@ void QGL2PEXVertexArray::addRect(const QRectF &rect) << rect.bottomRight() << rect.bottomLeft() << rect.topLeft(); } -void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseScale) +void QGL2PEXVertexArray::addClosingLine(int index) +{ + if (QPointF(vertexArray.at(index)) != QPointF(vertexArray.last())) + vertexArray.add(vertexArray.at(index)); +} + +void QGL2PEXVertexArray::addCentroid(const QVectorPath &path, int subPathIndex) +{ + const QPointF *const points = reinterpret_cast<const QPointF *>(path.points()); + const QPainterPath::ElementType *const elements = path.elements(); + + QPointF sum = points[subPathIndex]; + int count = 1; + + for (int i = subPathIndex + 1; i < path.elementCount() && (!elements || elements[i] != QPainterPath::MoveToElement); ++i) { + sum += points[i]; + ++count; + } + + const QPointF centroid = sum / qreal(count); + vertexArray.add(centroid); +} + +void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline) { const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); const QPainterPath::ElementType* const elements = path.elements(); @@ -78,6 +101,10 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc boundingRectDirty = false; } + if (!outline) + addCentroid(path, 0); + + int lastMoveTo = vertexArray.size(); vertexArray.add(points[0]); // The first element is always a moveTo do { @@ -96,8 +123,14 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc const QPainterPath::ElementType elementType = elements[i]; switch (elementType) { case QPainterPath::MoveToElement: + if (!outline) + addClosingLine(lastMoveTo); // qDebug("element[%d] is a MoveToElement", i); vertexArrayStops.append(vertexArray.size()); + if (!outline) { + addCentroid(path, i); + lastMoveTo = vertexArray.size(); + } lineToArray(points[i].x(), points[i].y()); // Add the moveTo as a new vertex break; case QPainterPath::LineToElement: @@ -115,6 +148,8 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc } } while (0); + if (!outline) + addClosingLine(lastMoveTo); vertexArrayStops.append(vertexArray.size()); } diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index 08ce234..719904f 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -104,7 +104,7 @@ public: boundingRectDirty(true) {} void addRect(const QRectF &rect); - void addPath(const QVectorPath &path, GLfloat curveInverseScale); + void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true); void clear(); QGLPoint* data() {return vertexArray.data();} @@ -124,6 +124,9 @@ private: bool boundingRectDirty; inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); + + void addClosingLine(int index); + void addCentroid(const QVectorPath &path, int subPathIndex); }; QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5875124..ab02c69 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -391,7 +391,6 @@ void QGL2PaintEngineExPrivate::setBrush(const QBrush* brush) } -// Unless this gets used elsewhere, it's probably best to merge it into fillStencilWithVertexArray void QGL2PaintEngineExPrivate::useSimpleShader() { shaderManager->simpleProgram()->enable(); @@ -881,26 +880,36 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) || path.shape() == QVectorPath::ConvexPolygonHint) { vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); prepareForDraw(currentBrush->isOpaque()); drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); } else { // The path is too complicated & needs the stencil technique vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); - // Stencil the brush onto the dest buffer - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT); // Pass if stencil buff value != 0 - glStencilOp(GL_KEEP, GL_ZERO, GL_ZERO); - glStencilMask(GL_STENCIL_HIGH_BIT); + glStencilMask(0xff); + glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); + + if (q->state()->clipTestEnabled) { + // Pass when high bit is set, replace stencil value with current clip + glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT); + } else if (path.hasWindingFill()) { + // Pass when any bit is set, replace stencil value with 0 + glStencilFunc(GL_NOTEQUAL, 0, 0xff); + } else { + // Pass when high bit is set, replace stencil value with 0 + glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT); + } prepareForDraw(currentBrush->isOpaque()); if (inRenderText) prepareDepthRangeForRenderText(); + // Stencil the brush onto the dest buffer composite(vertexCoordinateArray.boundingRect()); if (inRenderText) @@ -916,7 +925,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) void QGL2PaintEngineExPrivate::fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill) { // qDebug("QGL2PaintEngineExPrivate::fillStencilWithVertexArray()"); - glStencilMask(0xffff); // Enable stencil writes + glStencilMask(0xff); // Enable stencil writes if (dirtyStencilRegion.intersects(currentScissorBounds)) { QVector<QRect> clearRegion = dirtyStencilRegion.intersected(currentScissorBounds).rects(); @@ -948,39 +957,30 @@ void QGL2PaintEngineExPrivate::fillStencilWithVertexArray(QGL2PEXVertexArray& ve if (useWindingFill) { if (q->state()->clipTestEnabled) { + // Flatten clip values higher than current clip, and set high bit to match current clip glStencilFunc(GL_LEQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); composite(vertexArray.boundingRect()); glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT); - } else { - glStencilFunc(GL_ALWAYS, 0, 0xffff); + } else if (!stencilClean) { + // Clear stencil buffer within bounding rect + glStencilFunc(GL_ALWAYS, 0, 0xff); glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO); composite(vertexArray.boundingRect()); } // Inc. for front-facing triangle glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_INCR_WRAP, GL_INCR_WRAP); - //Dec. for back-facing "holes" + // Dec. for back-facing "holes" glStencilOpSeparate(GL_BACK, GL_KEEP, GL_DECR_WRAP, GL_DECR_WRAP); glStencilMask(~GL_STENCIL_HIGH_BIT); drawVertexArrays(vertexArray, GL_TRIANGLE_FAN); if (q->state()->clipTestEnabled) { - // clear high bit of stencil outside of path - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); - glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); - glStencilMask(GL_STENCIL_HIGH_BIT); - composite(vertexArray.boundingRect()); - // reset lower bits of stencil inside path to current clip - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, GL_STENCIL_HIGH_BIT); + // Clear high bit of stencil outside of path + glStencilFunc(GL_EQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); - glStencilMask(~GL_STENCIL_HIGH_BIT); - composite(vertexArray.boundingRect()); - } else { - // set high bit of stencil inside path - glStencilFunc(GL_NOTEQUAL, 0, 0xffff); - glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); glStencilMask(GL_STENCIL_HIGH_BIT); composite(vertexArray.boundingRect()); } @@ -1020,7 +1020,7 @@ void QGL2PaintEngineExPrivate::resetClipIfNeeded() QGLRect rect(bounds.left(), bounds.top(), bounds.right(), bounds.bottom()); // Set high bit on clip region - glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xffff); + glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xff); glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); glStencilMask(GL_STENCIL_HIGH_BIT); composite(rect); @@ -1028,7 +1028,7 @@ void QGL2PaintEngineExPrivate::resetClipIfNeeded() // Reset clipping to 1 and everything else to zero glStencilFunc(GL_NOTEQUAL, 0x01, GL_STENCIL_HIGH_BIT); glStencilOp(GL_ZERO, GL_REPLACE, GL_REPLACE); - glStencilMask(0xFFFF); + glStencilMask(0xff); composite(rect); q->state()->currentClip = 1; @@ -1636,6 +1636,7 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) d->use_system_clip = !systemClip().isEmpty(); d->dirtyStencilRegion = QRect(0, 0, d->width, d->height); + d->stencilClean = true; // Calling begin paint should make the correct context current. So, any // code which calls into GL or otherwise needs a current context *must* @@ -1731,7 +1732,7 @@ void QGL2PaintEngineExPrivate::updateClipScissorTest() glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); } else { glDisable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 0, 0xffff); + glStencilFunc(GL_ALWAYS, 0, 0xff); } #ifdef QT_GL_NO_SCISSOR_TEST @@ -1787,7 +1788,7 @@ void QGL2PaintEngineExPrivate::clearClip(uint value) { dirtyStencilRegion -= currentScissorBounds; - glStencilMask(0xffff); + glStencilMask(0xff); glClearStencil(value); glClear(GL_STENCIL_BUFFER_BIT); glStencilMask(0x0); @@ -1802,6 +1803,8 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) if (matrixDirty) updateMatrix(); + stencilClean = false; + const bool singlePass = !path.hasWindingFill() && (((q->state()->currentClip == maxClip - 1) && q->state()->clipTestEnabled) || q->state()->needsClipBufferClear); @@ -1819,10 +1822,10 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) if (q->state()->clipTestEnabled) glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); else - glStencilFunc(GL_ALWAYS, 0, 0xffff); + glStencilFunc(GL_ALWAYS, 0, 0xff); vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); if (!singlePass) fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); @@ -1841,9 +1844,17 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); } else { - glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); - glStencilMask(0xffff); + glStencilMask(0xff); + + if (!q->state()->clipTestEnabled && path.hasWindingFill()) { + // Pass when any clip bit is set, set high bit + glStencilFunc(GL_NOTEQUAL, GL_STENCIL_HIGH_BIT, ~GL_STENCIL_HIGH_BIT); + composite(vertexCoordinateArray.boundingRect()); + } + + // Pass when high bit is set, replace stencil value with new clip value + glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT); composite(vertexCoordinateArray.boundingRect()); } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 28c972e..46be398 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -223,6 +223,7 @@ public: bool shaderMatrixUniformDirty; bool opacityUniformDirty; + bool stencilClean; // Has the stencil not been used for clipping so far? QRegion dirtyStencilRegion; QRect currentScissorBounds; uint maxClip; diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index fa876c7..fbf0349 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -75,7 +75,7 @@ void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f props.setValue(EGL_STENCIL_SIZE, f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize()); if (f.sampleBuffers()) { props.setValue(EGL_SAMPLE_BUFFERS, 1); - props.setValue(EGL_SAMPLES, f.samples()); + props.setValue(EGL_SAMPLES, f.samples() == -1 ? 1 : f.samples()); } else { props.setValue(EGL_SAMPLE_BUFFERS, 0); } diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 3e54b35..5585208 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -988,7 +988,7 @@ QImage QGLFramebufferObject::toImage() const bool wasBound = isBound(); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->bind(); - QImage image = qt_gl_read_framebuffer(d->size, format().textureTarget() != GL_RGB, true); + QImage image = qt_gl_read_framebuffer(d->size, format().internalTextureFormat() != GL_RGB, true); if (!wasBound) const_cast<QGLFramebufferObject *>(this)->release(); diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp index 4cba1bb..744fbd4 100644 --- a/src/opengl/qglpixelbuffer_egl.cpp +++ b/src/opengl/qglpixelbuffer_egl.cpp @@ -151,7 +151,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge bool QGLPixelBufferPrivate::cleanup() { - eglDestroySurface(QEglContext::defaultDisplay(0), pbuf); + // No need to destroy "pbuf" here - it is done in QGLContext::reset(). return true; } @@ -202,13 +202,20 @@ GLuint QGLPixelBuffer::generateDynamicTexture() const bool QGLPixelBuffer::hasOpenGLPbuffers() { // See if we have at least 1 configuration that matches the default format. - QEglContext ctx; - if (!ctx.openDisplay(0)) + EGLDisplay dpy = QEglContext::defaultDisplay(0); + if (dpy == EGL_NO_DISPLAY) return false; QEglProperties configProps; qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat()); configProps.setRenderableType(QEgl::OpenGL); - return ctx.chooseConfig(configProps); + do { + EGLConfig cfg = 0; + EGLint matching = 0; + if (eglChooseConfig(dpy, configProps.properties(), + &cfg, 1, &matching) && matching > 0) + return true; + } while (configProps.reduceConfiguration()); + return false; } QT_END_NAMESPACE diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp index afee77e..09c0ace 100644 --- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp +++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp @@ -149,6 +149,18 @@ void PvrEglWindowSurface::setPermanentState(const QByteArray &state) Q_UNUSED(state); } +void PvrEglWindowSurface::flush + (QWidget *widget, const QRegion ®ion, const QPoint &offset) +{ + // The GL paint engine is responsible for the swapBuffers() call. + // If we were to call the base class's implementation of flush() + // then it would fetch the image() and manually blit it to the + // screeen instead of using the fast PVR2D blit. + Q_UNUSED(widget); + Q_UNUSED(region); + Q_UNUSED(offset); +} + QImage PvrEglWindowSurface::image() const { if (drawable) { @@ -165,14 +177,7 @@ QImage PvrEglWindowSurface::image() const QPaintDevice *PvrEglWindowSurface::paintDevice() { - QGLWidget *glWidget = qobject_cast<QGLWidget *>(window()); - if (glWidget) - return glWidget; - - // Should be a QGLWidget, but if not return a dummy paint device. - if (!pdevice) - pdevice = new QImage(50, 50, screen->pixelFormat()); - return pdevice; + return widget; } void PvrEglWindowSurface::setDirectRegion(const QRegion &r, int id) diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h index 80fc8f8..0da3653 100644 --- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h +++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h @@ -65,6 +65,8 @@ public: QByteArray permanentState() const; void setPermanentState(const QByteArray &state); + void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset); + QImage image() const; QPaintDevice *paintDevice(); diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 581d3bc..09ea6ab 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -10640,7 +10640,7 @@ EXPORTS _ZTI17QTextFramePrivate @ 10639 NONAME ABSENT _ZTI17QTextImageHandler @ 10640 NONAME ABSENT _ZTI17QTextTablePrivate @ 10641 NONAME ABSENT - _ZTI17QToolBarExtension @ 10642 NONAME ABSENT + _ZTI17QToolBarExtension @ 10642 NONAME _ZTI17QToolBarSeparator @ 10643 NONAME ABSENT _ZTI17QUpdateLaterEvent @ 10644 NONAME ABSENT _ZTI17QWhatsThisPrivate @ 10645 NONAME ABSENT @@ -11051,7 +11051,7 @@ EXPORTS _ZTV17QTextFramePrivate @ 11050 NONAME ABSENT _ZTV17QTextImageHandler @ 11051 NONAME ABSENT _ZTV17QTextTablePrivate @ 11052 NONAME ABSENT - _ZTV17QToolBarExtension @ 11053 NONAME ABSENT + _ZTV17QToolBarExtension @ 11053 NONAME _ZTV17QToolBarSeparator @ 11054 NONAME ABSENT _ZTV17QUpdateLaterEvent @ 11055 NONAME ABSENT _ZTV17QWhatsThisPrivate @ 11056 NONAME ABSENT @@ -13102,4 +13102,38 @@ EXPORTS _ZTI28QGraphicsAnchorLayoutPrivate @ 13101 NONAME _ZTV20QGraphicsBloomEffect @ 13102 NONAME _ZTV28QGraphicsAnchorLayoutPrivate @ 13103 NONAME + _ZN17QToolBarExtension10paintEventEP11QPaintEvent @ 13104 NONAME + _ZN17QToolBarExtension11qt_metacallEN11QMetaObject4CallEiPPv @ 13105 NONAME + _ZN17QToolBarExtension11qt_metacastEPKc @ 13106 NONAME + _ZN17QToolBarExtension14setOrientationEN2Qt11OrientationE @ 13107 NONAME + _ZN17QToolBarExtension16staticMetaObjectE @ 13108 NONAME DATA 16 + _ZN17QToolBarExtension19getStaticMetaObjectEv @ 13109 NONAME + _ZN17QToolBarExtensionC1EP7QWidget @ 13110 NONAME + _ZN17QToolBarExtensionC2EP7QWidget @ 13111 NONAME + _ZN18QGuiPlatformPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 13112 NONAME + _ZN18QGuiPlatformPlugin11qt_metacastEPKc @ 13113 NONAME + _ZN18QGuiPlatformPlugin12platformHintENS_12PlatformHintE @ 13114 NONAME + _ZN18QGuiPlatformPlugin14fileSystemIconERK9QFileInfo @ 13115 NONAME + _ZN18QGuiPlatformPlugin16staticMetaObjectE @ 13116 NONAME DATA 16 + _ZN18QGuiPlatformPlugin19getStaticMetaObjectEv @ 13117 NONAME + _ZN18QGuiPlatformPlugin19systemIconThemeNameEv @ 13118 NONAME + _ZN18QGuiPlatformPlugin20iconThemeSearchPathsEv @ 13119 NONAME + _ZN18QGuiPlatformPlugin7paletteEv @ 13120 NONAME + _ZN18QGuiPlatformPlugin9styleNameEv @ 13121 NONAME + _ZN18QGuiPlatformPluginC1EP7QObject @ 13122 NONAME + _ZN18QGuiPlatformPluginC2EP7QObject @ 13123 NONAME + _ZN18QGuiPlatformPluginD0Ev @ 13124 NONAME + _ZN18QGuiPlatformPluginD1Ev @ 13125 NONAME + _ZN18QGuiPlatformPluginD2Ev @ 13126 NONAME + _ZN28QGraphicsAnchorLayoutPrivate14solveExpandingE5QListIP18QSimplexConstraintE @ 13127 NONAME + _ZN28QGraphicsAnchorLayoutPrivate21identifyNonFloatItemsE4QSetIP10AnchorDataENS_11OrientationE @ 13128 NONAME + _ZN28QGraphicsAnchorLayoutPrivate28identifyNonFloatItems_helperEPK10AnchorDataNS_11OrientationE @ 13129 NONAME + _ZNK17QToolBarExtension10metaObjectEv @ 13130 NONAME + _ZNK17QToolBarExtension8sizeHintEv @ 13131 NONAME + _ZNK18QGuiPlatformPlugin10metaObjectEv @ 13132 NONAME + _ZTI18QGuiPlatformPlugin @ 13133 NONAME + _ZTI27QGuiPlatformPluginInterface @ 13134 NONAME + _ZTV18QGuiPlatformPlugin @ 13135 NONAME + _ZThn8_N18QGuiPlatformPluginD0Ev @ 13136 NONAME + _ZThn8_N18QGuiPlatformPluginD1Ev @ 13137 NONAME diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def index cca0a2a..1205c04 100644 --- a/src/s60installs/eabi/QtScriptu.def +++ b/src/s60installs/eabi/QtScriptu.def @@ -600,4 +600,5 @@ EXPORTS _ZN25QScriptEngineAgentPrivate18didReachBreakpointERKN5QTJSC17DebuggerCallFrameEiii @ 599 NONAME _ZN25QScriptEngineAgentPrivate6attachEv @ 600 NONAME _ZN25QScriptEngineAgentPrivate6detachEv @ 601 NONAME + _Z5qHashRK13QScriptString @ 602 NONAME diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 5f31054..f1fc135 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -468,6 +468,22 @@ inline QScriptValue QScriptValuePrivate::property(const QString &name, int resol return property(JSC::Identifier(exec, name), resolveMode); } +inline void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) +{ + if (engine) + return engine->allocateScriptValuePrivate(size); + return qMalloc(size); +} + +inline void QScriptValuePrivate::operator delete(void *ptr) +{ + QScriptValuePrivate *d = reinterpret_cast<QScriptValuePrivate*>(ptr); + if (d->engine) + d->engine->freeScriptValuePrivate(d); + else + qFree(d); +} + inline void QScriptEnginePrivate::registerScriptString(QScriptStringPrivate *value) { Q_ASSERT(value->type == QScriptStringPrivate::HeapAllocated); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 92c987c..b8340a7 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -280,7 +280,7 @@ QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolv { Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = jscValue.getObject(); + JSC::JSObject *object = JSC::asObject(jscValue); JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object)); JSC::JSValue result; if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, id, slot)) { @@ -303,7 +303,7 @@ QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const { Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = jscValue.getObject(); + JSC::JSObject *object = JSC::asObject(jscValue); JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object)); JSC::JSValue result; if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, index, slot)) { @@ -466,22 +466,6 @@ void QScriptValuePrivate::detachFromEngine() engine = 0; } -void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) -{ - if (engine) - return engine->allocateScriptValuePrivate(size); - return qMalloc(size); -} - -void QScriptValuePrivate::operator delete(void *ptr) -{ - QScriptValuePrivate *d = reinterpret_cast<QScriptValuePrivate*>(ptr); - if (d->engine) - d->engine->freeScriptValuePrivate(d); - else - qFree(d); -} - /*! \internal */ diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 6cbda97..77b5084 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -66,10 +66,10 @@ class QScriptEnginePrivate; class QScriptValue; class QScriptValuePrivate { - Q_DISABLE_COPY(QScriptValuePrivate); + Q_DISABLE_COPY(QScriptValuePrivate) public: - void* operator new(size_t, QScriptEnginePrivate*); - void operator delete(void*); + inline void* operator new(size_t, QScriptEnginePrivate*); + inline void operator delete(void*); enum Type { JavaScriptCore, |