summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merilä <sami.merila@nokia.com>2009-10-02 13:21:34 (GMT)
committerSami Merilä <sami.merila@nokia.com>2009-10-02 13:21:34 (GMT)
commit1ffaf40f5cffca57d7e116d61935ccd034239222 (patch)
treef8d9c73bb0a1ede03418415163b957fcf060e6f6 /src
parentc206ea53ebac0436bad0c00c1e340f23efb3aa16 (diff)
parenta841c496bb7ca54fef01f9785e0d91991172b182 (diff)
downloadQt-1ffaf40f5cffca57d7e116d61935ccd034239222.zip
Qt-1ffaf40f5cffca57d7e116d61935ccd034239222.tar.gz
Qt-1ffaf40f5cffca57d7e116d61935ccd034239222.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri3
-rw-r--r--src/3rdparty/javascriptcore/WebKit.pri4
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/mmf_medianode.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/mmf_videoplayer.cpp109
-rw-r--r--src/3rdparty/phonon/mmf/mmf_videoplayer.h2
-rw-r--r--src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit.pri4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp13
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.h1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp22
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp6
-rw-r--r--src/corelib/global/qnamespace.h6
-rw-r--r--src/corelib/global/qnamespace.qdoc26
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
-rw-r--r--src/gui/embedded/qvfbhdr.h18
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp95
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp243
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp28
-rw-r--r--src/gui/image/qimage_p.h2
-rw-r--r--src/gui/image/qpixmap_s60.cpp4
-rw-r--r--src/gui/image/qpixmap_x11.cpp33
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp27
-rw-r--r--src/gui/itemviews/qabstractitemview.h5
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h9
-rw-r--r--src/gui/kernel/qapplication_qws.cpp2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp13
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp42
-rw-r--r--src/gui/painting/qdrawutil.cpp36
-rw-r--r--src/gui/painting/qdrawutil.h18
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp21
-rw-r--r--src/gui/widgets/qlabel.cpp13
-rw-r--r--src/gui/widgets/qtextedit.cpp5
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp10
-rw-r--r--src/opengl/qgl.cpp28
-rw-r--r--src/opengl/qgl_x11egl.cpp12
-rw-r--r--src/opengl/qpixmapdata_gl.cpp21
-rw-r--r--src/opengl/qwindowsurface_gl.cpp6
-rw-r--r--src/testlib/qtestcase.cpp4
70 files changed, 615 insertions, 387 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
index 8483469..965f3d6 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
@@ -37,6 +37,9 @@ win32-* {
LIBS += -lwinmm
}
+contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
+
# In debug mode JIT disabled until crash fixed
win32-* {
CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
diff --git a/src/3rdparty/javascriptcore/WebKit.pri b/src/3rdparty/javascriptcore/WebKit.pri
index ded4701..fd918c9 100644
--- a/src/3rdparty/javascriptcore/WebKit.pri
+++ b/src/3rdparty/javascriptcore/WebKit.pri
@@ -48,7 +48,7 @@ symbian|*-armcc {
RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
DEFINES *= QT_NO_UITOOLS
-}
+}
*-armcc {
QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
@@ -63,7 +63,7 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
# Disable a few warnings on Windows. The warnings are also
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
-win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996
+win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
#
# For builds inside Qt we interpret the output rule and the input of each extra compiler manually
diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp
index aa2a94b..6c1fc68 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.cpp
+++ b/src/3rdparty/phonon/mmf/audioplayer.cpp
@@ -101,7 +101,7 @@ int MMF::AudioPlayer::setDeviceVolume(int mmfVolume)
* stack by doing a runtime check of the SDK version. */
#if !defined(__SERIES60_31__)
const int err = m_player->SetVolume(mmfVolume);
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_3_1)
+ if (QSysInfo::s60Version() >= QSysInfo::SV_S60_5_0)
return err;
else
return KErrNone;
diff --git a/src/3rdparty/phonon/mmf/mmf_medianode.cpp b/src/3rdparty/phonon/mmf/mmf_medianode.cpp
index b5ea91a..b60d6f4 100644
--- a/src/3rdparty/phonon/mmf/mmf_medianode.cpp
+++ b/src/3rdparty/phonon/mmf/mmf_medianode.cpp
@@ -49,7 +49,7 @@ bool MMF::MediaNode::disconnectMediaNode(MediaNode *target)
Q_UNUSED(target);
m_target = 0;
m_isApplied = false;
- return false;
+ return true;
}
void MMF::MediaNode::setSource(MediaNode *source)
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
index 83d715d..c7fa791 100644
--- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
@@ -16,11 +16,12 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <QApplication> // for QApplication::activeWindow
#include <QUrl>
#include <QTimer>
#include <QWidget>
-#include <coemain.h> // For CCoeEnv
+#include <coemain.h> // for CCoeEnv
#include <coecntrl.h>
#include "mmf_videoplayer.h"
@@ -69,11 +70,8 @@ void MMF::VideoPlayer::construct()
TRACE_CONTEXT(VideoPlayer::VideoPlayer, EVideoApi);
TRACE_ENTRY_0();
- if (!m_videoOutput) {
- m_dummyVideoOutput.reset(new VideoOutput(0));
- }
-
- videoOutput().setObserver(this);
+ if(m_videoOutput)
+ m_videoOutput->setObserver(this);
const TInt priority = 0;
const TMdaPriorityPreference preference = EMdaPriorityPreferenceNone;
@@ -253,7 +251,8 @@ void MMF::VideoPlayer::MvpuoPrepareComplete(TInt aError)
if (KErrNone == err) {
maxVolumeChanged(m_player->MaxVolume());
- videoOutput().setFrameSize(m_frameSize);
+ if(m_videoOutput)
+ m_videoOutput->setFrameSize(m_frameSize);
// See comment in updateMmfOutput
if(m_mmfOutputChangePending) {
@@ -339,6 +338,38 @@ void MMF::VideoPlayer::videoOutputRegionChanged()
TRACE_EXIT_0();
}
+// DEBUGGING *** DO NOT INTEGRATE ***
+class CDummyAO : public CActive
+{
+public:
+ CDummyAO() : CActive(CActive::EPriorityStandard) { CActiveScheduler::Add(this); }
+ void RunL() { }
+ void DoCancel() { }
+ TRequestStatus& Status() { return iStatus; }
+ void SetActive() { CActive::SetActive(); }
+};
+
+// DEBUGGING *** DO NOT INTEGRATE ***
+void getDsaRegion(RWsSession &session, const RWindowBase &window)
+{
+ RDirectScreenAccess dsa(session);
+ TInt err = dsa.Construct();
+ CDummyAO ao;
+ RRegion* region;
+ err = dsa.Request(region, ao.Status(), window);
+ ao.SetActive();
+ dsa.Close();
+ ao.Cancel();
+ if(region) {
+ qDebug() << "Phonon::MMF::getDsaRegion count" << region->Count();
+ for(int i=0; i<region->Count(); ++i) {
+ const TRect& rect = region->RectangleList()[i];
+ qDebug() << "Phonon::MMF::getDsaRegion rect" << rect.iTl.iX << rect.iTl.iY << rect.iBr.iX << rect.iBr.iY;
+ }
+ region->Close();
+ }
+}
+
void MMF::VideoPlayer::updateMmfOutput()
{
TRACE_CONTEXT(VideoPlayer::updateMmfOutput, EVideoInternal);
@@ -351,13 +382,10 @@ void MMF::VideoPlayer::updateMmfOutput()
// MvpuoPrepareComplete, at which point the MMF controller has been
// loaded.
- // TODO: check whether videoOutput is visible? If not, then the
- // corresponding window will not be active, meaning that the
- // clipping region will be set to empty and the video will not be
- // visible. If this is the case, we should set m_mmfOutputChangePending
- // and respond to future showEvents from the videoOutput widget.
-
getNativeWindowSystemHandles();
+
+// DEBUGGING *** DO NOT INTEGRATE ***
+getDsaRegion(*m_wsSession, *m_window);
TRAPD(err,
m_player->SetDisplayWindowL
@@ -383,28 +411,16 @@ void MMF::VideoPlayer::updateMmfOutput()
// Private functions
//-----------------------------------------------------------------------------
-VideoOutput& MMF::VideoPlayer::videoOutput()
-{
- TRACE_CONTEXT(VideoPlayer::videoOutput, EVideoInternal);
- TRACE("videoOutput 0x%08x dummy 0x%08x", m_videoOutput, m_dummyVideoOutput.data());
-
- return m_videoOutput ? *m_videoOutput : *m_dummyVideoOutput;
-}
-
void MMF::VideoPlayer::videoOutputChanged()
{
TRACE_CONTEXT(VideoPlayer::videoOutputChanged, EVideoInternal);
TRACE_ENTRY_0();
- // Lazily construct a dummy output if needed here
- if (!m_videoOutput and m_dummyVideoOutput.isNull()) {
- m_dummyVideoOutput.reset(new VideoOutput(0));
+ if(m_videoOutput) {
+ m_videoOutput->setObserver(this);
+ m_videoOutput->setFrameSize(m_frameSize);
}
- videoOutput().setObserver(this);
-
- videoOutput().setFrameSize(m_frameSize);
-
videoOutputRegionChanged();
TRACE_EXIT_0();
@@ -414,9 +430,15 @@ void MMF::VideoPlayer::getNativeWindowSystemHandles()
{
TRACE_CONTEXT(VideoPlayer::getNativeWindowSystemHandles, EVideoInternal);
TRACE_ENTRY_0();
-
- VideoOutput& output = videoOutput();
- CCoeControl* const control = output.winId();
+
+ CCoeControl *control = 0;
+
+ if(m_videoOutput)
+ // Create native window
+ control = m_videoOutput->winId();
+ else
+ // Get top-level window
+ control = QApplication::activeWindow()->effectiveWinId();
CCoeEnv* const coeEnv = control->ControlEnv();
m_wsSession = &(coeEnv->WsSession());
@@ -424,18 +446,29 @@ void MMF::VideoPlayer::getNativeWindowSystemHandles()
m_window = control->DrawableWindow();
#ifdef _DEBUG
- QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper);
- dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs
- ObjectDump::addDefaultAnnotators(*dumper);
- TRACE_0("Dumping VideoOutput:");
- dumper->dumpObject(output);
+ if(m_videoOutput) {
+ QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper);
+ dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs
+ ObjectDump::addDefaultAnnotators(*dumper);
+ TRACE_0("Dumping VideoOutput:");
+ dumper->dumpObject(*m_videoOutput);
+ }
+ else {
+ TRACE_0("m_videoOutput is null - dumping top-level control info:");
+ TRACE("control %08x", control);
+ TRACE("control.parent %08x", control->Parent());
+ TRACE("control.isVisible %d", control->IsVisible());
+ TRACE("control.rect %d,%d %dx%d",
+ control->Position().iX, control->Position().iY,
+ control->Size().iWidth, control->Size().iHeight);
+ TRACE("control.ownsWindow %d", control->OwnsWindow());
+ }
#endif
m_windowRect = TRect(
control->DrawableWindow()->AbsPosition(),
control->DrawableWindow()->Size());
-
- m_clipRect = m_windowRect;
+ m_clipRect = m_windowRect;
TRACE("windowRect %d %d - %d %d",
m_windowRect.iTl.iX, m_windowRect.iTl.iY,
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.h b/src/3rdparty/phonon/mmf/mmf_videoplayer.h
index a805135..ee3650a 100644
--- a/src/3rdparty/phonon/mmf/mmf_videoplayer.h
+++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.h
@@ -75,7 +75,6 @@ public:
private:
void construct();
- VideoOutput& videoOutput();
void doPrepareCompleteL(TInt aError);
@@ -87,7 +86,6 @@ private:
private:
QScopedPointer<CVideoPlayerUtility> m_player;
- QScopedPointer<VideoOutput> m_dummyVideoOutput;
// Not owned
RWsSession* m_wsSession;
diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp
index f8adcd5..5ae10f9 100644
--- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp
+++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp
@@ -82,9 +82,10 @@ QList<QByteArray> QAnnotatorWindow::annotation(const QObject& object)
// ClientHandle() is available first in 5.0.
#if !defined(__SERIES60_31__) && !defined(__S60_32__)
- // Client-side window handle
- // Cast to a void pointer so that log output is in hexadecimal format.
- stream << "cli " << reinterpret_cast<const void*>(window.ClientHandle()) << ' ';
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_3_2)
+ // Client-side window handle
+ // Cast to a void pointer so that log output is in hexadecimal format.
+ stream << "cli " << reinterpret_cast<const void*>(window.ClientHandle()) << ' ';
#endif
// Server-side address of CWsWindow object
@@ -104,7 +105,9 @@ QList<QByteArray> QAnnotatorWindow::annotation(const QObject& object)
stream << window.Size().iWidth << 'x' << window.Size().iHeight << ' ';
const TDisplayMode displayMode = window.DisplayMode();
- stream << "mode " << displayMode;
+ stream << "mode " << displayMode << ' ';
+
+ stream << "ord " << window.OrdinalPosition();
stream.flush();
result.append(array);
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
index 73791e0..d8b6f4b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
@@ -36,6 +36,8 @@ GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
win32-* {
LIBS += -lwinmm
}
+contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
+contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
# In debug mode JIT disabled until crash fixed
win32-* {
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h
index 19d4207..dc6b130 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h
@@ -26,7 +26,7 @@
QT_BEGIN_NAMESPACE
class QObject;
-class QMetaObject;
+struct QMetaObject;
QT_END_NAMESPACE
namespace JSC {
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 23eef11..3cb2156 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -1339,7 +1339,7 @@ void QtRuntimeMetaMethod::markChildren(MarkStack& markStack)
markStack.append(d->m_disconnect);
}
-JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args)
+JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSValue, const ArgList& args)
{
QtRuntimeMetaMethodData* d = static_cast<QtRuntimeMetaMethod *>(functionObject)->d_func();
@@ -1437,7 +1437,7 @@ QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, const Iden
d->m_isConnect = isConnect;
}
-JSValue QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args)
+JSValue QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObject, JSValue, const ArgList& args)
{
QtRuntimeConnectionMethodData* d = static_cast<QtRuntimeConnectionMethod *>(functionObject)->d_func();
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
index f745830..04405d6 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
@@ -238,7 +238,7 @@ void XMLTokenizer::doWrite(const String& parseString)
return;
}
-void XMLTokenizer::initializeParserContext(const char* chunk)
+void XMLTokenizer::initializeParserContext(const char*)
{
m_parserStopped = false;
m_sawError = false;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
index aa79cb9..1113eae 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
@@ -48,7 +48,7 @@ FontCache::FontCache()
{
}
-void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector<unsigned>& traitsMasks)
+void FontCache::getTraitsInFamily(const AtomicString&, Vector<unsigned>&)
{
}
@@ -177,7 +177,7 @@ typedef HashMap<FontPlatformDataCacheKey, FontPlatformData*, FontPlatformDataCac
// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this.
static FontPlatformDataCache* gFontPlatformDataCache = 0;
-FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool checkingAlternateName)
+FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString&, bool)
{
if (!gFontPlatformDataCache)
gFontPlatformDataCache = new FontPlatformDataCache;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
index c29fd56..8e1e4f6 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
@@ -130,7 +130,7 @@ const FontData* FontFallbackList::fontDataForCharacters(const WebCore::Font* fon
return primaryFontData(font);
}
-void FontFallbackList::setPlatformFont(const WebCore::FontPlatformData& platformData)
+void FontFallbackList::setPlatformFont(const WebCore::FontPlatformData&)
{
m_familyIndex = cAllFamiliesScanned;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
index e8eb923..c5960ac 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
@@ -197,7 +197,7 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
return w + run.padding();
}
-int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool includePartialGlyphs) const
+int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool) const
{
const QString string = fixSpacing(qstring(run));
QTextLayout layout(string, font());
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 2f367fa..094054b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -860,7 +860,7 @@ void GraphicsContext::drawFocusRing(const Color& color)
p->setRenderHint(QPainter::Antialiasing, antiAlias);
}
-void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing)
+void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool)
{
if (paintingDisabled())
return;
@@ -869,8 +869,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
drawLine(origin, endPoint);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&,
- int width, bool grammar)
+void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int, bool)
{
if (paintingDisabled())
return;
@@ -887,7 +886,7 @@ FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& frect)
return FloatRect(QRectF(result));
}
-void GraphicsContext::setPlatformShadow(const IntSize& size, int blur, const Color &color)
+void GraphicsContext::setPlatformShadow(const IntSize& size, int, const Color&)
{
// Qt doesn't support shadows natively, they are drawn manually in the draw*
// functions
@@ -1198,7 +1197,7 @@ void GraphicsContext::concatCTM(const TransformationMatrix& transform)
}
}
-void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
+void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
{
notImplemented();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp
index 34c3c47..98f4606 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp
@@ -47,7 +47,7 @@ PassRefPtr<Icon> Icon::createIconForFile(const String& filename)
return i.release();
}
-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
+PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
{
//FIXME: Implement this
return 0;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index be32797..5255428 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -68,7 +68,7 @@ ImageBufferData::ImageBufferData(const IntSize& size)
painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
}
-ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace imageColorSpace, bool& success)
+ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace, bool& success)
: m_data(size)
, m_size(size)
{
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index bf6210b..8851984 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -301,7 +301,7 @@ String ImageDecoderQt::filenameExtension() const
return m_imageFormat;
};
-RGBA32Buffer* ImageDecoderQt::frameBufferAtIndex(size_t index)
+RGBA32Buffer* ImageDecoderQt::frameBufferAtIndex(size_t)
{
Q_ASSERT("use imageAtIndex instead");
return 0;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
index 71c5cd4..f0d513c 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
@@ -150,7 +150,7 @@ void MediaPlayerPrivate::getSupportedTypes(HashSet<String>&)
notImplemented();
}
-MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& type, const String& codecs)
+MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String&, const String&)
{
// FIXME: do the real thing
notImplemented();
@@ -259,7 +259,7 @@ float MediaPlayerPrivate::currentTime() const
return currentTime;
}
-void MediaPlayerPrivate::setEndTime(float endTime)
+void MediaPlayerPrivate::setEndTime(float)
{
notImplemented();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp
index f823f84..f093d7d 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp
@@ -33,7 +33,7 @@ void SimpleFontData::determinePitch()
m_treatAsFixedPitch = m_platformData.font().fixedPitch();
}
-bool SimpleFontData::containsCharacters(const UChar*, int length) const
+bool SimpleFontData::containsCharacters(const UChar*, int) const
{
return true;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h b/src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h
index 2b2c1f7..6c417b1 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h
@@ -41,7 +41,7 @@ namespace WebCore {
// FIXME: StillImages are underreporting decoded sizes and will be unable
// to prune because these functions are not implemented yet.
- virtual void destroyDecodedData(bool destroyAll = true) { }
+ virtual void destroyDecodedData(bool destroyAll = true) { Q_UNUSED(destroyAll); }
virtual unsigned decodedSize() const { return 0; }
virtual IntSize size() const;
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
index e85d2dc..0d98fcb 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
@@ -56,7 +56,7 @@ namespace WebCore {
}
}
- void lookedUp(const QHostInfo &host)
+ void lookedUp(const QHostInfo&)
{
// we do not cache the result, we throw it away.
// we currently rely on the OS to cache the results. If it does not do that
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp
index 063a46b..9b1a054 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp
@@ -61,7 +61,7 @@ void ContextMenu::insertItem(unsigned position, ContextMenuItem& item)
m_items.insert(position, item);
}
-void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
+void ContextMenu::setPlatformDescription(PlatformMenuDescription)
{
// doesn't make sense
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp
index c8c0be1..b0611e6 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp
@@ -119,7 +119,7 @@ bool DragData::containsURL() const
return m_platformDragData->hasUrls();
}
-String DragData::asURL(String* title) const
+String DragData::asURL(String*) const
{
if (!m_platformDragData)
return String();
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
index 9ce5838..b44f2ec 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp
@@ -60,7 +60,7 @@ void PopupMenu::clear()
m_popup->clear();
}
-void PopupMenu::populate(const IntRect& r)
+void PopupMenu::populate(const IntRect&)
{
clear();
Q_ASSERT(client());
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index f250047..f505d0c 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -172,7 +172,7 @@ bool RenderThemeQt::supportsHover(const RenderStyle*) const
return true;
}
-bool RenderThemeQt::supportsFocusRing(const RenderStyle* style) const
+bool RenderThemeQt::supportsFocusRing(const RenderStyle*) const
{
return true; // Qt provides this through the style
}
@@ -274,7 +274,7 @@ Color RenderThemeQt::platformInactiveSelectionForegroundColor() const
return pal.brush(QPalette::Inactive, QPalette::HighlightedText).color();
}
-void RenderThemeQt::systemFont(int propId, FontDescription& fontDescription) const
+void RenderThemeQt::systemFont(int, FontDescription&) const
{
// no-op
}
@@ -387,7 +387,7 @@ bool RenderThemeQt::paintRadio(RenderObject* o, const RenderObject::PaintInfo& i
return paintButton(o, i, r);
}
-void RenderThemeQt::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
+void RenderThemeQt::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element*) const
{
// Ditch the border.
style->resetBorder();
@@ -584,8 +584,7 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
return false;
}
-void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
+void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
@@ -887,13 +886,13 @@ bool RenderThemeQt::paintMediaPlayButton(RenderObject* o, const RenderObject::Pa
return false;
}
-bool RenderThemeQt::paintMediaSeekBackButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeQt::paintMediaSeekBackButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&)
{
// We don't want to paint this at the moment.
return false;
}
-bool RenderThemeQt::paintMediaSeekForwardButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
+bool RenderThemeQt::paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&)
{
// We don't want to paint this at the moment.
return false;
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
index 48885d3..ccbd751 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
@@ -53,7 +53,7 @@ void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
parent()->adjustWidgetsPreventingBlittingCount(delta);
}
-void ScrollView::platformAddChild(Widget* child)
+void ScrollView::platformAddChild(Widget*)
{
adjustWidgetsPreventingBlittingCount(1);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp
index 7822b2c..187a5de 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp
@@ -29,11 +29,11 @@ SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client)
{
}
-void SearchPopupMenu::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
+void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&)
{
}
-void SearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)
+void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&)
{
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp
index d37d412..814f961 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp
@@ -100,7 +100,7 @@ void getSupportedKeySizes(Vector<String>&)
notImplemented();
}
-String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url)
+String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&)
{
return String();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp
index 4e82080..e9c99a4 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp
@@ -101,7 +101,7 @@ void Widget::hide()
platformWidget()->hide();
}
-void Widget::paint(GraphicsContext *, const IntRect &rect)
+void Widget::paint(GraphicsContext*, const IntRect&)
{
}
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp
index 9fada0e..6d27e20 100644
--- a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp
@@ -83,12 +83,12 @@ void XSLStyleSheet::loadChildSheets()
notImplemented();
}
-void XSLStyleSheet::loadChildSheet(const String& href)
+void XSLStyleSheet::loadChildSheet(const String&)
{
notImplemented();
}
-void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent)
+void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*)
{
notImplemented();
}
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
index 523306a..50ee427 100644
--- a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
@@ -60,7 +60,7 @@ XSLTMessageHandler::XSLTMessageHandler(Document* document)
}
void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& description,
- const QUrl& identifier, const QSourceLocation& sourceLocation)
+ const QUrl&, const QSourceLocation& sourceLocation)
{
if (!m_document->frame())
return;
@@ -87,7 +87,7 @@ void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& descriptio
sourceLocation.line(), sourceLocation.uri().toString());
}
-bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String& resultString, String& resultEncoding)
+bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultString, String&)
{
bool success = false;
diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri
index ded4701..fd918c9 100644
--- a/src/3rdparty/webkit/WebKit.pri
+++ b/src/3rdparty/webkit/WebKit.pri
@@ -48,7 +48,7 @@ symbian|*-armcc {
RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
DEFINES *= QT_NO_UITOOLS
-}
+}
*-armcc {
QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
@@ -63,7 +63,7 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
# Disable a few warnings on Windows. The warnings are also
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
-win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996
+win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
#
# For builds inside Qt we interpret the output rule and the input of each extra compiler manually
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index fe813b8..780f862 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -873,6 +873,7 @@ int QWebFrame::scrollBarMaximum(Qt::Orientation orientation) const
*/
int QWebFrame::scrollBarMinimum(Qt::Orientation orientation) const
{
+ Q_UNUSED(orientation)
return 0;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 942c3ea..655fd0e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -967,7 +967,7 @@ void QWebPagePrivate::keyReleaseEvent(QKeyEvent *ev)
ev->setAccepted(handled);
}
-void QWebPagePrivate::focusInEvent(QFocusEvent *ev)
+void QWebPagePrivate::focusInEvent(QFocusEvent*)
{
FocusController *focusController = page->focusController();
Frame *frame = focusController->focusedFrame();
@@ -978,7 +978,7 @@ void QWebPagePrivate::focusInEvent(QFocusEvent *ev)
focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame));
}
-void QWebPagePrivate::focusOutEvent(QFocusEvent *ev)
+void QWebPagePrivate::focusOutEvent(QFocusEvent*)
{
// only set the focused frame inactive so that we stop painting the caret
// and the focus frame. But don't tell the focus controller so that upon
@@ -1082,7 +1082,7 @@ void QWebPagePrivate::dropEvent(QDropEvent* ev)
#endif
}
-void QWebPagePrivate::leaveEvent(QEvent *ev)
+void QWebPagePrivate::leaveEvent(QEvent*)
{
// Fake a mouse move event just outside of the widget, since all
// the interesting mouse-out behavior like invalidating scrollbars
@@ -1722,6 +1722,7 @@ void QWebPage::javaScriptConsoleMessage(const QString& message, int lineNumber,
*/
void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
{
+ Q_UNUSED(frame)
#ifndef QT_NO_MESSAGEBOX
QMessageBox::information(d->view, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
#endif
@@ -1735,6 +1736,7 @@ void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
*/
bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
{
+ Q_UNUSED(frame)
#ifdef QT_NO_MESSAGEBOX
return true;
#else
@@ -1753,6 +1755,7 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
*/
bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
{
+ Q_UNUSED(frame)
bool ok = false;
#ifndef QT_NO_INPUTDIALOG
QString x = QInputDialog::getText(d->view, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
@@ -1846,7 +1849,7 @@ static void openNewWindow(const QUrl& url, WebCore::Frame* frame)
\sa action()
*/
-void QWebPage::triggerAction(WebAction action, bool checked)
+void QWebPage::triggerAction(WebAction action, bool)
{
WebCore::Frame *frame = d->page->focusController()->focusedOrMainFrame();
if (!frame)
@@ -2032,6 +2035,7 @@ bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &
bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)
#endif
{
+ Q_UNUSED(frame)
if (type == NavigationTypeLinkClicked) {
switch (d->linkPolicy) {
case DontDelegateLinks:
@@ -2805,6 +2809,7 @@ QWebSettings *QWebPage::settings() const
*/
QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile)
{
+ Q_UNUSED(parentFrame)
#ifndef QT_NO_FILEDIALOG
return QFileDialog::getOpenFileName(d->view, QString::null, suggestedFile);
#else
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index c7515ab..3c5f89f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -650,6 +650,7 @@ qreal QWebView::textSizeMultiplier() const
return page()->mainFrame()->textSizeMultiplier();
}
+#if !defined(Q_OS_SYMBIAN)
/*!
\property QWebView::renderHints
\since 4.6
@@ -661,6 +662,7 @@ qreal QWebView::textSizeMultiplier() const
\sa QPainter::renderHints()
*/
+#endif
QPainter::RenderHints QWebView::renderHints() const
{
return d->renderHints;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
index 0f2649d..15b5836 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
@@ -53,6 +53,7 @@ class QWEBKIT_EXPORT QWebView : public QWidget {
// FIXME: temporary work around for elftran issue that it couldn't find the QPainter::staticMetaObject
// symbol from Qt lib; it should be reverted after the right symbol is exported.
+// remember to revert the qdoc \property comment as well.
// See bug: http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=258893
#if !defined(Q_OS_SYMBIAN)
Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints)
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 5c65112..26cf6f6 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -305,7 +305,7 @@ IntRect ChromeClientQt::windowResizerRect() const
return IntRect();
}
-void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly)
+void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool)
{
// No double buffer, so only update the QWidget if content changed.
if (contentChanged) {
@@ -351,7 +351,7 @@ void ChromeClientQt::contentsSizeChanged(Frame* frame, const IntSize& size) cons
emit QWebFramePrivate::kit(frame)->contentsSizeChanged(size);
}
-void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags)
+void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsigned)
{
TextDirection dir;
if (result.absoluteLinkURL() != lastHoverURL
@@ -402,7 +402,7 @@ void ChromeClientQt::exceededDatabaseQuota(Frame* frame, const String& databaseN
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-void ChromeClientQt::reachedMaxAppCacheSize(int64_t spaceNeeded)
+void ChromeClientQt::reachedMaxAppCacheSize(int64_t)
{
// FIXME: Free some space.
notImplemented();
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
index ed79946..b4400ff 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
@@ -52,7 +52,7 @@ void ContextMenuClientQt::contextMenuItemSelected(ContextMenuItem*, const Contex
notImplemented();
}
-void ContextMenuClientQt::downloadURL(const KURL& url)
+void ContextMenuClientQt::downloadURL(const KURL&)
{
notImplemented();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 67d974c..905e11d 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -282,9 +282,7 @@ void FrameLoaderClientQt::dispatchDidCancelClientRedirect()
}
-void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url,
- double interval,
- double fireDate)
+void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url, double, double)
{
if (dumpFrameLoaderCallbacks)
printf("%s - willPerformClientRedirectToURL: %s \n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(drtDescriptionSuitableForTestResult(url)));
@@ -464,7 +462,7 @@ void FrameLoaderClientQt::postProgressFinishedNotification()
emit loadFinished(m_loadError.isNull());
}
-void FrameLoaderClientQt::setMainFrameDocumentReady(bool b)
+void FrameLoaderClientQt::setMainFrameDocumentReady(bool)
{
// this is only interesting once we provide an external API for the DOM
}
@@ -514,13 +512,13 @@ bool FrameLoaderClientQt::canShowMIMEType(const String& MIMEType) const
return false;
}
-bool FrameLoaderClientQt::representationExistsForURLScheme(const String& URLScheme) const
+bool FrameLoaderClientQt::representationExistsForURLScheme(const String&) const
{
return false;
}
-String FrameLoaderClientQt::generatedMIMETypeForURLScheme(const String& URLScheme) const
+String FrameLoaderClientQt::generatedMIMETypeForURLScheme(const String&) const
{
notImplemented();
return String();
@@ -632,7 +630,7 @@ void FrameLoaderClientQt::updateGlobalHistoryRedirectLinks()
{
}
-bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *item) const
+bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const
{
return true;
}
@@ -750,7 +748,7 @@ WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore:
QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8));
}
-WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse& response)
+WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse&)
{
notImplemented();
return ResourceError();
@@ -788,7 +786,7 @@ void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCor
#endif
}
-void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request)
+void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest& request)
{
if (dumpResourceLoadCallbacks)
dumpAssignedUrls[identifier] = drtDescriptionSuitableForTestResult(request.url());
@@ -835,7 +833,7 @@ void FrameLoaderClientQt::dispatchDidReceiveContentLength(WebCore::DocumentLoade
{
}
-void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader* loader, unsigned long)
+void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long)
{
}
@@ -1206,8 +1204,8 @@ void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget)
m_hasSentResponseToPlugin = false;
}
-PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,
- const Vector<String>& paramNames, const Vector<String>& paramValues)
+PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&,
+ const Vector<String>&, const Vector<String>&)
{
notImplemented();
return 0;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 340325e..3931a85 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -138,12 +138,12 @@ void InspectorClientQt::detachWindow()
notImplemented();
}
-void InspectorClientQt::setAttachedWindowHeight(unsigned height)
+void InspectorClientQt::setAttachedWindowHeight(unsigned)
{
notImplemented();
}
-void InspectorClientQt::highlight(Node* node)
+void InspectorClientQt::highlight(Node*)
{
notImplemented();
}
@@ -205,7 +205,7 @@ void InspectorClientQt::storeSetting(const String& key, const InspectorControlle
qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
}
-void InspectorClientQt::removeSetting(const String& key)
+void InspectorClientQt::removeSetting(const String&)
{
notImplemented();
}
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index a440606..9d76dcc 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -194,9 +194,9 @@ public:
};
enum TileRule {
- Stretch,
- Repeat,
- Round
+ StretchTile,
+ RepeatTile,
+ RoundTile
};
// Text formatting flags for QPainter::drawText and QLabel.
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 9106fa8..6f0b0ee 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -612,12 +612,6 @@
*/
/*!
- \enum Qt::CoordinateSystem
- \value DeviceCoordinates
- \value LogicalCoordinates
- */
-
-/*!
\enum Qt::CaseSensitivity
\value CaseInsensitive
@@ -1220,7 +1214,7 @@
touch device will be sent as mouse events.
\value WA_TouchPadAcceptSingleTouchEvents Allows touchpad single
- touch events to be sent to the widget.
+ touch events to be sent to the widget.
\value WA_DontUseStandardGestures Disables standard gestures on Qt widgets.
@@ -1241,7 +1235,7 @@
\omitvalue WA_PendingUpdate
\omitvalue WA_LaidOut
\omitvalue WA_GrabbedShortcut
- \omitvalue WA_DontShowOnScreen
+ \omitvalue WA_DontShowOnScreen
\omitvalue WA_InvalidSize
\omitvalue WA_ForceUpdatesDisabled
\omitvalue WA_NoX11EventCompression
@@ -1259,7 +1253,7 @@
/*! \typedef Qt::HANDLE
Platform-specific handle type for system objects. This is
- equivalent to \c{void *} on Mac OS X and embedded Linux,
+ equivalent to \c{void *} on Mac OS X and embedded Linux,
and to \c{unsigned long} on X11. On Windows it is the
DWORD returned by the Win32 function getCurrentThreadId().
@@ -2762,13 +2756,13 @@
This enum describes how to repeat or stretch the parts of an image
when drawing.
- \value Stretch Scale the image to fit to the available area.
+ \value StretchTile Scale the image to fit to the available area.
- \value Repeat Tile the image until there is no more space. May crop
- the last image.
+ \value RepeatTile Repeat the image until there is no more space. May
+ crop the last image.
- \value Round Like Repeat, but scales the images down to ensure that
- the last image is not cropped.
+ \value RoundTile Similar to Repeat, but scales the image down to
+ ensure that the last tile is not cropped.
*/
/*!
@@ -2812,13 +2806,13 @@
\value NavigationModeNone Only the touch screen is used.
\value NavigationModeKeypadTabOrder Qt::Key_Up and Qt::Key_Down are used to change focus.
\value NavigationModeKeypadDirectional Qt::Key_Up, Qt::Key_Down, Qt::Key_Left and Qt::Key_Right are used to change focus.
- \value NavigationModeCursorAuto The mouse cursor is used to change focus,
+ \value NavigationModeCursorAuto The mouse cursor is used to change focus,
it is displayed only on non touchscreen devices.
The keypad is used to implement a virtual cursor, unless
the device has an analog mouse type of input device (e.g. touchpad).
This is the recommended setting for an application such as a web browser that
needs pointer control on both touch and non-touch devices.
- \value NavigationModeCursorForceVisible The mouse cursor is used to change focus,
+ \value NavigationModeCursorForceVisible The mouse cursor is used to change focus,
it is displayed regardless of device type.
The keypad is used to implement a virtual cursor, unless
the device has an analog mouse type of input device (e.g. touchpad)
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 0474bf3..aae351c 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -539,7 +539,7 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t)
int ok = 0;
- if (t->interval > 10 || !t->interval || !qtimeSetEvent) {
+ if (t->interval > 15 || !t->interval || !qtimeSetEvent) {
ok = 1;
if (!t->interval) // optimization for single-shot-zero-timer
QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));
diff --git a/src/gui/embedded/qvfbhdr.h b/src/gui/embedded/qvfbhdr.h
index f02286e..eff5fc2 100644
--- a/src/gui/embedded/qvfbhdr.h
+++ b/src/gui/embedded/qvfbhdr.h
@@ -56,6 +56,7 @@ QT_MODULE(Gui)
#define QT_QWS_TEMP_DIR "/tmp"
#endif
+#ifdef QT_PRIVATE_QWS
#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2-%3") \
.arg(QT_QWS_TEMP_DIR).arg(getuid()).arg(DISPLAY)
@@ -67,7 +68,22 @@ QT_MODULE(Gui)
.append("/qtvfb_map")
#define QT_VFB_SOUND_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
.append("/qt_soundserver")
-#define QTE_PIPE "QtEmbedded"
+#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
+ .append("/QtEmbedded")
+#define QTE_PIPE_QVFB QTE_PIPE
+#else
+#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QT_VFB_MOUSE_PIPE(DISPLAY) QString("/tmp/.qtvfb_mouse-%1").arg(DISPLAY)
+#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QString("/tmp/.qtvfb_keyboard-%1").arg(DISPLAY)
+#define QT_VFB_MAP(DISPLAY) QString("/tmp/.qtvfb_map-%1").arg(DISPLAY)
+#define QT_VFB_SOUND_PIPE(DISPLAY) QString("/tmp/.qt_soundserver-%1").arg(DISPLAY)
+#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
+ .append("/QtEmbedded-%1") \
+ .arg(DISPLAY)
+#define QTE_PIPE_QVFB(DISPLAY) QString("/tmp/qtembedded-%1/QtEmbedded-%1") \
+ .arg(DISPLAY)
+#endif
struct QVFbHeader
{
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index bc9c73f..0690690 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -186,6 +186,49 @@
high z-values. Stacking order applies to sibling items; parents are always
drawn before their children.
+ \section1 Sorting
+
+ All items are drawn in a defined, stable order, and this same order decides
+ which items will receive mouse input first when you click on the scene.
+ Normally you don't have to worry about sorting, as the items follow a
+ "natural order", following the logical structure of the scene.
+
+ An item's children are stacked on top of the parent, and sibling items are
+ stacked by insertion order (i.e., in the same order that they were either
+ added to the scene, or added to the same parent). If you add item A, and
+ then B, then B will be on top of A. If you then add C, the items' stacking
+ order will be A, then B, then C.
+
+ \image graphicsview-zorder.png
+
+ This example shows the stacking order of all limbs of the robot from the
+ \l{graphicsview/dragdroprobot}{Drag and Drop Robot} example. The torso is
+ the root item (all other items are children or descendants of the torso),
+ so it is drawn first. Next, the head is drawn, as it is the first item in
+ the torso's list of children. Then the upper left arm is drawn. As the
+ lower arm is a child of the upper arm, the lower arm is then drawn,
+ followed by the upper arm's next sibling, which is the upper right arm, and
+ so on.
+
+ For advanced users, there are ways to alter how your items are sorted:
+
+ \list
+ \o You can call setZValue() on an item to explicitly stack it on top of, or
+ under, other sibling items. The default Z value for an item is 0. Items
+ with the same Z value are stacked by insertion order.
+
+ \o You can call stackBefore() to reorder the list of children. This will
+ directly modify the insertion order.
+
+ \o You can set the ItemStacksBehindParent flag to stack a child item behind
+ its parent.
+ \endlist
+
+ The stacking order of two sibling items also counts for each item's
+ children and descendant items. So if one item is on top of another, then
+ all its children will also be on top of all the other item's children as
+ well.
+
\section1 Events
QGraphicsItem receives events from QGraphicsScene through the virtual
@@ -1487,10 +1530,12 @@ QList<QGraphicsItem *> QGraphicsItem::children() const
/*!
\since 4.4
- Returns a list of this item's children. The items are returned in no
- particular order.
+ Returns a list of this item's children.
- \sa setParentItem()
+ The items are sorted by stacking order. This takes into account both the
+ items' insertion order and their Z-values.
+
+ \sa setParentItem(), zValue(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsItem::childItems() const
{
@@ -4090,12 +4135,12 @@ void QGraphicsItem::advance(int phase)
}
/*!
- Returns the Z-value, or the elevation, of the item. The Z-value decides
- the stacking order of sibling (neighboring) items.
+ Returns the Z-value of the item. The Z-value affects the stacking order of
+ sibling (neighboring) items.
The default Z-value is 0.
- \sa setZValue()
+ \sa setZValue(), {QGraphicsItem#Sorting}{Sorting}, stackBefore(), ItemStacksBehindParent
*/
qreal QGraphicsItem::zValue() const
{
@@ -4103,33 +4148,18 @@ qreal QGraphicsItem::zValue() const
}
/*!
- Sets the Z-value, or the elevation, of the item, to \a z. The elevation
- decides the stacking order of sibling (neighboring) items. An item of high
- Z-value will be drawn on top of an item with a lower Z-value if they share
- the same parent item. In addition, children of an item will always be
- drawn on top of the parent, regardless of the child's Z-value. Sibling
- items that share the same Z-value will be drawn in order of insertion; the
- last inserted child is stacked above previous children.
-
- \img graphicsview-zorder.png
+ Sets the Z-value of the item to \a z. The Z value decides the stacking
+ order of sibling (neighboring) items. A sibling item of high Z value will
+ always be drawn on top of another sibling item with a lower Z value.
- Children of different parents are stacked according to the Z-value of
- each item's ancestor item which is an immediate child of the two
- items' closest common ancestor. For example, a robot item might
- define a torso item as the parent of a head item, two arm items,
- and two upper-leg items. The upper-leg items would each be parents
- of one lower-leg item, and each lower-leg item would be parents of
- one foot item. The stacking order of the feet is the same as the
- stacking order of each foot's ancestor that is an immediate child
- of the two feet's common ancestor (i.e., the torso item); so the
- feet are stacked in the same order as the upper-leg items,
- regardless of each foot's Z-value.
+ If you restore the Z value, the item's insertion order will decide its
+ stacking order.
The Z-value does not affect the item's size in any way.
The default Z-value is 0.
- \sa zValue()
+ \sa zValue(), {QGraphicsItem#Sorting}{Sorting}, stackBefore(), ItemStacksBehindParent
*/
void QGraphicsItem::setZValue(qreal z)
{
@@ -4192,12 +4222,13 @@ void QGraphicsItemPrivate::ensureSequentialSiblingIndex()
The \a sibling must have the same Z value as this item, otherwise calling
this function will have no effect.
- By default, all items are stacked by insertion order (i.e., the first item
- you add is drawn before the next item you add). If two items' Z values are
- different, then the item with the highest Z value is drawn on top. When the
- Z values are the same, the insertion order will decide the stacking order.
+ By default, all sibling items are stacked by insertion order (i.e., the
+ first item you add is drawn before the next item you add). If two items' Z
+ values are different, then the item with the highest Z value is drawn on
+ top. When the Z values are the same, the insertion order will decide the
+ stacking order.
- \sa setZValue(), ItemStacksBehindParent
+ \sa setZValue(), ItemStacksBehindParent, {QGraphicsItem#Sorting}{Sorting}
*/
void QGraphicsItem::stackBefore(const QGraphicsItem *sibling)
{
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index a1ff6d2..1226722 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1759,10 +1759,10 @@ QRectF QGraphicsScene::itemsBoundingRect() const
return boundingRect;
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items() const
- Returns a list of all items on the scene, in no particular order.
+/*!
+ Returns a list of all items in the scene in descending stacking order.
- \sa addItem(), removeItem()
+ \sa addItem(), removeItem(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items() const
{
@@ -1770,11 +1770,11 @@ QList<QGraphicsItem *> QGraphicsScene::items() const
return d->index->items(Qt::DescendingOrder);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
- Returns an ordered list of all items on the scene. \a order decides the
- sorting.
+/*!
+ Returns an ordered list of all items on the scene. \a order decides the
+ stacking order.
- \sa addItem(), removeItem()
+ \sa addItem(), removeItem(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
{
@@ -1782,18 +1782,18 @@ QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
return d->index->items(order);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
- \obsolete
+/*!
+ \obsolete
- Returns all visible items at position \a pos in the scene. The items are
- listed in descending stacking order (i.e., the first item in the list is the
- top-most item, and the last item is the bottom-most item).
+ Returns all visible items at position \a pos in the scene. The items are
+ listed in descending stacking order (i.e., the first item in the list is the
+ top-most item, and the last item is the bottom-most item).
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
{
@@ -1801,21 +1801,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
return d->index->items(pos, Qt::IntersectsItemShape, Qt::DescendingOrder);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
- \overload
- \obsolete
+/*!
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the specified \a rectangle.
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a rectangle.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a rectangle are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rectangle are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
{
@@ -1823,45 +1823,47 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSe
return d->index->items(rectangle, mode, Qt::DescendingOrder);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
- \obsolete
- \since 4.3
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
+ \obsolete
+ \since 4.3
- This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode).
+ This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode).
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
*/
/*!
- \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- \overload
- \since 4.6
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- \brief Returns all visible items that, depending on \a mode, are
- either inside or intersect with the rectangle defined by \a x, \a y,
- \a w and \a h, in a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the rectangle defined by \a x, \a y,
+ \a w and \a h, in a list sorted using \a order.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
*/
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
- \overload
- \obsolete
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the polygon \a polygon.
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the polygon \a polygon.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a polygon are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
{
@@ -1869,21 +1871,22 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS
return d->index->items(polygon, mode, Qt::DescendingOrder);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
- \overload
- \obsolete
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a path, are either inside or
- intersect with the path \a path.
+ Returns all visible items that, depending on \a path, are either inside or
+ intersect with the path \a path.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a path are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
{
@@ -1891,20 +1894,20 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemS
return d->index->items(path, mode, Qt::DescendingOrder);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
-
- \since 4.6
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \since 4.6
- \brief Returns all visible items that, depending on \a mode, are at
- the specified \a pos in a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are at
+ the specified \a pos in a list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with \a pos are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with \a pos are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1913,21 +1916,22 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelecti
return d->index->items(pos, mode, order, deviceTransform);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- \overload
- \since 4.6
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- \brief Returns all visible items that, depending on \a mode, are
- either inside or intersect with the specified \a rect and return a
- list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a rect and return a
+ list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a rect are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rect are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1936,21 +1940,22 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti
return d->index->items(rect, mode, order, deviceTransform);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- \overload
- \since 4.6
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- \brief Returns all visible items that, depending on \a mode, are
- either inside or intersect with the specified \a polygon and return
- a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a polygon and return
+ a list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a polygon are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1959,21 +1964,22 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS
return d->index->items(polygon, mode, order, deviceTransform);
}
-/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- \overload
- \since 4.6
+/*!
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- \brief Returns all visible items that, depending on \a mode, are
- either inside or intersect with the specified \a path and return a
- list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a path and return a
+ list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a path are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1988,10 +1994,11 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemS
detection is determined by \a mode. By default, all items whose shape
intersects \a item or is contained inside \a item's shape are returned.
- The items are returned in descending Z order (i.e., the first item in the
- list is the top-most item, and the last item is the bottom-most item).
+ The items are returned in descending stacking order (i.e., the first item
+ in the list is the uppermost item, and the last item is the lowermost
+ item).
- \sa items(), itemAt(), QGraphicsItem::collidesWithItem()
+ \sa items(), itemAt(), QGraphicsItem::collidesWithItem(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsScene::collidingItems(const QGraphicsItem *item,
Qt::ItemSelectionMode mode) const
@@ -2018,13 +2025,11 @@ QList<QGraphicsItem *> QGraphicsScene::collidingItems(const QGraphicsItem *item,
Returns the topmost visible item at the specified \a position, or 0 if
there are no items at this position.
- \note The topmost item is the one with the highest Z-value.
-
This function is deprecated and returns incorrect results if the scene
contains items that ignore transformations. Use the overload that takes
a QTransform instead.
- \sa items(), collidingItems(), QGraphicsItem::setZValue()
+ \sa items(), collidingItems(), {QGraphicsItem#Sorting}{Sorting}
*/
QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const
{
@@ -2041,10 +2046,8 @@ QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const
\a deviceTransform is the transformation that applies to the view, and needs to
be provided if the scene contains items that ignore transformations.
- \note The topmost item is the one with the highest Z-value.
-
- \sa items(), collidingItems(), QGraphicsItem::setZValue()
- */
+ \sa items(), collidingItems(), {QGraphicsItem#Sorting}{Sorting}
+*/
QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position, const QTransform &deviceTransform) const
{
QList<QGraphicsItem *> itemsAtPoint = items(position, Qt::IntersectsItemShape,
@@ -2065,8 +2068,6 @@ QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position, const QTransform
This convenience function is equivalent to calling \c
{itemAt(QPointF(x, y), deviceTransform)}.
-
- \note The topmost item is the one with the highest Z-value.
*/
/*!
@@ -2083,8 +2084,6 @@ QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position, const QTransform
This function is deprecated and returns incorrect results if the scene
contains items that ignore transformations. Use the overload that takes
a QTransform instead.
-
- \note The topmost item is the one with the highest Z-value.
*/
/*!
@@ -2363,7 +2362,7 @@ void QGraphicsScene::destroyItemGroup(QGraphicsItemGroup *group)
in the scene, then the item will be activated.
\sa removeItem(), addEllipse(), addLine(), addPath(), addPixmap(),
- addRect(), addText(), addWidget()
+ addRect(), addText(), addWidget(), {QGraphicsItem#Sorting}{Sorting}
*/
void QGraphicsScene::addItem(QGraphicsItem *item)
{
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 98b2c9c..32747cc 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -2016,9 +2016,11 @@ void QGraphicsView::render(QPainter *painter, const QRectF &target, const QRect
}
/*!
- Returns a list of all the items in the associated scene.
+ Returns a list of all the items in the associated scene, in descending
+ stacking order (i.e., the first item in the returned list is the uppermost
+ item).
- \sa QGraphicsScene::items()
+ \sa QGraphicsScene::items(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsView::items() const
{
@@ -2030,9 +2032,9 @@ QList<QGraphicsItem *> QGraphicsView::items() const
/*!
Returns a list of all the items at the position \a pos in the view. The
- items are listed in descending Z order (i.e., the first item in the list
- is the top-most item, and the last item is the bottom-most item). \a pos
- is in viewport coordinates.
+ items are listed in descending stacking order (i.e., the first item in the
+ list is the uppermost item, and the last item is the lowermost item). \a
+ pos is in viewport coordinates.
This function is most commonly called from within mouse event handlers in
a subclass in QGraphicsView. \a pos is in untransformed viewport
@@ -2040,7 +2042,7 @@ QList<QGraphicsItem *> QGraphicsView::items() const
\snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 5
- \sa QGraphicsScene::items(), QGraphicsItem::zValue()
+ \sa QGraphicsScene::items(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsView::items(const QPoint &pos) const
{
@@ -2082,7 +2084,10 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPoint &pos) const
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a rect are returned.
- \sa itemAt(), items(), mapToScene()
+ The items are sorted in descending stacking order (i.e., the first item in
+ the returned list is the uppermost item).
+
+ \sa itemAt(), items(), mapToScene(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsView::items(const QRect &rect, Qt::ItemSelectionMode mode) const
{
@@ -2110,7 +2115,10 @@ QList<QGraphicsItem *> QGraphicsView::items(const QRect &rect, Qt::ItemSelection
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a polygon are returned.
- \sa itemAt(), items(), mapToScene()
+ The items are sorted by descending stacking order (i.e., the first item in
+ the returned list is the uppermost item).
+
+ \sa itemAt(), items(), mapToScene(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsView::items(const QPolygon &polygon, Qt::ItemSelectionMode mode) const
{
@@ -2130,7 +2138,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPolygon &polygon, Qt::ItemSel
The default value for \a mode is Qt::IntersectsItemShape; all items whose
exact shape intersects with or is contained by \a path are returned.
- \sa itemAt(), items(), mapToScene()
+ \sa itemAt(), items(), mapToScene(), {QGraphicsItem#Sorting}{Sorting}
*/
QList<QGraphicsItem *> QGraphicsView::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
{
@@ -2149,7 +2157,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPainterPath &path, Qt::ItemSe
\snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 6
- \sa items()
+ \sa items(), {QGraphicsItem#Sorting}{Sorting}
*/
QGraphicsItem *QGraphicsView::itemAt(const QPoint &pos) const
{
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 4f44109..bea1e8d 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -63,7 +63,7 @@
QT_BEGIN_NAMESPACE
-struct QImageData { // internal image data
+struct Q_GUI_EXPORT QImageData { // internal image data
QImageData();
~QImageData();
static QImageData *create(const QSize &size, QImage::Format format, int numColors = 0);
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 4938442..326dd10 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -64,7 +64,7 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
0x10, 0x20, 0x40, 0x80 };
-/*!
+/*
\class QSymbianFbsClient
\since 4.6
\internal
@@ -145,7 +145,7 @@ void QSymbianFbsHeapLock::relock()
qt_symbianFbsClient()->lockHeap();
}
-/*!
+/*
\class QSymbianBitmapDataAccess
\since 4.6
\internal
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index f77d200..6cde898 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -67,6 +67,7 @@
#include <private/qt_x11_p.h>
#include "qx11info_x11.h"
#include <private/qdrawhelper_p.h>
+#include <private/qimage_p.h>
#include <stdlib.h>
@@ -369,6 +370,30 @@ void QX11PixmapData::resize(int width, int height)
#endif // QT_NO_XRENDER
}
+struct QX11AlphaDetector
+{
+ bool hasAlpha() const {
+ if (checked)
+ return has;
+ // Will implicitly also check format and return quickly for opaque types...
+ checked = true;
+ has = const_cast<QImage *>(image)->data_ptr()->checkForAlphaPixels();
+ return has;
+ }
+
+ bool hasXRenderAndAlpha() const {
+ if (!X11->use_xrender)
+ return false;
+ return hasAlpha();
+ }
+
+ QX11AlphaDetector(const QImage *i) : image(i), checked(false), has(false) { }
+
+ const QImage *image;
+ mutable bool checked;
+ mutable bool has;
+};
+
void QX11PixmapData::fromImage(const QImage &img,
Qt::ImageConversionFlags flags)
{
@@ -402,7 +427,9 @@ void QX11PixmapData::fromImage(const QImage &img,
return;
}
- int dd = X11->use_xrender && img.hasAlphaChannel() ? 32 : xinfo.depth();
+ QX11AlphaDetector alphaCheck(&img);
+ int dd = alphaCheck.hasXRenderAndAlpha() ? 32 : xinfo.depth();
+
if (qt_x11_preferred_pixmap_depth)
dd = qt_x11_preferred_pixmap_depth;
@@ -454,7 +481,7 @@ void QX11PixmapData::fromImage(const QImage &img,
uchar *newbits= 0;
#ifndef QT_NO_XRENDER
- if (X11->use_xrender && image.hasAlphaChannel()) {
+ if (alphaCheck.hasXRenderAndAlpha()) {
const QImage &cimage = image;
d = 32;
@@ -1091,7 +1118,7 @@ void QX11PixmapData::fromImage(const QImage &img,
}
#endif
- if (image.hasAlphaChannel()) {
+ if (alphaCheck.hasAlpha()) {
QBitmap m = QBitmap::fromImage(image.createAlphaMask(flags));
setMask(m);
}
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 0fae959..18cab13 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -87,6 +87,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate()
dragDropMode(QAbstractItemView::NoDragDrop),
overwrite(false),
dropIndicatorPosition(QAbstractItemView::OnItem),
+ defaultDropAction(Qt::IgnoreAction),
#endif
#ifdef QT_SOFTKEYS_ENABLED
doneSoftKey(0),
@@ -1371,6 +1372,28 @@ QAbstractItemView::DragDropMode QAbstractItemView::dragDropMode() const
return NoDragDrop;
}
+/*!
+ \property QAbstractItemView::defaultDropAction
+ \brief the drop action that will be used by default in QAbstractItemView::drag()
+
+ If the property is not set, the drop action is CopyAction when the supported
+ actions support CopyAction.
+
+ \since 4.6
+ \sa showDropIndicator dragDropOverwriteMode
+*/
+void QAbstractItemView::setDefaultDropAction(Qt::DropAction dropAction)
+{
+ Q_D(QAbstractItemView);
+ d->defaultDropAction = dropAction;
+}
+
+Qt::DropAction QAbstractItemView::defaultDropAction() const
+{
+ Q_D(const QAbstractItemView);
+ return d->defaultDropAction;
+}
+
#endif // QT_NO_DRAGANDDROP
/*!
@@ -3297,7 +3320,9 @@ void QAbstractItemView::startDrag(Qt::DropActions supportedActions)
drag->setMimeData(data);
drag->setHotSpot(d->pressedPosition - rect.topLeft());
Qt::DropAction defaultDropAction = Qt::IgnoreAction;
- if (supportedActions & Qt::CopyAction && dragDropMode() != QAbstractItemView::InternalMove)
+ if (d->defaultDropAction != Qt::IgnoreAction && (supportedActions & d->defaultDropAction))
+ defaultDropAction = d->defaultDropAction;
+ else if (supportedActions & Qt::CopyAction && dragDropMode() != QAbstractItemView::InternalMove)
defaultDropAction = Qt::CopyAction;
if (drag->exec(supportedActions, defaultDropAction) == Qt::MoveAction)
d->clearOrRemove();
diff --git a/src/gui/itemviews/qabstractitemview.h b/src/gui/itemviews/qabstractitemview.h
index 7d5c765..b4f0957 100644
--- a/src/gui/itemviews/qabstractitemview.h
+++ b/src/gui/itemviews/qabstractitemview.h
@@ -74,6 +74,7 @@ class Q_GUI_EXPORT QAbstractItemView : public QAbstractScrollArea
Q_PROPERTY(bool dragEnabled READ dragEnabled WRITE setDragEnabled)
Q_PROPERTY(bool dragDropOverwriteMode READ dragDropOverwriteMode WRITE setDragDropOverwriteMode)
Q_PROPERTY(DragDropMode dragDropMode READ dragDropMode WRITE setDragDropMode)
+ Q_PROPERTY(Qt::DropAction defaultDropAction READ defaultDropAction WRITE setDefaultDropAction)
#endif
Q_PROPERTY(bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
Q_PROPERTY(SelectionMode selectionMode READ selectionMode WRITE setSelectionMode)
@@ -181,7 +182,11 @@ public:
void setDragDropMode(DragDropMode behavior);
DragDropMode dragDropMode() const;
+
+ void setDefaultDropAction(Qt::DropAction dropAction);
+ Qt::DropAction defaultDropAction() const;
#endif
+
void setAlternatingRowColors(bool enable);
bool alternatingRowColors() const;
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index 84c0892..fcf381a 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -117,7 +117,7 @@ public:
virtual void _q_columnsInserted(const QModelIndex &parent, int start, int end);
virtual void _q_modelDestroyed();
virtual void _q_layoutChanged();
-
+
void fetchMore();
bool shouldEdit(QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const;
@@ -315,7 +315,7 @@ public:
}
return ref;
}
-
+
/**
* return true if the index is registered as a QPersistentModelIndex
*/
@@ -356,8 +356,8 @@ public:
Qt::KeyboardModifiers pressedModifiers;
QPoint pressedPosition;
bool pressedAlreadySelected;
-
- //forces the next mouseMoveEvent to send the viewportEntered signal
+
+ //forces the next mouseMoveEvent to send the viewportEntered signal
//if the mouse is over the viewport and not over an item
bool viewportEnteredNeeded;
@@ -377,6 +377,7 @@ public:
QAbstractItemView::DragDropMode dragDropMode;
bool overwrite;
QAbstractItemView::DropIndicatorPosition dropIndicatorPosition;
+ Qt::DropAction defaultDropAction;
#endif
#ifdef QT_SOFTKEYS_ENABLED
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp
index 01c64f1..634f23a 100644
--- a/src/gui/kernel/qapplication_qws.cpp
+++ b/src/gui/kernel/qapplication_qws.cpp
@@ -232,7 +232,7 @@ QString qws_dataDir()
// Get the filename of the pipe Qt for Embedded Linux uses for server/client comms
Q_GUI_EXPORT QString qws_qtePipeFilename()
{
- return (qws_dataDir().append(QTE_PIPE));
+ return QTE_PIPE(qws_display_id);
}
static void setMaxWindowRect(const QRect &rect)
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index d50e7e1..af9fe92 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -780,7 +780,7 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
}
#endif
-void QSymbianControl::Draw(const TRect& r) const
+void QSymbianControl::Draw(const TRect& controlRect) const
{
QWindowSurface *surface = qwidget->windowSurface();
QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL;
@@ -788,6 +788,11 @@ void QSymbianControl::Draw(const TRect& r) const
if (!engine)
return;
+ // Map source rectangle into coordinates of the backing store.
+ const QPoint controlBase(controlRect.iTl.iX, controlRect.iTl.iY);
+ const QPoint backingStoreBase = qwidget->mapTo(qwidget->window(), controlBase);
+ const TRect backingStoreRect(TPoint(backingStoreBase.x(), backingStoreBase.y()), controlRect.Size());
+
if (engine->type() == QPaintEngine::Raster) {
QS60WindowSurface *s60Surface = static_cast<QS60WindowSurface *>(qwidget->windowSurface());
CFbsBitmap *bitmap = s60Surface->symbianBitmap();
@@ -796,10 +801,10 @@ void QSymbianControl::Draw(const TRect& r) const
if(!qwidget->d_func()->extraData()->disableBlit) {
if (qwidget->d_func()->isOpaque)
gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
- gc.BitBlt(r.iTl, bitmap, r);
- }
+ gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect);
+ }
} else {
- surface->flush(qwidget, QRegion(qt_TRect2QRect(r)), QPoint());
+ surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint());
}
}
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 6c879be..c06ef73 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -294,6 +294,7 @@ public:
void setMask_sys(const QRegion &);
#ifdef Q_OS_SYMBIAN
void setSoftKeys_sys(const QList<QAction*> &softkeys);
+ void activateSymbianWindow();
#endif
void raise_sys();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 05db8ca..3328cee 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -194,8 +194,8 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &)
}
if (jump && data.winid) {
- RWindow *const window = static_cast<RWindow *>(data.winid->DrawableWindow());
- window->Invalidate(TRect(0, 0, wrect.width(), wrect.height()));
+ RWindow *const window = static_cast<RWindow *>(data.winid->DrawableWindow());
+ window->Invalidate(TRect(0, 0, wrect.width(), wrect.height()));
}
}
@@ -411,6 +411,14 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
int x, y, w, h;
data.crect.getRect(&x, &y, &w, &h);
control->SetRect(TRect(TPoint(x, y), TSize(w, h)));
+
+ RDrawableWindow *const drawableWindow = control->DrawableWindow();
+ // Request mouse move events.
+ drawableWindow->PointerFilter(EPointerFilterEnterExit
+ | EPointerFilterMove | EPointerFilterDrag, 0);
+
+ if (q->isVisible() && q->testAttribute(Qt::WA_Mapped))
+ activateSymbianWindow();
}
if (destroyw) {
@@ -440,12 +448,11 @@ void QWidgetPrivate::show_sys()
}
if (q->internalWinId()) {
-
- QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId());
- if (!extra->activated) {
- QT_TRAP_THROWING(id->ActivateL());
- extra->activated = 1;
- }
+ if (!extra->activated)
+ activateSymbianWindow();
+
+ QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId());
+
id->MakeVisible(true);
if(q->isWindow())
@@ -461,6 +468,19 @@ void QWidgetPrivate::show_sys()
invalidateBuffer(q->rect());
}
+void QWidgetPrivate::activateSymbianWindow()
+{
+ Q_Q(QWidget);
+
+ Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
+ Q_ASSERT(q->testAttribute(Qt::WA_Mapped));
+ Q_ASSERT(!extra->activated);
+
+ WId id = q->internalWinId();
+ QT_TRAP_THROWING(id->ActivateL());
+ extra->activated = 1;
+}
+
void QWidgetPrivate::hide_sys()
{
Q_Q(QWidget);
@@ -1016,9 +1036,9 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const
}
// Native window case
- const TPoint widgetScreenOffset = internalWinId()->PositionRelativeToScreen();
- const QPoint widgetPos = pos - QPoint(widgetScreenOffset.iX, widgetScreenOffset.iY);
- return widgetPos;
+ const TPoint widgetScreenOffset = internalWinId()->PositionRelativeToScreen();
+ const QPoint widgetPos = pos - QPoint(widgetScreenOffset.iX, widgetScreenOffset.iY);
+ return widgetPos;
}
void QWidget::setWindowState(Qt::WindowStates newstate)
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index 716300e..ac3796a 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1225,7 +1225,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// horizontal edges
switch (rules.horizontal) {
- case Qt::Stretch:
+ case Qt::StretchTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1237,7 +1237,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawPixmap(painter, targetBottomRect, pixmap, sourceBottomRect);
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1249,7 +1249,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawHorizontallyRepeatedPixmap(painter, targetBottomRect, pixmap, sourceBottomRect);
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1265,7 +1265,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// vertical edges
switch (rules.vertical) {
- case Qt::Stretch:
+ case Qt::StretchTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1277,7 +1277,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawPixmap(painter, targetRightRect, pixmap, sourceRightRect);
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1289,7 +1289,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawVerticallyRepeatedPixmap(painter, targetRightRect, pixmap, sourceRightRect);
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1308,41 +1308,41 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
const QRect targetCenterRect(targetCenterLeft, targetCenterTop, targetCenterWidth, targetCenterHeight);
const QRect sourceCenterRect(sourceCenterLeft, sourceCenterTop, sourceCenterWidth, sourceCenterHeight);
switch (rules.horizontal) {
- case Qt::Stretch:
+ case Qt::StretchTile:
switch (rules.vertical) {
- case Qt::Stretch: // stretch stretch
+ case Qt::StretchTile: // stretch stretch
qDrawPixmap(painter, targetCenterRect, pixmap, sourceCenterRect);
break;
- case Qt::Repeat: // stretch repeat
+ case Qt::RepeatTile: // stretch repeat
qVerticalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Round: // stretch round
+ case Qt::RoundTile: // stretch round
qVerticalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
switch (rules.vertical) {
- case Qt::Stretch: // repeat stretch
+ case Qt::StretchTile: // repeat stretch
qHorizontalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Repeat: // repeat repeat
+ case Qt::RepeatTile: // repeat repeat
qVerticalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawHorizontallyRepeatedPixmap);
break;
- case Qt::Round: // repeat round
+ case Qt::RoundTile: // repeat round
qVerticalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawHorizontallyRepeatedPixmap);
break;
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
switch (rules.vertical) {
- case Qt::Stretch: // round stretch
+ case Qt::StretchTile: // round stretch
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Repeat: // round repeat
+ case Qt::RepeatTile: // round repeat
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawVerticallyRepeatedPixmap);
break;
- case Qt::Round: // round round
+ case Qt::RoundTile: // round round
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawVerticallyRoundedPixmap);
break;
}
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 3a2dd0e..22a57e9 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -137,22 +137,22 @@ struct QTileRules
{
inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
: horizontal(horizontalRule), vertical(verticalRule) {}
- inline QTileRules(Qt::TileRule rule = Qt::Stretch)
+ inline QTileRules(Qt::TileRule rule = Qt::StretchTile)
: horizontal(rule), vertical(rule) {}
Qt::TileRule horizontal;
Qt::TileRule vertical;
};
-Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
- const QRect &targetRect,
- const QMargins &targetMargins,
+Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
+ const QRect &targetRect,
+ const QMargins &targetMargins,
const QPixmap &pixmap,
- const QRect &sourceRect,
- const QMargins &sourceMargins,
+ const QRect &sourceRect,
+ const QMargins &sourceMargins,
const QTileRules &rules = QTileRules());
-inline void qDrawBorderPixmap(QPainter *painter,
- const QRect &target,
- const QMargins &margins,
+inline void qDrawBorderPixmap(QPainter *painter,
+ const QRect &target,
+ const QMargins &margins,
const QPixmap &pixmap)
{
qDrawBorderPixmap(painter, target, margins, pixmap, pixmap.rect(), margins);
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 0f3a88b..707b05e 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1126,7 +1126,7 @@ void QRenderRule::fixupBorder(int nativeWidth)
void QRenderRule::drawBorderImage(QPainter *p, const QRect& rect)
{
static const Qt::TileRule tileMode2TileRule[] = {
- Qt::Stretch, Qt::Round, Qt::Stretch, Qt::Repeat, Qt::Stretch };
+ Qt::StretchTile, Qt::RoundTile, Qt::StretchTile, Qt::RepeatTile, Qt::StretchTile };
const QStyleSheetBorderImageData *borderImageData = border()->borderImage();
const int *targetBorders = border()->borders;
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index c3289b4..28f3be3 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -693,13 +693,8 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
if (e->orientation() != d->orientation && !rect().contains(e->pos()))
return;
- int step = qMin(QApplication::wheelScrollLines() * d->singleStep, d->pageStep);
- if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::ShiftModifier))
- step = d->pageStep;
-
- qreal currentOffset = qreal(e->delta()) * step / 120;
+ qreal currentOffset = qreal(e->delta()) / 120;
d->offset_accumulated += d->invertedControls ? -currentOffset : currentOffset;
-
if (int(d->offset_accumulated) == 0) {
// QAbstractSlider works on integer values. So if the accumulated
// offset is less than +/- 1, we need to wait until we get more
@@ -708,8 +703,20 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
return;
}
+ // Calculate the number of steps to scroll (per 15 degrees of rotate):
+#ifdef Q_OS_MAC
+ // On mac, since mouse wheel scrolling is accelerated and
+ // fine tuned by the OS, we skip applying acceleration:
+ int stepsToScroll = int(d->offset_accumulated);
+#else
+ int step = qMin(QApplication::wheelScrollLines() * d->singleStep, d->pageStep);
+ if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::ShiftModifier))
+ step = d->pageStep;
+ int stepsToScroll = step * int(d->offset_accumulated);
+#endif
+
int prevValue = d->value;
- d->position = d->overflowSafeAdd(int(d->offset_accumulated)); // value will be updated by triggerAction()
+ d->position = d->overflowSafeAdd(stepsToScroll); // value will be updated by triggerAction()
triggerAction(SliderMove);
if (prevValue == d->value) {
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index 5ff323a..5ba0571 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -886,7 +886,18 @@ void QLabel::focusInEvent(QFocusEvent *ev)
void QLabel::focusOutEvent(QFocusEvent *ev)
{
Q_D(QLabel);
- d->sendControlEvent(ev);
+ if (d->control) {
+ d->sendControlEvent(ev);
+ QTextCursor cursor = d->control->textCursor();
+ Qt::FocusReason reason = ev->reason();
+ if (reason != Qt::ActiveWindowFocusReason
+ && reason != Qt::PopupFocusReason
+ && cursor.hasSelection()) {
+ cursor.clearSelection();
+ d->control->setTextCursor(cursor);
+ }
+ }
+
QFrame::focusOutEvent(ev);
}
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index 3fe9bb4..dc78fd5 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -174,13 +174,8 @@ void QTextEditPrivate::init(const QString &html)
if (!html.isEmpty())
control->setHtml(html);
-#ifdef Q_OS_MAC
- hbar->setSingleStep(1);
- vbar->setSingleStep(1);
-#else
hbar->setSingleStep(20);
vbar->setSingleStep(20);
-#endif
viewport->setBackgroundRole(QPalette::Base);
q->setAcceptDrops(true);
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 84224ec..f890d12 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -312,7 +312,7 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt
return true;
}
case QNativeSocketEngine::AddressReusable:
-#ifdef SO_REUSEPORT
+#if defined(SO_REUSEPORT) && !defined(Q_OS_SYMBIAN)
n = SO_REUSEPORT;
#else
n = SO_REUSEADDR;
@@ -1018,10 +1018,12 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
if(selectForExec) {
qWarning("nativeSelect (checkRead %d, checkWrite %d, ret %d, errno %d): Unexpected expectfds ready in fd %d",
checkRead, checkWrite, ret, errno, socketDescriptor);
- if (checkRead)
- FD_SET(socketDescriptor, &fdread);
- if (checkWrite)
+ if (checkWrite){
+ FD_CLR(socketDescriptor, &fdread);
FD_SET(socketDescriptor, &fdwrite);
+ } else if (checkRead)
+ FD_SET(socketDescriptor, &fdread);
+
if ((ret == -1) && ( errno == ECONNREFUSED || errno == EPIPE ))
ret = 1;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0402268..2327d7a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -59,6 +59,8 @@
# include <private/qt_mac_p.h>
#endif
+#include <qdatetime.h>
+
#include <stdlib.h> // malloc
#include "qpixmap.h"
@@ -2077,6 +2079,8 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
#ifdef QGL_BIND_TEXTURE_DEBUG
printf("QGLContextPrivate::bindTexture(), imageSize=(%d,%d), internalFormat =0x%x, options=%x\n",
image.width(), image.height(), internalFormat, int(options));
+ QTime time;
+ time.start();
#endif
// Scale the pixmap if needed. GL textures needs to have the
@@ -2092,7 +2096,8 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
{
img = img.scaled(tx_w, tx_h);
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - upscaled to %dx%d\n", tx_w, tx_h);
+ printf(" - upscaled to %dx%d (%d ms)\n", tx_w, tx_h, time.elapsed());
+
#endif
}
@@ -2112,7 +2117,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
&& options & QGLContext::MipmapBindOption)
{
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - generating mipmaps\n");
+ printf(" - generating mipmaps (%d ms)\n", time.elapsed());
#endif
#if !defined(QT_OPENGL_ES_2)
glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST);
@@ -2148,7 +2153,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
if (premul) {
img = img.convertToFormat(target_format = QImage::Format_ARGB32_Premultiplied);
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - converting ARGB32 -> ARGB32_Premultiplied \n");
+ printf(" - converting ARGB32 -> ARGB32_Premultiplied (%d ms) \n", time.elapsed());
#endif
}
break;
@@ -2156,7 +2161,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
if (!premul) {
img = img.convertToFormat(target_format = QImage::Format_ARGB32);
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - converting ARGB32_Premultiplied -> ARGB32\n");
+ printf(" - converting ARGB32_Premultiplied -> ARGB32 (%d ms)\n", time.elapsed());
#endif
}
break;
@@ -2173,19 +2178,19 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
? QImage::Format_ARGB32_Premultiplied
: QImage::Format_ARGB32);
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - converting to 32-bit alpha format\n");
+ printf(" - converting to 32-bit alpha format (%d ms)\n", time.elapsed());
#endif
} else {
img = img.convertToFormat(QImage::Format_RGB32);
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - converting to 32-bit\n");
+ printf(" - converting to 32-bit (%d ms)\n", time.elapsed());
#endif
}
}
if (options & QGLContext::InvertedYBindOption) {
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - flipping bits over y\n");
+ printf(" - flipping bits over y (%d ms)\n", time.elapsed());
#endif
int ipl = img.bytesPerLine() / 4;
int h = img.height();
@@ -2199,7 +2204,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
if (externalFormat == GL_RGBA) {
#ifdef QGL_BIND_TEXTURE_DEBUG
- printf(" - doing byte swapping\n");
+ printf(" - doing byte swapping (%d ms)\n", time.elapsed());
#endif
// The only case where we end up with a depth different from
// 32 in the switch above is for the RGB16 case, where we set
@@ -2242,6 +2247,13 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
}
#endif
+#ifdef QGL_BIND_TEXTURE_DEBUG
+ static int totalUploadTime = 0;
+ totalUploadTime += time.elapsed();
+ printf(" - upload done in (%d ms) time=%d\n", time.elapsed(), totalUploadTime);
+#endif
+
+
// this assumes the size of a texture is always smaller than the max cache size
int cost = img.width()*img.height()*4/1024;
QGLTexture *texture = new QGLTexture(q, tx_id, target, options);
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index d802bdd..971a660 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -86,9 +86,19 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
qt_egl_add_platform_config(configProps, device());
configProps.setRenderableType(QEgl::OpenGL);
+ QEgl::PixelFormatMatch matchType = QEgl::BestPixelFormat;
+ if (device()->depth() == 16) {
+ configProps.setValue(EGL_RED_SIZE, 5);
+ configProps.setValue(EGL_GREEN_SIZE, 6);
+ configProps.setValue(EGL_BLUE_SIZE, 5);
+ configProps.setValue(EGL_ALPHA_SIZE, 0);
+ matchType = QEgl::ExactPixelFormat;
+ }
+ configProps.setRenderableType(QEgl::OpenGL);
+
// Search for a matching configuration, reducing the complexity
// each time until we get something that matches.
- if (!d->eglContext->chooseConfig(configProps, QEgl::BestPixelFormat)) {
+ if (!d->eglContext->chooseConfig(configProps, matchType)) {
delete d->eglContext;
d->eglContext = 0;
return false;
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 1ee3bbf..ae4bed0 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -48,9 +48,12 @@
#include <private/qgl_p.h>
#include <private/qdrawhelper_p.h>
+#include <private/qimage_p.h>
#include <private/qpaintengineex_opengl2_p.h>
+#include <qdesktopwidget.h>
+
QT_BEGIN_NAMESPACE
extern QGLWidget* qt_gl_share_widget();
@@ -315,7 +318,7 @@ void QGLPixmapData::ensureCreated() const
}
void QGLPixmapData::fromImage(const QImage &image,
- Qt::ImageConversionFlags)
+ Qt::ImageConversionFlags flags)
{
if (image.size() == QSize(w, h))
setSerialNumber(++qt_gl_pixmap_serial);
@@ -323,20 +326,26 @@ void QGLPixmapData::fromImage(const QImage &image,
if (pixelType() == BitmapType) {
m_source = image.convertToFormat(QImage::Format_MonoLSB);
+
} else {
- m_source = image.hasAlphaChannel()
- ? image.convertToFormat(QImage::Format_ARGB32_Premultiplied)
- : image.convertToFormat(QImage::Format_RGB32);
+ QImage::Format format = QImage::Format_RGB32;
+ if (qApp->desktop()->depth() == 16)
+ format = QImage::Format_RGB16;
+
+ if (image.hasAlphaChannel() && const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels())
+ format = QImage::Format_ARGB32_Premultiplied;;
+
+ m_source = image.convertToFormat(format);
}
m_dirty = true;
m_hasFillColor = false;
- m_hasAlpha = image.hasAlphaChannel();
+ m_hasAlpha = m_source.hasAlphaChannel();
w = image.width();
h = image.height();
is_null = (w <= 0 || h <= 0);
- d = pixelType() == QPixmapData::PixmapType ? 32 : 1;
+ d = m_source.depth();
if (m_texture.id) {
QGLShareContextScope ctx(qt_gl_share_widget()->context());
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 3a348bc..7f8577a 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -306,8 +306,13 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
d_ptr->pb = 0;
d_ptr->fbo = 0;
d_ptr->ctx = 0;
+#if defined (QT_OPENGL_ES_2)
+ d_ptr->tried_fbo = true;
+ d_ptr->tried_pb = true;
+#else
d_ptr->tried_fbo = false;
d_ptr->tried_pb = false;
+#endif
d_ptr->destructive_swap_buffers = qgetenv("QT_GL_SWAPBUFFER_PRESERVE").isNull();
d_ptr->glDevice.d = d_ptr;
d_ptr->q_ptr = this;
@@ -438,6 +443,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
QRect rect = br.translated(-offset - wOffset);
const GLenum target = GL_TEXTURE_2D;
+ Q_UNUSED(target);
if (context()) {
context()->makeCurrent();
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index eb4dee1..9dea6dc 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -734,12 +734,12 @@ QT_BEGIN_NAMESPACE
\sa QTest::qSleep()
*/
-/*! \fn void QTest::qWaitForWindowShown(QWidget *window)
+/*! \fn bool QTest::qWaitForWindowShown(QWidget *window)
\since 4.6
Waits until the \a window is shown in the screen. This is mainly useful for
asynchronous systems like X11, where a window will be mapped to screen some
- time after being asked to show itself on the screen.
+ time after being asked to show itself on the screen. Returns true.
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 24