From a12d41076919a133e63de63dff5c1a131a0564e4 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 7 Apr 2011 10:37:31 +0300 Subject: Have the backing store destroyed also in special Symbian scenarios. The backing store tracker's registerWidget and unregisterWidget functions are called when EPartiallyVisible and ENotVisible events come from WSERV. However if an application sends its window group to background right after caling show() and before entering the event loop, there is a chance that all the application will receive is an ENotVisible event, leading to calling unregisterWidget() without a previous registerWidget(). In this case the backing store was not destroyed and the application was consuming GPU memory even while it was staying in background. This patch makes unregisterWidget() not to check the widget's presence in the m_widgets set, instead the condition for deleting the backing store is solely an empty set. Task-number: QTBUG-18493 Reviewed-by: Gareth Stockwell --- src/gui/kernel/qwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 0a73481..be615a4 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -234,7 +234,8 @@ void QWidgetBackingStoreTracker::registerWidget(QWidget *w) */ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) { - if (m_widgets.remove(w) && m_widgets.isEmpty()) { + m_widgets.remove(w); + if (m_widgets.isEmpty()) { delete m_ptr; m_ptr = 0; } -- cgit v0.12 From c2383fa6a8070bf5bec4a444ae7d486874f35ab2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 6 Apr 2011 17:20:33 +0300 Subject: Do not unnecessarily draw application twice in landscape Fullscreen with softkeys dialogs would draw twice when orientation was changed to landscape, causing flicker. This happened because status pane change event and layout change event both caused redraw with different client area size. Added a check to avoid handling client area change on account of status pane change, if status pane is not visible and there was no change in its visibility. Task-number: QTBUG-18496 Reviewed-by: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 9 ++++++++- src/gui/kernel/qt_s60_p.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 21b50b6..a8680b9 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -459,6 +459,7 @@ QSymbianControl::QSymbianControl(QWidget *w) , m_ignoreFocusChanged(0) , m_symbianPopupIsOpen(0) , m_inExternalScreenOverride(false) + , m_lastStatusPaneVisibility(0) { } @@ -1427,7 +1428,13 @@ void QSymbianControl::HandleResourceChange(int resourceType) } break; case KInternalStatusPaneChange: - handleClientAreaChange(); + // When status pane is not visible, only handle client area change if status pane was + // previously visible, as size changes to hidden status pane should not affect + // client area. + if (S60->statusPane() && (S60->statusPane()->IsVisible() || m_lastStatusPaneVisibility)) { + m_lastStatusPaneVisibility = S60->statusPane()->IsVisible(); + handleClientAreaChange(); + } if (IsFocused() && IsVisible()) { qwidget->d_func()->setWindowIcon_sys(true); qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index ee0b862..c48bf63 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -295,6 +295,7 @@ private: #endif bool m_inExternalScreenOverride : 1; + bool m_lastStatusPaneVisibility : 1; }; inline QS60Data::QS60Data() -- cgit v0.12 From 99eb6c6c2048ce4d96348c54a79986c779fdf656 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 7 Apr 2011 13:52:42 +0200 Subject: Support QMAKE_LFLAGS.ARMCC and QMAKE_LFLAGS.GCCE in makefile build system Reviewed-by: axis --- mkspecs/common/symbian/symbian.conf | 3 ++- mkspecs/features/symbian/symbian_building.prf | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index e35786b..f955e3c 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -57,7 +57,8 @@ QMAKE_INCDIR = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LFLAGS = -QMAKE_LFLAGS.ARMCC = +QMAKE_LFLAGS.ARMCC = +QMAKE_LFLAGS.GCCE = QMAKE_LFLAGS_EXCEPTIONS_ON = QMAKE_LFLAGS_EXCEPTIONS_OFF = QMAKE_LFLAGS_RELEASE = diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 28046b4..8c75707 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -1,6 +1,7 @@ symbian-armcc { QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC + QMAKE_LFLAGS += $$QMAKE_LFLAGS.ARMCC # This is to prevent inclusion of the shipped RVCT headers, which are often in the # environment variable RVCTxxINC by default. -J prevents the searching of that location, # but needs a path, so just specify somewhere guaranteed not to contain header files. @@ -9,6 +10,7 @@ symbian-armcc { } else:symbian-gcce { QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE + QMAKE_LFLAGS += $$QMAKE_LFLAGS.GCCE } # We need a target name without the INFIX'ed part, since flags are not infixed. -- cgit v0.12 From 2eae397d7c4e549f7c77f0bc7e22f0d9390c7ec3 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 7 Apr 2011 13:53:44 +0200 Subject: Correct some parameters for the makefile build sytem, armcc and gcce Reviewed-by: axis --- mkspecs/symbian-armcc/qmake.conf | 6 +++--- mkspecs/symbian-gcce/qmake.conf | 7 +++---- src/gui/gui.pro | 8 +++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/mkspecs/symbian-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf index 77a1966..2de3218 100644 --- a/mkspecs/symbian-armcc/qmake.conf +++ b/mkspecs/symbian-armcc/qmake.conf @@ -12,7 +12,7 @@ QMAKE_RVCT_LINKSTYLE = 1 #QMAKE_qtmain_CXXFLAGS = --arm #QMAKE_QtCore_CXXFLAGS = -QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" +#QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" #QMAKE_QtDBus_CXXFLAGS = #QMAKE_QtDeclarative_CXXFLAGS = #QMAKE_QtMultimedia_CXXFLAGS = @@ -27,9 +27,9 @@ QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" #QMAKE_QtTest_CXXFLAGS = #QMAKE_QtXmlPatterns_CXXFLAGS = #QMAKE_QtXml_CXXFLAGS = -QMAKE_QtWebKit_CXXFLAGS = --arm +#QMAKE_QtWebKit_CXXFLAGS = --arm # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. -QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 +#QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 QMAKE_CFLAGS += --dllimport_runtime --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter QMAKE_CXXFLAGS += $$QMAKE_CFLAGS diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf index 62a079b..38042e9 100644 --- a/mkspecs/symbian-gcce/qmake.conf +++ b/mkspecs/symbian-gcce/qmake.conf @@ -19,7 +19,7 @@ QMAKE_AR = arm-none-symbianelf-ar cqs QMAKE_qtmain_CXXFLAGS = -mthumb QMAKE_QtCore_CXXFLAGS = -mthumb -QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 +#QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 QMAKE_QtDBus_CXXFLAGS = -mthumb QMAKE_QtDeclarative_CXXFLAGS = -mthumb QMAKE_QtMultimedia_CXXFLAGS = -mthumb @@ -34,8 +34,7 @@ QMAKE_QtSvg_CXXFLAGS = -mthumb QMAKE_QtTest_CXXFLAGS = -mthumb QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb QMAKE_QtXml_CXXFLAGS = -mthumb -#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b] -QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 +#QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 # never use -fPIC, gcce-linker doesn't like it. # g++ conf above adds it if the host platform is 64 bit, so we remove it again @@ -58,7 +57,7 @@ QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script QMAKE_CFLAGS += $${gcceExtraFlags} -QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden +QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden -Os #If we are not going to link to Qt or qtmain.lib, we need to include this at least once. isEmpty(QT):contains(TEMPLATE, app) { QMAKE_CXXFLAGS += --include=$${EPOCROOT}epoc32/include/stdapis/staticlibinit_gcce.h diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 4d51fa8..cf492d6 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -55,11 +55,9 @@ DEFINES += Q_INTERNAL_QAPP_SRC symbian { TARGET.UID3=0x2001B2DD - symbian-abld|symbian-sbsv2 { - # ro-section in gui can exceed default allocated space, so move rw-section a little further - QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 - QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 - } + # ro-section in gui can exceed default allocated space, so move rw-section a little further + QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 + QMAKE_LFLAGS.GCCE += -Tdata 0x800000 } neon:*-g++* { -- cgit v0.12 From 3a8006907634e5d4c02822d5ce14d558dee8b930 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 7 Apr 2011 13:54:26 +0200 Subject: Add the rules for gcce in do_not_build_as_thumb.prf Reviewed-by: axis --- mkspecs/features/symbian/do_not_build_as_thumb.prf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf index 0f1fd9f..91a63c2 100644 --- a/mkspecs/features/symbian/do_not_build_as_thumb.prf +++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf @@ -5,4 +5,9 @@ symbian-abld|symbian-sbsv2 { QMAKE_CFLAGS += --arm QMAKE_CXXFLAGS -= --thumb QMAKE_CXXFLAGS += --arm +} else:symbian-gcce { + QMAKE_CFLAGS -= --thumb + QMAKE_CFLAGS += -marm -mthumb-interwork -mapcs + QMAKE_CXXFLAGS -= --thumb + QMAKE_CXXFLAGS += -marm -mthumb-interwork -mapcs } -- cgit v0.12 From a29a5862b32e36735f7014c8fc9083823bd3fbaa Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 7 Apr 2011 13:58:46 +0200 Subject: Enable webkit build for the makefile build system with gcce Task-number: QTBUG-18484 Task-number: WEBKIT-57841 Reviewed-by: axis Reviewed-by: Janne Koskinen --- src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h | 2 +- src/3rdparty/webkit/WebCore/WebCore.pro | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h index f8bace4..9349b48 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h @@ -190,7 +190,7 @@ inline float deg2turn(float d) { return d / 360.0f; } inline float rad2grad(float r) { return r * 200.0f / piFloat; } inline float grad2rad(float g) { return g * piFloat / 200.0f; } -#if !COMPILER(MSVC) && !COMPILER(RVCT) && !OS(ANDROID) && !COMPILER(WINSCW) +#if !COMPILER(MSVC) && !OS(ANDROID) && !OS(SYMBIAN) using std::isfinite; using std::isinf; using std::isnan; diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 37d216d..c70a168 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -37,15 +37,14 @@ symbian: { # Need to guarantee that these come before system includes of /epoc32/include MMP_RULES += "USERINCLUDE rendering" MMP_RULES += "USERINCLUDE platform/text" - symbian-abld|symbian-sbsv2 { - # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. - # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. - QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000 - MMP_RULES += ALWAYS_BUILD_AS_ARM - } else { - QMAKE_CFLAGS -= --thumb - QMAKE_CXXFLAGS -= --thumb - } + + # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. + # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. + QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000 + QMAKE_LFLAGS.GCCE += -Tdata 0x1000000 + + CONFIG += do_not_build_as_thumb + CONFIG(release, debug|release): QMAKE_CXXFLAGS.ARMCC += -OTime -O3 } -- cgit v0.12 From 8e14e026cfba15cb6e07044922532fbb0bed767c Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 7 Apr 2011 14:00:48 +0200 Subject: Enable webkit for symbian-gcce in configure Reviewed-by: axis --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 62eb009..4c8ac11 100755 --- a/configure +++ b/configure @@ -7120,7 +7120,6 @@ EOF canBuildQtConcurrent="no" ;; symbian-gcce) - canBuildWebKit="no" canBuildQtConcurrent="no" ;; symbian-armcc) -- cgit v0.12 From e81ef9c4744a759783af03ddb01508386b5f33cd Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 7 Apr 2011 15:43:06 +0300 Subject: Labels are not visible in dialogs with all themes QS60Style uses different theme background for dialogs. However, labels use just one color irregardless of background texture. Therefore, in certain themes, this might produce an issue, where foreground color (label) is not visible from background. To fix this, set the label color to correct theme color when label is contained within a dialog. Task-number: QT-4559 Reviewed-by: Tomi Vihria --- src/gui/styles/qs60style.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 05243a7..879d2e8 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -683,6 +683,13 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) if (header->viewport()) header->viewport()->setPalette(widgetPalette); QApplication::setPalette(widgetPalette, "QHeaderView"); + } else if (qobject_cast(widget)) { + if (widget->window() && widget->window()->windowType() == Qt::Dialog) { + QPalette widgetPalette = widget->palette(); + widgetPalette.setColor(QPalette::WindowText, + s60Color(QS60StyleEnums::CL_QsnTextColors, 19, 0)); + widget->setPalette(widgetPalette); + } } } -- cgit v0.12 From 63064c275481d0e694838e90dead784b53dc10aa Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 7 Apr 2011 15:50:07 +0300 Subject: Labels are not visible in dialogs with all themes (part2) Added include to the previous fix to prevent compilation issue. Task-number: QT-4559 Reviewed-by: Tomi Vihria --- src/gui/styles/qs60style.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 879d2e8..4b76985 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -72,6 +72,7 @@ #include "qcheckbox.h" #include "qdesktopwidget.h" #include "qprogressbar.h" +#include "qlabel.h" #include "private/qtoolbarextension_p.h" #include "private/qcombobox_p.h" -- cgit v0.12 From a41345b6a6f2ed6e8c1a3442aba8259bb87f9fed Mon Sep 17 00:00:00 2001 From: Ruth Sadler Date: Thu, 7 Apr 2011 14:34:18 +0100 Subject: Check the validity of qt_desktopWidget before dereferencing Task-number: QTMOBILITY-1494 Reviewed-by: Gareth Stockwell --- src/gui/kernel/qapplication_s60.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index a8680b9..f80b657 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1448,8 +1448,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) { handleClientAreaChange(); // Send resize event to trigger desktopwidget workAreaResized signal - QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); - QApplication::sendEvent(qt_desktopWidget, &e); + if (qt_desktopWidget) { + QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); + QApplication::sendEvent(qt_desktopWidget, &e); + } break; } #endif -- cgit v0.12 From 2213f812acb023f7f52d930c30c0ea7a170629bf Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 8 Apr 2011 10:07:16 +0300 Subject: GraphicsView is not reset if focusItem is not set when keyboard closes When splitview closes (i.e. keyboard is dismissed), application's graphicsview containing the input widget (focus item) is reset back to original graphicsview transformation. As a fix, resetTransform is always called, when rootItem is found from graphicsView. Task-number: QT-4858 Reviewed-by: Guoqing Zhang --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 3b5290c..868565d 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -410,12 +410,14 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget) windowToMove->setUpdatesEnabled(false); if (!alwaysResize) { - if (gv->scene() && gv->scene()->focusItem()) { - // Check if the widget contains cursorPositionChanged signal and disconnect from it. - QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); - int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); - if (index != -1) - disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); + if (gv->scene()) { + if (gv->scene()->focusItem()) { + // Check if the widget contains cursorPositionChanged signal and disconnect from it. + QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); + int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); + if (index != -1) + disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); + } QGraphicsItem *rootItem = 0; foreach (QGraphicsItem *item, gv->scene()->items()) { -- cgit v0.12 From 57d886821ceae5adc989efee81b9c78508cac925 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 8 Apr 2011 11:20:35 +0300 Subject: Make QS60Style to support new Tab graphics in new Symbian releases In SR.11 there is a new theme graphics (with separate ID) for TabWidget tab shapes. Also, shapes are no longer set overlapped, but are side-by-side without any gaps. Earlier releases still use the existing graphics with overlapping. Task-number: QT-4762 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 30 ++++++++++++++++++++---------- src/gui/styles/qs60style_s60.cpp | 33 ++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 4b76985..585986d 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1550,8 +1550,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, skinElement==QS60StylePrivate::SE_TabBarTabWestActive) { const int borderThickness = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); - const int tabOverlap = - QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness; + int tabOverlap = pixelMetric(PM_TabBarTabOverlap); + if (tabOverlap > borderThickness) + tabOverlap -= borderThickness; + const bool usesScrollButtons = (widget) ? (qobject_cast(widget))->usesScrollButtons() : false; const int roomForScrollButton = @@ -1590,9 +1592,11 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QStyleOptionTabV3 optionTab = *tab; QRect tr = optionTab.rect; const bool directionMirrored = (optionTab.direction == Qt::RightToLeft); - const int borderThickness = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); - const int tabOverlap = - QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness; + const int borderThickness = + QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); + int tabOverlap = pixelMetric(PM_TabBarTabOverlap); + if (tabOverlap > borderThickness) + tabOverlap -= borderThickness; const bool usesScrollButtons = (widget) ? (qobject_cast(widget))->usesScrollButtons() : false; const int roomForScrollButton = @@ -2541,6 +2545,11 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const //without having to define custom pixel metric metricValue *= 2; +#if defined(Q_WS_S60) + if (metric == PM_TabBarTabOverlap && (QSysInfo::s60Version() > QSysInfo::SV_S60_5_2)) + metricValue = 0; +#endif + return metricValue; } @@ -3015,10 +3024,11 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con ret = QCommonStyle::subElementRect(element, opt, widget); if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast(opt)) { - const int tabOverlapNoBorder = - QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap); - const int tabOverlap = - tabOverlapNoBorder - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); + const int borderThickness = + QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth); + int tabOverlap = pixelMetric(PM_TabBarTabOverlap); + if (tabOverlap > borderThickness) + tabOverlap -= borderThickness; const QTabWidget *tab = qobject_cast(widget); int gain = (tab) ? tabOverlap * tab->count() : 0; switch (twf->shape) { @@ -3036,7 +3046,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con if ((ret.right() + gain) > widget->rect().right()) gain = widget->rect().right() - ret.right(); ret.adjust(0, 0, gain, 0); - } + } } break; } diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 6a7158c..dc64872 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -89,17 +89,25 @@ enum TSupportRelease { ES60_5_0 = 0x0004, ES60_5_1 = 0x0008, ES60_5_2 = 0x0010, + ES60_5_3 = 0x0020, ES60_3_X = ES60_3_1 | ES60_3_2, // Releases before Symbian Foundation ES60_PreSF = ES60_3_1 | ES60_3_2 | ES60_5_0, + // Releases before the S60 5.2 + ES60_Pre52 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1, + // Releases before S60 5.3 + ES60_Pre53 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2, // Add all new releases here - ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 + ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 | ES60_5_3 }; typedef struct { - const TAknsItemID &skinID; - TDrawType drawType; - int supportInfo; + const TAknsItemID &skinID; // Determines default theme graphics ID. + TDrawType drawType; // Determines which native drawing routine is used to draw this item. + int supportInfo; // Defines the S60 versions that use the default graphics. + // These two, define new graphics that are used in releases other than partMapEntry.supportInfo defined releases. + // In general, these are given in numeric form to allow style compilation in earlier + // native releases that do not contain the new graphics. int newMajorSkinId; int newMinorSkinId; } partMapEntry; @@ -188,12 +196,14 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1}, /* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1}, /* SP_QgnGrafScrollArrowUp */ {KAknsIIDQgnGrafScrollArrowUp, EDrawGulIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_All, -1,-1}, - /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_All, -1,-1}, + + // In S60 5.3 there is a new tab graphic + /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2219}, //KAknsIIDQtgFrTabActiveNormalL + /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x221b}, //KAknsIIDQtgFrTabActiveNormalC + /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x221a}, //KAknsIIDQtgFrTabActiveNormalR + /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2221}, //KAknsIIDQtgFrTabPassiveNormalL + /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2223}, //KAknsIIDQtgFrTabPassiveNormalC + /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2222}, //KAknsIIDQtgFrTabPassiveNormalR // In 3.1 there is no slider groove. /* SP_QgnGrafNsliderEndLeft */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19cf /* KAknsIIDQgnGrafNsliderEndLeft */}, @@ -1140,7 +1150,8 @@ bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease) (currentRelease == QSysInfo::SV_S60_3_2 && supportedRelease & ES60_3_2) || (currentRelease == QSysInfo::SV_S60_5_0 && supportedRelease & ES60_5_0) || (currentRelease == QSysInfo::SV_S60_5_1 && supportedRelease & ES60_5_1) || - (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2)); + (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2) || + (currentRelease == QSysInfo::SV_S60_5_3 && supportedRelease & ES60_5_3) ); } TAknsItemID QS60StyleModeSpecifics::partSpecificThemeId(int part) -- cgit v0.12 From a84b6c258841492dde22a8370e6b40b28bc4f078 Mon Sep 17 00:00:00 2001 From: Guoqing Zhang Date: Fri, 8 Apr 2011 11:45:31 +0300 Subject: Add focus frame support in stylesheet Task-number: QTBUG-16027 Reviewed-by: Sami Merila --- src/gui/styles/qstylesheetstyle.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index a4e7c38..6a0bf5e 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3339,6 +3339,11 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q } break; + case CE_FocusFrame: + if (rule.hasBorder()) + rule.drawBorder(p, opt->rect); + return; + case CE_PushButton: if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { if (rule.hasDrawable() || rule.hasBox() || rule.hasPosition() || rule.hasPalette() || -- cgit v0.12 From de9dd35dd8dc7502fcb4bd94ec1bbf2ff2435a68 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 8 Apr 2011 15:03:50 +0200 Subject: Add the auto detection for OpenVG in configure Task-number: QTBUG-18647 Reviewed-by: axis --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 4c8ac11..36402e5 100755 --- a/configure +++ b/configure @@ -641,10 +641,10 @@ CFG_XRANDR=runtime CFG_XRENDER=auto CFG_MITSHM=auto CFG_OPENGL=auto -CFG_OPENVG=no +CFG_OPENVG=auto CFG_OPENVG_LC_INCLUDES=no -CFG_OPENVG_SHIVA=no -CFG_OPENVG_ON_OPENGL=no +CFG_OPENVG_SHIVA=auto +CFG_OPENVG_ON_OPENGL=auto CFG_EGL=no CFG_EGL_GLES_INCLUDES=no CFG_SSE=auto -- cgit v0.12 From 0f7a4790bb0e3435a02f8751a29dc06c1f88d8d5 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 11 Apr 2011 13:48:35 +0300 Subject: tst_QStyle::drawItemPixmap test case fails on Symbian^3 The autotest assumes that created QPixmap are exactly same irregardless how the pixmaps were created. However, there is no guarantee that pixmaps that look the same (i.e. in this case green rectangles) are "same". QPixmap is platform dependent and might have e.g. optimized format in some of the platforms. Task-number: QT-4805 Reviewed-by: Jani Hautakangas --- tests/auto/qstyle/tst_qstyle.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index ad5d7ff..5c319f0 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -272,6 +272,18 @@ void tst_QStyle::drawItemPixmap() QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG"); QPixmap actualPix = QPixmap::grabWidget(testWidget); + +#ifdef Q_OS_SYMBIAN + // QPixmap cannot be assumed to be exactly same, unless it is created from exactly same content. + // In Symbian, pixmap format might get "optimized" depending on how QPixmap is created. + // Therefore, force the content to specific format and compare QImages. + // Then re-create the QPixmaps and compare those. + QImage i1 = p.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); + p = QPixmap::fromImage(i1); + QImage i2 = actualPix.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); + actualPix = QPixmap::fromImage(i2); + QVERIFY(i1 == i2); +#endif QVERIFY(pixmapsAreEqual(&actualPix,&p)); testWidget->hide(); } -- cgit v0.12 From e2ac68f3437ab6e9e865c7c9ad1c52b293f61910 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 23 Mar 2011 20:05:49 +0100 Subject: fix detection of relative location information an empty line number does not indicate relative loc info - it may be the result of -no-ui-lines. instead, an empty file name does indicate it - no file name at all makes no sense, so this means a previous messages has set it already. and we need this additional detection, as the entire ts file may have no line number info to base the decision on at all. --- tools/linguist/shared/ts.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/linguist/shared/ts.cpp b/tools/linguist/shared/ts.cpp index 85be5c6..4523bc5 100644 --- a/tools/linguist/shared/ts.cpp +++ b/tools/linguist/shared/ts.cpp @@ -264,6 +264,7 @@ bool TSReader::read(Translator &translator) //qDebug() << "TS " << attributes(); QHash currentLine; QString currentFile; + bool maybeRelative = false, maybeAbsolute = false; QXmlStreamAttributes atts = attributes(); //QString version = atts.value(strversion).toString(); @@ -342,10 +343,12 @@ bool TSReader::read(Translator &translator) msg.setTranslatorComment(readContents()); } else if (elementStarts(strlocation)) { // + maybeAbsolute = true; QXmlStreamAttributes atts = attributes(); QString fileName = atts.value(strfilename).toString(); if (fileName.isEmpty()) { fileName = currentMsgFile; + maybeRelative = true; } else { if (refs.isEmpty()) currentFile = fileName; @@ -353,7 +356,6 @@ bool TSReader::read(Translator &translator) } const QString lin = atts.value(strline).toString(); if (lin.isEmpty()) { - translator.setLocationsType(Translator::RelativeLocations); refs.append(TranslatorMessage::Reference(fileName, -1)); } else { bool bOK; @@ -361,9 +363,7 @@ bool TSReader::read(Translator &translator) if (bOK) { if (lin.startsWith(QLatin1Char('+')) || lin.startsWith(QLatin1Char('-'))) { lineNo = (currentLine[fileName] += lineNo); - translator.setLocationsType(Translator::RelativeLocations); - } else { - translator.setLocationsType(Translator::AbsoluteLocations); + maybeRelative = true; } refs.append(TranslatorMessage::Reference(fileName, lineNo)); } @@ -422,6 +422,9 @@ bool TSReader::read(Translator &translator) } else { handleError(); } + translator.setLocationsType(maybeRelative ? Translator::RelativeLocations : + maybeAbsolute ? Translator::AbsoluteLocations : + Translator::NoLocations); } // } else { handleError(); @@ -727,7 +730,6 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in bool loadTS(Translator &translator, QIODevice &dev, ConversionData &cd) { - translator.setLocationsType(Translator::NoLocations); TSReader reader(dev, cd); return reader.read(translator); } -- cgit v0.12 From 3bc0d853a09ae55c158946a99284a47b0b30a3b4 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 12 Apr 2011 11:36:37 +1000 Subject: Fix regression in wigglytext.qml This change re-adds the code removed in 8e9c28eaa4d7a3372b9a9a21a984701b62f96456 (which caused this regression), while keeping the new code as well (to specially handle the case of registration in componentCompleted()). Change-Id: I707e3d2ead9ea25079f79cd5e5886d1dc1c69d1b Task-number: QTBUG-18362 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativecomponent.cpp | 17 +++++++++++++++ src/declarative/qml/qdeclarativecomponent_p.h | 1 + .../data/delayedRegistration.qml | 25 ++++++++++++++++++++++ .../tst_qdeclarativebehaviors.cpp | 18 ++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index fc393d1..ac683a7 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -880,6 +880,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon state->bindValues = enginePriv->bindValues; state->parserStatus = enginePriv->parserStatus; + state->finalizedParserStatus = enginePriv->finalizedParserStatus; state->componentAttached = enginePriv->componentAttached; if (state->componentAttached) state->componentAttached->prev = &state->componentAttached; @@ -887,6 +888,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon enginePriv->componentAttached = 0; enginePriv->bindValues.clear(); enginePriv->parserStatus.clear(); + enginePriv->finalizedParserStatus.clear(); state->completePending = true; enginePriv->inProgressCreations++; } @@ -917,6 +919,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi state->bindValues = enginePriv->bindValues; state->parserStatus = enginePriv->parserStatus; + state->finalizedParserStatus = enginePriv->finalizedParserStatus; state->componentAttached = enginePriv->componentAttached; if (state->componentAttached) state->componentAttached->prev = &state->componentAttached; @@ -924,6 +927,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi enginePriv->componentAttached = 0; enginePriv->bindValues.clear(); enginePriv->parserStatus.clear(); + enginePriv->finalizedParserStatus.clear(); state->completePending = true; enginePriv->inProgressCreations++; } @@ -961,6 +965,18 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri QDeclarativeEnginePrivate::clear(ps); } + for (int ii = 0; ii < state->finalizedParserStatus.count(); ++ii) { + QPair, int> status = state->finalizedParserStatus.at(ii); + QObject *obj = status.first; + if (obj) { + void *args[] = { 0 }; + QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, + status.second, args); + } + } + + //componentComplete() can register additional finalization objects + //that are then never handled. Handle them manually here. if (1 == enginePriv->inProgressCreations) { for (int ii = 0; ii < enginePriv->finalizedParserStatus.count(); ++ii) { QPair, int> status = enginePriv->finalizedParserStatus.at(ii); @@ -986,6 +1002,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri state->bindValues.clear(); state->parserStatus.clear(); + state->finalizedParserStatus.clear(); state->completePending = false; enginePriv->inProgressCreations--; diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 020c5e0..f8bec2b 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -101,6 +101,7 @@ public: ConstructionState() : componentAttached(0), completePending(false) {} QList > bindValues; QList > parserStatus; + QList, int> > finalizedParserStatus; QDeclarativeComponentAttached *componentAttached; QList errors; bool completePending; diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml b/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml new file mode 100644 index 0000000..aa384c3 --- /dev/null +++ b/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml @@ -0,0 +1,25 @@ +import QtQuick 1.0 + +Rectangle { + id: container + + width: 400; height: 400; + property Item myItem + + function doCreate() { + myItem = myComponent.createObject(container) + myItem.x = 100 + } + + Component { + id: myComponent + Rectangle { + width: 100 + height: 100 + color: "green" + Behavior on x { NumberAnimation { duration: 500 } } + } + } + + Component.onCompleted: doCreate() +} diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp index 80ba907..4536d9e 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp +++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp @@ -81,6 +81,7 @@ private slots: void groupedPropertyCrash(); void runningTrue(); void sameValue(); + void delayedRegistration(); }; void tst_qdeclarativebehaviors::simpleBehavior() @@ -412,6 +413,23 @@ void tst_qdeclarativebehaviors::sameValue() QTRY_VERIFY(target->x() != qreal(0) && target->x() != qreal(100)); } +//QTBUG-18362 +void tst_qdeclarativebehaviors::delayedRegistration() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/delayedRegistration.qml"); + QDeclarativeRectangle *rect = qobject_cast(c.create()); + QVERIFY(rect != 0); + + QDeclarativeItem *innerRect = rect->property("myItem").value(); + QVERIFY(innerRect != 0); + + QCOMPARE(innerRect->property("x").toInt(), int(0)); + + QTRY_COMPARE(innerRect->property("x").toInt(), int(100)); +} + QTEST_MAIN(tst_qdeclarativebehaviors) #include "tst_qdeclarativebehaviors.moc" -- cgit v0.12 From ddae2b67a8eab5e6b298ce516234f4bf7c0367c1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 12 Apr 2011 14:51:19 +1000 Subject: Ensure view is positioned correctly when orientation changes. Change-Id: I7fbedff965ae8c89dcbb96ba5dcee85c07aa29b1 Task-number: QTBUG-17065 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativelistview.cpp | 2 + .../qdeclarativelistview/data/orientchange.qml | 7 ++++ .../tst_qdeclarativelistview.cpp | 47 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativelistview/data/orientchange.qml diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index f176916..4da45d1 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2119,9 +2119,11 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie if (d->orient == QDeclarativeListView::Vertical) { setContentWidth(-1); setFlickableDirection(VerticalFlick); + setContentX(0); } else { setContentHeight(-1); setFlickableDirection(HorizontalFlick); + setContentY(0); } d->regenerate(); emit orientationChanged(); diff --git a/tests/auto/declarative/qdeclarativelistview/data/orientchange.qml b/tests/auto/declarative/qdeclarativelistview/data/orientchange.qml new file mode 100644 index 0000000..c7aa0cd --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/data/orientchange.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +ListView { + width: 240; height: 320 + delegate: Rectangle { objectName: "wrapper"; width: 80; height: 80 } + model: 100 +} diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 2267a89..ec60e8a 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -119,6 +119,7 @@ private slots: void testQtQuick11Attributes_data(); void rightToLeft(); void test_mirroring(); + void orientationChange(); private: template void items(); @@ -2583,6 +2584,52 @@ void tst_QDeclarativeListView::test_mirroring() delete canvasB; } +void tst_QDeclarativeListView::orientationChange() +{ + QDeclarativeView *canvas = createView(); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/orientchange.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = qobject_cast(canvas->rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + listview->positionViewAtIndex(50, QDeclarativeListView::Beginning); + + // Confirm items positioned correctly + for (int i = 50; i < 54; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + QVERIFY(item); + QCOMPARE(item->y(), i*80.0); + } + + listview->setOrientation(QDeclarativeListView::Horizontal); + QCOMPARE(listview->contentY(), 0.); + + // Confirm items positioned correctly + for (int i = 0; i < 3; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + QVERIFY(item); + QCOMPARE(item->x(), i*80.0); + } + + listview->positionViewAtIndex(50, QDeclarativeListView::Beginning); + listview->setOrientation(QDeclarativeListView::Vertical); + QCOMPARE(listview->contentX(), 0.); + // + // Confirm items positioned correctly + for (int i = 0; i < 4; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + QVERIFY(item); + QCOMPARE(item->y(), i*80.0); + } + + delete canvas; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From c17150344510fc5fe239e39e6659bd16579586e8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 12 Apr 2011 15:09:48 +1000 Subject: ListView has wrong keyPressEvent behaviour when vertical Regression intorduced by RTL changes. Change-Id: I272d07cd21d04f3e534aa183b1b10fcc8d062b79 Task-number: QTBUG-18581 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativelistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 4da45d1..cb751f6 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2770,7 +2770,7 @@ void QDeclarativeListView::keyPressEvent(QKeyEvent *event) return; if (d->model && d->model->count() && d->interactive) { - if ((!d->isRightToLeft() && event->key() == Qt::Key_Left) + if ((d->orient == QDeclarativeListView::Horizontal && !d->isRightToLeft() && event->key() == Qt::Key_Left) || (d->orient == QDeclarativeListView::Horizontal && d->isRightToLeft() && event->key() == Qt::Key_Right) || (d->orient == QDeclarativeListView::Vertical && event->key() == Qt::Key_Up)) { if (currentIndex() > 0 || (d->wrap && !event->isAutoRepeat())) { @@ -2781,7 +2781,7 @@ void QDeclarativeListView::keyPressEvent(QKeyEvent *event) event->accept(); return; } - } else if ((!d->isRightToLeft() && event->key() == Qt::Key_Right) + } else if ((d->orient == QDeclarativeListView::Horizontal && !d->isRightToLeft() && event->key() == Qt::Key_Right) || (d->orient == QDeclarativeListView::Horizontal && d->isRightToLeft() && event->key() == Qt::Key_Left) || (d->orient == QDeclarativeListView::Vertical && event->key() == Qt::Key_Down)) { if (currentIndex() < d->model->count() - 1 || (d->wrap && !event->isAutoRepeat())) { -- cgit v0.12 From cd19ab9f306f777b495cceabaf57a6eeaf86a82a Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 12 Apr 2011 09:32:06 +0300 Subject: Two QListView autotests do not pass on Symbian^3 releases tst_QListView::taskQTBUG_2678_spacingAndWrappedText() fails because: QS60Style adds to the itemview item content size margins and empty space, which shouldn't be part of the content size. As a fix, remove these. taskQTBUG_435_deselectOnViewportClick() fails because: Sending a click to a selected itemview item, when it should be sent to below that specific one. It was using hardcoded (center + 20) and autotest assumed that this would be outside of first item. In S60 with touch support, the itemview items are rather tall (49 pixels). As a fix, autotest now uses calculated value, which ensures that click is sent to outside first item. Task-number: QT-4810 Reviewed-by: Tomi Vihria --- src/gui/styles/qs60style.cpp | 2 -- tests/auto/qlistview/tst_qlistview.cpp | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 585986d..91ac45e 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2664,8 +2664,6 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, } } sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); - //native items have small empty areas at the beginning and end of menu item - sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin) + 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth)); if (QS60StylePrivate::isTouchSupported()) { //Make itemview easier to use in touch devices sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin)); diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index b6e69a0..ee03386 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -1893,7 +1893,8 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick() QCOMPARE(view.selectionModel()->selectedIndexes().count(), model.rowCount()); - QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, 20); + const QRect itemRect = view.visualRect(model.index(model.rowCount() - 1)); + QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, itemRect.height()); //first the left button QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p); QVERIFY(!view.selectionModel()->hasSelection()); -- cgit v0.12 From 80083187af81316d436483e5fc39cfddccc821cc Mon Sep 17 00:00:00 2001 From: Guoqing Zhang Date: Tue, 12 Apr 2011 10:59:43 +0300 Subject: Add focus frame support in style sheet Task-number: QTBUG-16207 Reviewed-by: Sami Merila --- src/gui/styles/qstylesheetstyle.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 6a0bf5e..369a0f0 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3340,9 +3340,11 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q break; case CE_FocusFrame: - if (rule.hasBorder()) + if (!rule.hasNativeBorder()) { rule.drawBorder(p, opt->rect); - return; + return; + } + break; case CE_PushButton: if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { -- cgit v0.12 From 7e032238ef7a91f4a9c1337b5e06204fadbc6f55 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 12 Apr 2011 11:04:41 +0200 Subject: Revert "Have the backing store destroyed also in special Symbian scenarios." This reverts commit a12d41076919a133e63de63dff5c1a131a0564e4. --- src/gui/kernel/qwidget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index be615a4..0a73481 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -234,8 +234,7 @@ void QWidgetBackingStoreTracker::registerWidget(QWidget *w) */ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) { - m_widgets.remove(w); - if (m_widgets.isEmpty()) { + if (m_widgets.remove(w) && m_widgets.isEmpty()) { delete m_ptr; m_ptr = 0; } -- cgit v0.12 From 8b9c94c95ef5dd9620dc35c4ab20cd109369636f Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 12 Apr 2011 12:13:21 +0300 Subject: QS60Style: itemview item with checkbox and text is drawn incorrectly QS60Style deduces incorrectly when itemview only contains checkbox. This is minor, yet highly annoying bug that prevents highlighted itemview item from showing its content with themes that have opaque itemview item highlight (highlight covers the text that is underneath). As a fix, check itemview item text and icon content before declaring it as "checkbox only". Task-number: QTBUG-18694 Reviewed-by: Tomi Vihria --- src/gui/styles/qs60style.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 91ac45e..f146075 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3132,7 +3132,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con } break; case SE_ItemViewItemCheckIndicator: - if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast(opt)) { + if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast(opt)) { const QAbstractItemView *listItem = qobject_cast(widget); const bool singleSelection = listItem && @@ -3140,7 +3140,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con listItem->selectionMode() == QAbstractItemView::NoSelection); const bool checkBoxOnly = (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator) && listItem && - singleSelection; + singleSelection && vopt->text.isEmpty() && vopt->icon.isNull(); // Selection check mark rect. const int indicatorWidth = QS60StylePrivate::pixelMetric(PM_IndicatorWidth); -- cgit v0.12 From 7f8773a209567fb9c962602b8b1f4ec70e38ea51 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 22 Mar 2011 20:08:22 +0100 Subject: prefix TEMPLATE_PREFIX to TEMPLATE even if it is "default-constructed" that way prf files don't have to check both the prefix and the actual template to identify visual studio mode. Reviewed-by: mariusSO --- qmake/project.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index e985401..16200f1 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3028,17 +3028,17 @@ QStringList &QMakeProject::values(const QString &_var, QMap Date: Tue, 22 Mar 2011 20:20:18 +0100 Subject: clean up visual studio identification code TEMPLATE is (now) reliably prefixed with "vc" when a vs generator is used. Reviewed-by: mariusSO --- mkspecs/features/incredibuild_xge.prf | 2 +- mkspecs/features/moc.prf | 8 ++++---- mkspecs/features/win32/embed_manifest_dll.prf | 2 +- mkspecs/features/win32/embed_manifest_exe.prf | 2 +- mkspecs/features/win32/qaxserver.prf | 10 ++-------- mkspecs/wince50standard-armv4i-msvc2005/default_post.prf | 2 +- mkspecs/wince50standard-mipsii-msvc2005/default_post.prf | 2 +- mkspecs/wince50standard-x86-msvc2005/default_post.prf | 2 +- mkspecs/wincewm50pocket-msvc2005/default_post.prf | 2 +- mkspecs/wincewm50smart-msvc2005/default_post.prf | 2 +- mkspecs/wincewm60professional-msvc2005/default_post.prf | 2 +- mkspecs/wincewm60standard-msvc2005/default_post.prf | 2 +- 12 files changed, 16 insertions(+), 22 deletions(-) diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf index a81a0cc..97ccc44 100644 --- a/mkspecs/features/incredibuild_xge.prf +++ b/mkspecs/features/incredibuild_xge.prf @@ -1,4 +1,4 @@ -contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") { +contains(TEMPLATE, "vc.*") { EOC = $$escape_expand(\\n\\t) # The VCPROJ generator will replace the \r\h with the coded \r\n: diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 89e9b40..d0b36e4 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -16,7 +16,7 @@ win32:count($$list($$INCLUDEPATH), 40, >) { EOC = $$escape_expand(\\n\\t) - if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { + contains(TEMPLATE, "vc.*") { # the VCPROJ generator will replace the \r\h with the coded \r\n: # No other generator understands the \h if(win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\\r\\h) @@ -42,7 +42,7 @@ win32:count($$list($$INCLUDEPATH), 40, >) { defineReplace(mocCmdBase) { !isEmpty(WIN_INCLUDETEMP) { RET = - if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { + contains(TEMPLATE, "vc.*") { RET += $$mocinclude.commands } RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) @@ -59,7 +59,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK moc_header.input = HEADERS moc_header.variable_out = SOURCES moc_header.name = MOC ${QMAKE_FILE_IN} -if(!contains(TEMPLATE, "vc.*"):!contains(TEMPLATE_PREFIX, "vc")) { +!contains(TEMPLATE, "vc.*") { !isEmpty(INCLUDETEMP):moc_header.depends += $$INCLUDETEMP } silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands @@ -73,7 +73,7 @@ moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_ moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC} moc_source.input = SOURCES OBJECTIVE_SOURCES moc_source.name = MOC ${QMAKE_FILE_IN} -if(!contains(TEMPLATE, "vc.*"):!contains(TEMPLATE_PREFIX, "vc")) { +!contains(TEMPLATE, "vc.*") { !isEmpty(INCLUDETEMP):moc_source.depends += $$INCLUDETEMP } silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf index 69c9d1d..5545a62 100644 --- a/mkspecs/features/win32/embed_manifest_dll.prf +++ b/mkspecs/features/win32/embed_manifest_dll.prf @@ -1,4 +1,4 @@ -!if(plugin:no_plugin_manifest):if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!static:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "lib") { +!if(plugin:no_plugin_manifest):if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!static:equals(TEMPLATE, "lib") { MANIFEST_DIR = $$OBJECTS_DIR isEmpty(MANIFEST_DIR):MANIFEST_DIR = . NOPATH_TARGET = $$TARGET diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf index 44aadfa..c6d012e 100644 --- a/mkspecs/features/win32/embed_manifest_exe.prf +++ b/mkspecs/features/win32/embed_manifest_exe.prf @@ -1,4 +1,4 @@ -if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") { +if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):equals(TEMPLATE, "app") { MANIFEST_DIR = $$OBJECTS_DIR isEmpty(MANIFEST_DIR):MANIFEST_DIR = . NOPATH_TARGET = $$TARGET diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf index 2899976..a6c0869 100644 --- a/mkspecs/features/win32/qaxserver.prf +++ b/mkspecs/features/win32/qaxserver.prf @@ -8,12 +8,7 @@ isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0 DEFINES += QAXSERVER -ACTIVEQT_IDE = makefile -equals(TEMPLATE_PREFIX, "vc"):ACTIVEQT_IDE = VisualStudio -equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio -equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio - -equals(ACTIVEQT_IDE, "VisualStudio") { +contains(TEMPLATE, "vc.*") { ACTIVEQT_IDC = $${QMAKE_IDC} ### Qt5: remove me qtPrepareTool(ACTIVEQT_IDC, idc) ACTIVEQT_IDL = $${QMAKE_IDL} @@ -27,8 +22,7 @@ equals(ACTIVEQT_IDE, "VisualStudio") { } ACTIVEQT_TLBOUT = "$(TargetDir)/$${TARGET}.tlb" GENERATED += $${OBJECTS_DIR}/$${TARGET}.idl $${ACTIVEQT_TLBOUT} -} -equals(ACTIVEQT_IDE, "makefile") { +} else { ACTIVEQT_IDC = -$(IDC) ACTIVEQT_IDL = -$(IDL) ACTIVEQT_NEWLINE = $$escape_expand(\\n\\t) diff --git a/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf b/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf index 3dab72a..900d758 100644 --- a/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf +++ b/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +equals(TEMPLATE, "vc.*") { DEFINES -= _M_ARM QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf b/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf index d3e49ab..4dbcf35 100644 --- a/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf +++ b/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +contains(TEMPLATE, "vc.*") { DEFINES -= _M_MRX000=3000 QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wince50standard-x86-msvc2005/default_post.prf b/mkspecs/wince50standard-x86-msvc2005/default_post.prf index 6790c60..2436efb 100644 --- a/mkspecs/wince50standard-x86-msvc2005/default_post.prf +++ b/mkspecs/wince50standard-x86-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +equals(TEMPLATE, "vc.*") { QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wincewm50pocket-msvc2005/default_post.prf b/mkspecs/wincewm50pocket-msvc2005/default_post.prf index 3dab72a..84ea15e 100644 --- a/mkspecs/wincewm50pocket-msvc2005/default_post.prf +++ b/mkspecs/wincewm50pocket-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +contains(TEMPLATE, "vc.*") { DEFINES -= _M_ARM QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wincewm50smart-msvc2005/default_post.prf b/mkspecs/wincewm50smart-msvc2005/default_post.prf index 3dab72a..84ea15e 100644 --- a/mkspecs/wincewm50smart-msvc2005/default_post.prf +++ b/mkspecs/wincewm50smart-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +contains(TEMPLATE, "vc.*") { DEFINES -= _M_ARM QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wincewm60professional-msvc2005/default_post.prf b/mkspecs/wincewm60professional-msvc2005/default_post.prf index 3dab72a..84ea15e 100644 --- a/mkspecs/wincewm60professional-msvc2005/default_post.prf +++ b/mkspecs/wincewm60professional-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +contains(TEMPLATE, "vc.*") { DEFINES -= _M_ARM QMAKE_CXXFLAGS += -fp:precise } diff --git a/mkspecs/wincewm60standard-msvc2005/default_post.prf b/mkspecs/wincewm60standard-msvc2005/default_post.prf index 3dab72a..84ea15e 100644 --- a/mkspecs/wincewm60standard-msvc2005/default_post.prf +++ b/mkspecs/wincewm60standard-msvc2005/default_post.prf @@ -1,6 +1,6 @@ # Visual Studio has some definitions set internally. # Thus we do not need to redefine these. -if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) { +contains(TEMPLATE, "vc.*") { DEFINES -= _M_ARM QMAKE_CXXFLAGS += -fp:precise } -- cgit v0.12 From 3838388e8143ac5f5e1f3688f9ba31190fd9bbd3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 23 Mar 2011 12:31:48 +0100 Subject: useful location reporting for errors from QMAKE_SUBSTITUTES Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 2 +- qmake/project.cpp | 14 ++++++++++++++ qmake/project.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index c13f38e..f9eba22 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -545,7 +545,7 @@ MakefileGenerator::init() else state.pop(); } else if(state.isEmpty() || state.top() == IN_CONDITION) { - contents += project->expand(line).join(QString(Option::field_sep)); + contents += project->expand(line, in.fileName(), count); } } if(out.exists() && out.open(QFile::ReadOnly)) { diff --git a/qmake/project.cpp b/qmake/project.cpp index 16200f1..d4f21be 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -2773,6 +2773,20 @@ QMakeProject::expand(const QString &str) return QStringList(); } +QString +QMakeProject::expand(const QString &str, const QString &file, int line) +{ + bool ok; + parser_info pi = parser; + parser.file = file; + parser.line_no = line; + parser.from_file = false; + QMap tmp = vars; + const QStringList ret = doVariableReplaceExpand(str, tmp, &ok); + parser = pi; + return ok ? ret.join(QString(Option::field_sep)) : QString(); +} + QStringList QMakeProject::expand(const QString &func, const QList &args) { diff --git a/qmake/project.h b/qmake/project.h index 09aa45e..0e6131d 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -144,6 +144,7 @@ public: QMap &place); QStringList expand(const QString &v); + QString expand(const QString &v, const QString &file, int line); QStringList expand(const QString &func, const QList &args); bool test(const QString &v); bool test(const QString &func, const QList &args); -- cgit v0.12 From ec834adf0ce004cb2919766dc12b31963d320f56 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 23 Mar 2011 12:57:49 +0100 Subject: make uic3-generated moc files depend on mocinclude.tmp Task-number: QTBUG-16951 Reviewed-by: mariusSO --- mkspecs/features/uic.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 0a18b47..74a2683 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -77,6 +77,7 @@ uic3 { uic3_moc.input = UIC3_HEADERS uic3_moc.variable_out = GENERATED_SOURCES uic3_moc.name = $$moc_header.name + !contains(TEMPLATE, "vc.*"):!isEmpty(INCLUDETEMP):uic3_moc.depends += $$INCLUDETEMP QMAKE_EXTRA_COMPILERS += uic3_moc } -- cgit v0.12 From 3aa39b0164ce4bb9e551feb0417990e5679c5209 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 23 Mar 2011 17:07:36 +0100 Subject: create a pwd string with a trailing slash only on demand Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f9eba22..f5b7295 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2825,9 +2825,6 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q return cacheVal; //do the fixin' - QString pwd = qmake_getpwd(); - if (!pwd.endsWith('/')) - pwd += '/'; QString orig_file = ret; if(ret.startsWith(QLatin1Char('~'))) { if(ret.startsWith(QLatin1String("~/"))) @@ -2836,12 +2833,16 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q warn_msg(WarnLogic, "Unable to expand ~ in %s", ret.toLatin1().constData()); } if(fix == FileFixifyAbsolute || (fix == FileFixifyDefault && project->isActiveConfig("no_fixpath"))) { - if(fix == FileFixifyAbsolute && QDir::isRelativePath(ret)) //already absolute + if(fix == FileFixifyAbsolute && QDir::isRelativePath(ret)) { //already absolute + QString pwd = qmake_getpwd(); + if (!pwd.endsWith(QLatin1Char('/'))) + pwd += QLatin1Char('/'); ret.prepend(pwd); + } ret = Option::fixPathToTargetOS(ret, false, canon); } else { //fix it.. QString out_dir = QDir(Option::output_dir).absoluteFilePath(out_d); - QString in_dir = QDir(pwd).absoluteFilePath(in_d); + QString in_dir = QDir(qmake_getpwd()).absoluteFilePath(in_d); { QFileInfo in_fi(fileInfo(in_dir)); if(in_fi.exists()) @@ -2907,7 +2908,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q ret = "."; debug_msg(3, "Fixed[%d,%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, canon, orig_file.toLatin1().constData(), ret.toLatin1().constData(), in_d.toLatin1().constData(), out_d.toLatin1().constData(), - pwd.toLatin1().constData(), Option::output_dir.toLatin1().constData()); + qmake_getpwd().toLatin1().constData(), Option::output_dir.toLatin1().constData()); cache->insert(cacheKey, ret); return ret; } -- cgit v0.12 From 11604357fccb59f7aba8165ea7ca8846eb820858 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 24 Mar 2011 12:58:15 +0100 Subject: stop fixifying after first success somewhat unlikely that this had much real-world effects ... except eating yet more cpu. Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f5b7295..9c22ca4 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2896,6 +2896,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q //prepend for(int o = 0; o < i; o++) dot_prefix += ".." + Option::dir_sep; + break; } } ret.prepend(dot_prefix); -- cgit v0.12 From af93be4d81d1e50b0c9f015f8432033cc737b22d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 10:22:10 +0200 Subject: simplify: the input and output dirs are already normalized Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 9c22ca4..7033a04 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -782,7 +782,7 @@ MakefileGenerator::init() } { //get the output_dir into the pwd - if(fileFixify(Option::output_dir) != fileFixify(qmake_getpwd())) + if(Option::output_dir != qmake_getpwd()) project->values("INCLUDEPATH").append(fileFixify(Option::output_dir, Option::output_dir, Option::output_dir)); -- cgit v0.12 From 2fe0805d4eb821d2aa11ea868ebb3ff32a108475 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 10:24:15 +0200 Subject: simplify: fileFixify for all same paths is always "." this must have been the most arcane way to generate a single dot ever Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7033a04..1bfbdba 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -783,9 +783,7 @@ MakefileGenerator::init() { //get the output_dir into the pwd if(Option::output_dir != qmake_getpwd()) - project->values("INCLUDEPATH").append(fileFixify(Option::output_dir, - Option::output_dir, - Option::output_dir)); + project->values("INCLUDEPATH").append("."); } //fix up the target deps -- cgit v0.12 From c74f29f28f2bfee8335820a67598d16e850e9444 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 10:28:27 +0200 Subject: simplify: absolute fixification ignores the base dir arguments Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 1bfbdba..8159804 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2460,7 +2460,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListprofile.isEmpty()) { QString out = subtarget->makefile; - QString in = fileFixify(in_directory + subtarget->profile, out_directory, QString(), FileFixifyAbsolute); + QString in = fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute); if(out.startsWith(in_directory)) out = out.mid(in_directory.length()); t << mkfile << ": " << "\n\t"; -- cgit v0.12 From 9df9d83085ff6164d83c35d51df539858ae398e4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 10:28:51 +0200 Subject: fix paths of vpath-resolved files Task-number: QTBUG-8169 Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 8159804..7eccc2e 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -364,7 +364,7 @@ MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &v dir = regex.left(regex.lastIndexOf(Option::dir_sep) + 1); real_dir = dir; if(!(flags & VPATH_NoFixify)) - real_dir = fileFixify(real_dir, qmake_getpwd(), Option::output_dir); + real_dir = fileFixify(real_dir, qmake_getpwd(), Option::output_dir) + '/'; regex.remove(0, dir.length()); } if(real_dir.isEmpty() || exists(real_dir)) { @@ -383,16 +383,15 @@ MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &v for(int i = (int)files.count()-1; i >= 0; i--) { if(files[i] == "." || files[i] == "..") continue; - a = dir + files[i]; + a = real_dir + files[i]; if(!(flags & VPATH_NoFixify)) a = fileFixify(a); l.insert(val_it, a); } } } else { - debug_msg(1, "%s:%d Cannot match %s%c%s, as %s does not exist.", + debug_msg(1, "%s:%d Cannot match %s%s, as %s does not exist.", __FILE__, __LINE__, real_dir.toLatin1().constData(), - QDir::separator().toLatin1(), regex.toLatin1().constData(), real_dir.toLatin1().constData()); if(flags & VPATH_RemoveMissingFiles) remove_file = true; -- cgit v0.12 From 430b743946178c3f05208434331b8017159612b1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 10:33:45 +0200 Subject: dist target: fixify OBJECTS_DIR against output dir the thing is terminally broken anyway, but whatever Reviewed-by: mariusSO --- qmake/generators/unix/unixmake2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index c660855..c0c0aaa 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -787,7 +787,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ddir = project->first("QMAKE_DISTDIR"); QString ddir_c = escapeFilePath(fileFixify((project->isEmpty("OBJECTS_DIR") ? QString(".tmp/") : - project->first("OBJECTS_DIR")) + ddir)); + project->first("OBJECTS_DIR")) + ddir, + Option::output_dir, Option::output_dir)); t << "dist: " << "\n\t" << mkdir_p_asstring(ddir_c) << "\n\t" << "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && "; -- cgit v0.12 From 26dd9a45c3b1e92c356ee7f80f728e2ddca0c1d8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 13:56:23 +0200 Subject: fix fixifying of QMAKE_SUBSTITUTES use the correct bases. notably, don't expect the input file in the output dir. Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7eccc2e..d096eb4 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -483,19 +483,22 @@ MakefileGenerator::init() subs.at(i).toLatin1().constData()); continue; } - inn = tinn.first(); - outn = toutn.first(); + inn = fileFixify(tinn.first(), qmake_getpwd()); + outn = fileFixify(toutn.first(), qmake_getpwd(), Option::output_dir); } else { - inn = subs.at(i); + inn = fileFixify(subs.at(i), qmake_getpwd()); + if (!QFile::exists(inn)) { + // random insanity for backwards compat: .in file specified with absolute out dir + inn = fileFixify(subs.at(i)); + } if(!inn.endsWith(".in")) { warn_msg(WarnLogic, "Substitute '%s' does not end with '.in'", inn.toLatin1().constData()); continue; } - outn = inn.left(inn.length()-3); + outn = fileFixify(inn.left(inn.length()-3), qmake_getpwd(), Option::output_dir); } - QFile in(fileFixify(inn)); - QFile out(fileFixify(outn, qmake_getpwd(), Option::output_dir)); + QFile in(inn); if(in.open(QFile::ReadOnly)) { QString contents; QStack state; @@ -547,6 +550,7 @@ MakefileGenerator::init() contents += project->expand(line, in.fileName(), count); } } + QFile out(outn); if(out.exists() && out.open(QFile::ReadOnly)) { QString old = QString::fromUtf8(out.readAll()); if(contents == old) { -- cgit v0.12 From 8b11ebf392d832725185de08c2438d6b8771890b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 14:42:35 +0200 Subject: fixify target source against build tree that's where one would expect a target, after all. affects only extra targets explicitly requesting fixification, i.e., nothing. Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d096eb4..3c5948f 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1747,7 +1747,7 @@ MakefileGenerator::writeExtraTargets(QTextStream &t) deps += " " + escapeDependencyPath(dep); } if(project->values((*it) + ".CONFIG").indexOf("fix_target") != -1) - targ = fileFixify(targ); + targ = fileFixify(targ, Option::output_dir, Option::output_dir); if(project->isEmpty("QMAKE_NOFORCE") && project->values((*it) + ".CONFIG").indexOf("phony") != -1) deps += QString(" ") + "FORCE"; -- cgit v0.12 From a5be47714e5a0075fe9d0ea4a7925136a48e3974 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 11:54:38 +0200 Subject: run depend_command in build dir in VS generators as well followup to b139e7e96e5c47b412c4f0bbc4ae11d5cca99e61 Reviewed-by: mariusSO --- qmake/generators/win32/msbuild_objectmodel.cpp | 5 ++++- qmake/generators/win32/msvc_objectmodel.cpp | 5 ++++- qmake/generators/win32/msvc_vcproj.cpp | 6 +++++- qmake/generators/win32/msvc_vcxproj.cpp | 6 +++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index bd94178..01f730a 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -2438,6 +2438,9 @@ bool VCXFilter::addExtraCompiler(const VCXFilterFile &info) char buff[256]; QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd, Option::fixPathToLocalOS(inFile, true, false), out); if(Project->canExecute(dep_cmd)) { + dep_cmd.prepend(QLatin1String("cd ") + + Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && ")); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -2452,7 +2455,7 @@ bool VCXFilter::addExtraCompiler(const VCXFilterFile &info) for (int i = 0; i < extradeps.count(); ++i) { QString dd = extradeps.at(i).simplified(); if (!dd.isEmpty()) - deps += Project->fileFixify(dd); + deps += Project->fileFixify(dd, QString(), Option::output_dir); } } } diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 87c8943..0a24a01 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2218,6 +2218,9 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) Option::fixPathToLocalOS(inFile, true, false), out); if(Project->canExecute(dep_cmd)) { + dep_cmd.prepend(QLatin1String("cd ") + + Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && ")); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -2232,7 +2235,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) for (int i = 0; i < extradeps.count(); ++i) { QString dd = extradeps.at(i).simplified(); if (!dd.isEmpty()) - deps += Project->fileFixify(dd); + deps += Project->fileFixify(dd, QString(), Option::output_dir); } } } diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 364eca0..10934a5 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1302,6 +1302,9 @@ void VcprojGenerator::initResourceFiles() dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(canExecute(dep_cmd)) { + dep_cmd.prepend(QLatin1String("cd ") + + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && ")); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1312,7 +1315,8 @@ void VcprojGenerator::initResourceFiles() } QT_PCLOSE(proc); if(!indeps.isEmpty()) - deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); + deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '), + QString(), Option::output_dir); } } } diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 2b628a5..e2464ec 100644 --- a/qmake/generators/win32/msvc_vcxproj.cpp +++ b/qmake/generators/win32/msvc_vcxproj.cpp @@ -654,6 +654,9 @@ void VcxprojGenerator::initResourceFiles() dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(canExecute(dep_cmd)) { + dep_cmd.prepend(QLatin1String("cd ") + + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && ")); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -664,7 +667,8 @@ void VcxprojGenerator::initResourceFiles() } QT_PCLOSE(proc); if(!indeps.isEmpty()) - deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); + deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '), + QString(), Option::output_dir); } } } -- cgit v0.12 From 8caba032245dfa310a77c22c1e55137c54e59f4f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 17:10:35 +0200 Subject: make collection of SUBDIRS in solution generator less bizarre de-duplicate code, and on the way don't try to re-resolve project variables of subprojects against the contents of the top level project. Reviewed-by: mariusSO --- qmake/generators/win32/msvc_vcproj.cpp | 42 +++++++++++++++++----------------- qmake/generators/win32/msvc_vcproj.h | 1 + 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 10934a5..5005190 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -352,6 +352,25 @@ QUuid VcprojGenerator::increaseUUID(const QUuid &id) return result; } +QStringList VcprojGenerator::collectSubDirs(QMakeProject *proj) +{ + QStringList subdirs; + QStringList tmp_proj_subdirs = proj->variables()["SUBDIRS"]; + for(int x = 0; x < tmp_proj_subdirs.size(); ++x) { + QString tmpdir = tmp_proj_subdirs.at(x); + if(!proj->isEmpty(tmpdir + ".file")) { + if(!proj->isEmpty(tmpdir + ".subdir")) + warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s", + tmpdir.toLatin1().constData()); + tmpdir = proj->first(tmpdir + ".file"); + } else if(!proj->isEmpty(tmpdir + ".subdir")) { + tmpdir = proj->first(tmpdir + ".subdir"); + } + subdirs += tmpdir; + } + return subdirs; +} + void VcprojGenerator::writeSubDirs(QTextStream &t) { // Check if all requirements are fulfilled @@ -386,7 +405,6 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) QHash solution_depends; QList solution_cleanup; - QStringList subdirs = project->values("SUBDIRS"); QString oldpwd = qmake_getpwd(); // Make sure that all temp projects are configured @@ -395,16 +413,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) QStringList old_after_vars = Option::after_user_vars; Option::after_user_vars.append("CONFIG+=release"); + QStringList subdirs = collectSubDirs(project); for(int i = 0; i < subdirs.size(); ++i) { QString tmp = subdirs.at(i); - if(!project->isEmpty(tmp + ".file")) { - if(!project->isEmpty(tmp + ".subdir")) - warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s", - tmp.toLatin1().constData()); - tmp = project->first(tmp + ".file"); - } else if(!project->isEmpty(tmp + ".subdir")) { - tmp = project->first(tmp + ".subdir"); - } QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true))); if(fi.exists()) { if(fi.isDir()) { @@ -428,19 +439,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) continue; } if(tmp_proj.first("TEMPLATE") == "vcsubdirs") { - QStringList tmp_proj_subdirs = tmp_proj.variables()["SUBDIRS"]; - for(int x = 0; x < tmp_proj_subdirs.size(); ++x) { - QString tmpdir = tmp_proj_subdirs.at(x); - if(!tmp_proj.isEmpty(tmpdir + ".file")) { - if(!tmp_proj.isEmpty(tmpdir + ".subdir")) - warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s", - tmpdir.toLatin1().constData()); - tmpdir = tmp_proj.first(tmpdir + ".file"); - } else if(!tmp_proj.isEmpty(tmpdir + ".subdir")) { - tmpdir = tmp_proj.first(tmpdir + ".subdir"); - } + foreach(const QString &tmpdir, collectSubDirs(&tmp_proj)) subdirs += fileFixify(tmpdir); - } } else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") { // Initialize a 'fake' project to get the correct variables // and to be able to extract all the dependencies diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 8e55211..d66c029 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -130,6 +130,7 @@ protected: QList mergedProjects; private: + QStringList collectSubDirs(QMakeProject *proj); QUuid increaseUUID(const QUuid &id); friend class VCFilter; }; -- cgit v0.12 From e22e36bc61b4af7c0a9113617df5a35ed315dede Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Mar 2011 20:17:18 +0200 Subject: look for makespec in the build dir first it's more natural to look into the build dir before the source dir, and it's what the qmake-generated makefiles mean when re-invoking qmake. specifically, this works around the problem that relative paths with excess ".."s pointing below the root are happily ignored and thus truly bizarre makespec paths may be constructed by the qmake re-invocations if the source dir is less nested than the build dir. Task-number: QTBUG-9817 Reviewed-by: mariusSO --- qmake/project.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index d4f21be..177ab2f 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1345,10 +1345,10 @@ QMakeProject::read(uchar cmd) } if(QDir::isRelativePath(qmakespec)) { - if (QFile::exists(qmakespec+"/qmake.conf")) { - Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath(); - } else if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) { + if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) { qmakespec = Option::mkfile::qmakespec = QFileInfo(Option::output_dir+"/"+qmakespec).absoluteFilePath(); + } else if (QFile::exists(qmakespec+"/qmake.conf")) { + Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath(); } else { bool found_mkspec = false; for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) { -- cgit v0.12 From 565e8679374e71df9f72074dd3c71c929aeeafc8 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 12 Apr 2011 12:35:41 +0200 Subject: Use FixNativeOrientation on Symbian when the application wants it. Applications can request the usage of RWindow::FixNativeOrientation() by setting the new Qt::WA_SymbianNoSystemRotation attribute for their fullscreen top-level widget (which in practice will either be a graphics or declarative view). This will fix the underlying EGL window surface and the QWidget dimensions to the dimension of the native orientation of the device (typically portrait). The default auto-rotation can be left enabled, however it will be up to the application to rotate the drawing. Global notifications, VKB, etc. will still appear in the proper orientation. Another benefit is improved performance in the non-native orientation. Task-number: QTBUG-17742 Reviewed-by: Jason Barron Reviewed-by: Jani Hautakangas --- src/corelib/global/qnamespace.h | 2 + src/corelib/global/qnamespace.qdoc | 1 + src/gui/kernel/qapplication_s60.cpp | 159 ++++++++++++++++++++++++++---------- src/gui/kernel/qt_s60_p.h | 15 ++-- src/gui/kernel/qwidget_s60.cpp | 2 + 5 files changed, 132 insertions(+), 47 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 4d70744..15cc809 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -526,6 +526,8 @@ public: WA_X11DoNotAcceptFocus = 132, + WA_SymbianNoSystemRotation = 133, + // Add new attributes before this line WA_AttributeCount }; diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 22ad83b..f03fb25 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1244,6 +1244,7 @@ \omitvalue WA_SetWindowModality \omitvalue WA_WState_WindowOpacitySet \omitvalue WA_WState_AcceptedTouchBeginEvent + \omitvalue WA_SymbianNoSystemRotation */ /*! \typedef Qt::HANDLE diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index f80b657..d37845d 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -546,11 +546,52 @@ void QSymbianControl::setWidget(QWidget *w) { qwidget = w; } + +QPoint QSymbianControl::translatePointForFixedNativeOrientation(const TPoint &pointerEventPos) const +{ + QPoint pos(pointerEventPos.iX, pointerEventPos.iY); + if (qwidget->d_func()->fixNativeOrientationCalled) { + QSize wsize = qwidget->size(); + TSize size = Size(); + if (size.iWidth == wsize.height() && size.iHeight == wsize.width()) { + qreal x = pos.x(); + qreal y = pos.y(); + pos.setX(size.iHeight - y); + pos.setY(x); + } + } + return pos; +} + +TRect QSymbianControl::translateRectForFixedNativeOrientation(const TRect &controlRect) const +{ + TRect rect = controlRect; + if (qwidget->d_func()->fixNativeOrientationCalled) { + QPoint a = translatePointForFixedNativeOrientation(rect.iTl); + QPoint b = translatePointForFixedNativeOrientation(rect.iBr); + if (a.x() < b.x()) { + rect.iTl.iX = a.x(); + rect.iBr.iX = b.x(); + } else { + rect.iTl.iX = b.x(); + rect.iBr.iX = a.x(); + } + if (a.y() < b.y()) { + rect.iTl.iY = a.y(); + rect.iBr.iY = b.y(); + } else { + rect.iTl.iY = b.y(); + rect.iBr.iY = a.y(); + } + } + return rect; +} + void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ) { QWidget *alienWidget; - QPoint widgetPos = QPoint(aPenEventLocation.iX, aPenEventLocation.iY); - QPoint globalPos = QPoint(aPenEventScreenLocation.iX,aPenEventScreenLocation.iY); + QPoint widgetPos = translatePointForFixedNativeOrientation(aPenEventLocation); + QPoint globalPos = translatePointForFixedNativeOrientation(aPenEventScreenLocation); alienWidget = qwidget->childAt(widgetPos); if (!alienWidget) alienWidget = qwidget; @@ -565,7 +606,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent *event) { QApplicationPrivate *d = QApplicationPrivate::instance(); - QPointF screenPos = qwidget->mapToGlobal(QPoint(event->iPosition.iX, event->iPosition.iY)); + QPointF screenPos = qwidget->mapToGlobal(translatePointForFixedNativeOrientation(event->iPosition)); qreal pressure; if(d->pressureSupported && event->Pressure() > 0) //workaround for misconfigured HAL @@ -666,7 +707,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) mapS60MouseEventTypeToQt(&type, &button, &pEvent); Qt::KeyboardModifiers modifiers = mapToQtModifiers(pEvent.iModifiers); - QPoint widgetPos = QPoint(pEvent.iPosition.iX, pEvent.iPosition.iY); + QPoint widgetPos = translatePointForFixedNativeOrientation(pEvent.iPosition); TPoint controlScreenPos = PositionRelativeToScreen(); QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos; S60->lastCursorPos = globalPos; @@ -1132,6 +1173,9 @@ void QSymbianControl::Draw(const TRect& controlRect) const Q_ASSERT(window); QTLWExtra *topExtra = window->d_func()->maybeTopData(); Q_ASSERT(topExtra); + + TRect wcontrolRect = translateRectForFixedNativeOrientation(controlRect); + if (!topExtra->inExpose) { topExtra->inExpose = true; if (!qwidget->isWindow()) { @@ -1142,7 +1186,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const gc.SetBrushColor(TRgb(0, 0, 0, 0)); gc.Clear(controlRect); } - QRect exposeRect = qt_TRect2QRect(controlRect); + QRect exposeRect = qt_TRect2QRect(wcontrolRect); qwidget->d_func()->syncBackingStore(exposeRect); topExtra->inExpose = false; } @@ -1155,7 +1199,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const const bool sendNativePaintEvents = qwidget->d_func()->extraData()->receiveNativePaintEvents; if (sendNativePaintEvents) { - const QRect r = qt_TRect2QRect(controlRect); + const QRect r = qt_TRect2QRect(wcontrolRect); QMetaObject::invokeMethod(qwidget, "beginNativePaintEvent", Qt::DirectConnection, Q_ARG(QRect, r)); } @@ -1210,7 +1254,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const } if (sendNativePaintEvents) { - const QRect r = qt_TRect2QRect(controlRect); + const QRect r = qt_TRect2QRect(wcontrolRect); // The draw ops aren't actually sent to WSERV until the graphics // context is deactivated, which happens in the function calling // this one. We therefore delay the delivery of endNativePaintEvent, @@ -1223,14 +1267,45 @@ void QSymbianControl::Draw(const TRect& controlRect) const } } +void QSymbianControl::qwidgetResize_helper(const QSize &newSize) +{ + QRect cr = qwidget->geometry(); + QSize oldSize(cr.size()); + cr.setSize(newSize); + qwidget->data->crect = cr; + if (qwidget->isVisible()) { + QTLWExtra *tlwExtra = qwidget->d_func()->maybeTopData(); + bool slowResize = qgetenv("QT_SLOW_TOPLEVEL_RESIZE").toInt(); + if (!slowResize && tlwExtra) + tlwExtra->inTopLevelResize = true; + QResizeEvent e(newSize, oldSize); + qt_sendSpontaneousEvent(qwidget, &e); + if (!qwidget->testAttribute(Qt::WA_StaticContents)) + qwidget->d_func()->syncBackingStore(); + if (!slowResize && tlwExtra) + tlwExtra->inTopLevelResize = false; + } else { + if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) { + QResizeEvent *e = new QResizeEvent(newSize, oldSize); + QApplication::postEvent(qwidget, e); + } + } +} + void QSymbianControl::SizeChanged() { CCoeControl::SizeChanged(); + // When FixNativeOrientation had been called, the RWindow/CCoeControl size + // and the surface/QWidget size have nothing to do with each other. + if (qwidget->d_func()->fixNativeOrientationCalled) + return; + QSize oldSize = qwidget->size(); QSize newSize(Size().iWidth, Size().iHeight); if (oldSize != newSize) { + // Enforce the proper size for fullscreen widgets on the secondary screen. const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen; const int screenNumber = S60->screenNumberForWidget(qwidget); if (!m_inExternalScreenOverride && isFullscreen && screenNumber > 0) { @@ -1243,26 +1318,8 @@ void QSymbianControl::SizeChanged() return; } } - QRect cr = qwidget->geometry(); - cr.setSize(newSize); - qwidget->data->crect = cr; - if (qwidget->isVisible()) { - QTLWExtra *tlwExtra = qwidget->d_func()->maybeTopData(); - bool slowResize = qgetenv("QT_SLOW_TOPLEVEL_RESIZE").toInt(); - if (!slowResize && tlwExtra) - tlwExtra->inTopLevelResize = true; - QResizeEvent e(newSize, oldSize); - qt_sendSpontaneousEvent(qwidget, &e); - if (!qwidget->testAttribute(Qt::WA_StaticContents)) - qwidget->d_func()->syncBackingStore(); - if (!slowResize && tlwExtra) - tlwExtra->inTopLevelResize = false; - } else { - if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) { - QResizeEvent *e = new QResizeEvent(newSize, oldSize); - QApplication::postEvent(qwidget, e); - } - } + + qwidgetResize_helper(newSize); } m_inExternalScreenOverride = false; @@ -1513,29 +1570,49 @@ bool QSymbianControl::isControlActive() void QSymbianControl::ensureFixNativeOrientation() { #if defined(Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION) - // Call FixNativeOrientation() for fullscreen QDeclarativeViews that - // have a locked orientation matching the native orientation of the device. - // This avoids unnecessary window rotation on wserv level. - if (!qwidget->isWindow() || qwidget->windowType() == Qt::Desktop - || !qwidget->inherits("QDeclarativeView") - || S60->screenNumberForWidget(qwidget) > 0) + if (!qwidget->isWindow() || qwidget->windowType() == Qt::Desktop) + return; + if (S60->screenNumberForWidget(qwidget) > 0) return; - const bool isFullScreen = qwidget->windowState().testFlag(Qt::WindowFullScreen); const bool isFixed = qwidget->d_func()->fixNativeOrientationCalled; - const bool matchesNative = qwidget->testAttribute( - S60->nativeOrientationIsPortrait ? Qt::WA_LockPortraitOrientation - : Qt::WA_LockLandscapeOrientation); - if (isFullScreen && matchesNative) { - if (!isFixed) { - Window().FixNativeOrientation(); - qwidget->d_func()->fixNativeOrientationCalled = true; + const bool isFixEnabled = qwidget->testAttribute(Qt::WA_SymbianNoSystemRotation); + const bool isFullScreen = qwidget->windowState().testFlag(Qt::WindowFullScreen); + if (isFullScreen && isFixEnabled) { + const bool surfaceBasedGs = + QApplicationPrivate::graphics_system_name == QLatin1String("openvg") + || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"); + if (!surfaceBasedGs) + qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false); + if (!isFixed && surfaceBasedGs) { + if (Window().FixNativeOrientation() == KErrNone) { + qwidget->d_func()->fixNativeOrientationCalled = true; + // The EGL window surface is now fixed to the native orientation + // of the device, no matter what size we pass when creating it. + // Enforce the same size for the QWidget too. For the underlying + // CCoeControl and RWindow it is up to the system to resize them + // when the standard auto-rotation mechanism is in use, we must not + // change that behavior by forcing any size for those. In practice + // this means that the QWidget and the underlying native control + // dimensions will be out of sync when FixNativeOrientation was + // called and the device is turned to the non-native (typically + // landscape) orientation. The pointer event handling and certain + // functions like Draw() will need to compensate for this. + QSize newSize(S60->nativeScreenWidthInPixels, S60->nativeScreenHeightInPixels); + if (qwidget->size() != newSize) + qwidgetResize_helper(newSize); + } else { + qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false); + } } } else if (isFixed) { + qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false); qwidget->d_func()->fixNativeOrientationCalled = false; qwidget->hide(); qwidget->d_func()->create_sys(0, false, true); qwidget->show(); } +#else + qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false); #endif } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index c48bf63..e24405c 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -191,7 +191,8 @@ public: int screenWidthInTwipsForScreen[qt_symbian_max_screens]; int screenHeightInTwipsForScreen[qt_symbian_max_screens]; - bool nativeOrientationIsPortrait; + int nativeScreenWidthInPixels; + int nativeScreenHeightInPixels; }; Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data(); @@ -237,6 +238,8 @@ public: bool isControlActive(); void ensureFixNativeOrientation(); + QPoint translatePointForFixedNativeOrientation(const TPoint &pointerEventPos) const; + TRect translateRectForFixedNativeOrientation(const TRect &controlRect) const; #ifdef Q_WS_S60 void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); } @@ -256,6 +259,9 @@ protected: void PositionChanged(); void FocusChanged(TDrawNow aDrawNow); +protected: + void qwidgetResize_helper(const QSize &newSize); + private: void HandlePointerEvent(const TPointerEvent& aPointerEvent); TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType); @@ -363,18 +369,15 @@ inline void QS60Data::updateScreenSize() // Look for a screen mode with rotation 0 // in order to decide what the native orientation is. - int nativeScreenWidthInPixels = 0; - int nativeScreenHeightInPixels = 0; for (mode = 0; mode < screenModeCount; ++mode) { TPixelsAndRotation sizeAndRotation; dev->GetScreenModeSizeAndRotation(mode, sizeAndRotation); if (sizeAndRotation.iRotation == CFbsBitGc::EGraphicsOrientationNormal) { - nativeScreenWidthInPixels = sizeAndRotation.iPixelSize.iWidth; - nativeScreenHeightInPixels = sizeAndRotation.iPixelSize.iHeight; + S60->nativeScreenWidthInPixels = sizeAndRotation.iPixelSize.iWidth; + S60->nativeScreenHeightInPixels = sizeAndRotation.iPixelSize.iHeight; break; } } - S60->nativeOrientationIsPortrait = nativeScreenWidthInPixels <= nativeScreenHeightInPixels; } inline RWsSession& QS60Data::wsSession() diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 10bb98b..d55e1ad 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -838,6 +838,8 @@ void QWidgetPrivate::s60UpdateIsOpaque() // recreate backing store to get translucent surface (raster surface). extra->topextra->backingStore.create(q); extra->topextra->backingStore.registerWidget(q); + // FixNativeOrientation() will not work without an EGL surface. + q->setAttribute(Qt::WA_SymbianNoSystemRotation, false); } } } else if (extra->topextra->nativeWindowTransparencyEnabled) { -- cgit v0.12 From 60475e93890550f4fb67367980249a21b9346747 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 12 Apr 2011 14:27:15 +0200 Subject: Have the backing store destroyed also in special Symbian scenarios. The backing store tracker's registerWidget and unregisterWidget functions are called when EPartiallyVisible and ENotVisible events come from WSERV. However if an application sends its window group to background right after caling show() and before entering the event loop, there is a chance that all the application will receive is an ENotVisible event, leading to calling unregisterWidget() without a previous registerWidget(). In this case the backing store was not destroyed and the application was consuming GPU memory even while it was staying in background. This patch ensures registerWidget() is called always before unregisterWidget() in the Symbian-specific event handler for ENotVisible, and replaces the previous patch, a12d41076919a133e63de63dff5c1a131a0564e4, which caused regression in autotests. Task-number: QTBUG-18493 Reviewed-by: Gareth Stockwell --- src/gui/kernel/qapplication_s60.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index d37845d..f73eb02 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -215,6 +215,12 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible) widget->repaint(); } } else { + // In certain special scenarios we may get an ENotVisible event + // without a previous EPartiallyVisible. The backingstore must + // still be destroyed, hence the registerWidget() call below. + if (backingStore.data() && widget->internalWinId() + && qt_widget_private(widget)->maybeBackingStore() == backingStore.data()) + backingStore.registerWidget(widget); backingStore.unregisterWidget(widget); // In order to ensure that any resources used by the window surface // are immediately freed, we flush the WSERV command buffer. -- cgit v0.12 From c7833b8f5ecc7a47e35bdf9fbb528e1869979ef5 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 7 Apr 2011 16:21:27 +1000 Subject: Fix TextEdit cursorRectangle property. Translate the cursor rectangle from control coordinates to painting coordinates rather than the other way around, ensure the cursor delegate is also translated, and update the cursor rectangle, cursor delegate and micro focus when the preedit cursor changes position. Change-Id: Iac7a87f7fb965d5f56d059d8f4b97feef8b47789 Task-number: QTBUG-18515 QT-4827 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativetextedit.cpp | 15 ++++++--------- src/gui/text/qtextcontrol.cpp | 3 +++ .../qdeclarativetextedit/data/cursorTest.qml | 1 + .../tst_qdeclarativetextedit.cpp | 21 ++++++++++++++++++++- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 2cb1c94..af2c8f3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -582,6 +582,7 @@ void QDeclarativeTextEdit::setVAlign(QDeclarativeTextEdit::VAlignment alignment) d->vAlign = alignment; d->updateDefaultTextOption(); updateSize(); + moveCursorDelegate(); emit verticalAlignmentChanged(d->vAlign); } @@ -870,8 +871,6 @@ void QDeclarativeTextEdit::setCursorDelegate(QDeclarativeComponent* c) Q_D(QDeclarativeTextEdit); if(d->cursorComponent){ if(d->cursor){ - disconnect(d->control, SIGNAL(cursorPositionChanged()), - this, SLOT(moveCursorDelegate())); d->control->setCursorWidth(-1); dirtyCache(cursorRectangle()); delete d->cursor; @@ -897,8 +896,6 @@ void QDeclarativeTextEdit::loadCursorDelegate() return; d->cursor = qobject_cast(d->cursorComponent->create(qmlContext(this))); if(d->cursor){ - connect(d->control, SIGNAL(cursorPositionChanged()), - this, SLOT(moveCursorDelegate())); d->control->setCursorWidth(0); dirtyCache(cursorRectangle()); QDeclarative_setParent_noEvent(d->cursor, this); @@ -1173,7 +1170,7 @@ Qt::TextInteractionFlags QDeclarativeTextEdit::textInteractionFlags() const QRect QDeclarativeTextEdit::cursorRectangle() const { Q_D(const QDeclarativeTextEdit); - return d->control->cursorRect().toRect().translated(0,-d->yoff); + return d->control->cursorRect().toRect().translated(0,d->yoff); } @@ -1558,7 +1555,7 @@ void QDeclarativeTextEditPrivate::init() QObject::connect(control, SIGNAL(selectionChanged()), q, SLOT(updateSelectionMarkers())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(updateSelectionMarkers())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); - QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorRectangleChanged())); + QObject::connect(control, SIGNAL(microFocusChanged()), q, SLOT(moveCursorDelegate())); QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString))); #ifndef QT_NO_CLIPBOARD QObject::connect(q, SIGNAL(readOnlyChanged(bool)), q, SLOT(q_canPasteChanged())); @@ -1583,16 +1580,17 @@ void QDeclarativeTextEdit::q_textChanged() d->updateDefaultTextOption(); updateSize(); updateTotalLines(); - updateMicroFocus(); emit textChanged(d->text); } void QDeclarativeTextEdit::moveCursorDelegate() { Q_D(QDeclarativeTextEdit); + updateMicroFocus(); + emit cursorRectangleChanged(); if(!d->cursor) return; - QRectF cursorRect = d->control->cursorRect(); + QRectF cursorRect = cursorRectangle(); d->cursor->setX(cursorRect.x()); d->cursor->setY(cursorRect.y()); } @@ -1625,7 +1623,6 @@ void QDeclarativeTextEdit::updateSelectionMarkers() d->lastSelectionEnd = d->control->textCursor().selectionEnd(); emit selectionEndChanged(); } - updateMicroFocus(); } QRectF QDeclarativeTextEdit::boundingRect() const diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 1a81394..bee4d95 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1950,6 +1950,7 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) if (isGettingInput) layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); QList overrides; + const int oldPreeditCursor = preeditCursor; preeditCursor = e->preeditString().length(); hideCursor = false; for (int i = 0; i < e->attributes().size(); ++i) { @@ -1970,6 +1971,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) } layout->setAdditionalFormats(overrides); cursor.endEditBlock(); + if (oldPreeditCursor != preeditCursor) + emit q->microFocusChanged(); } QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const diff --git a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml index c7c21fc..f7fb3e7 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml @@ -2,6 +2,7 @@ import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" TextEdit { text: "Hello world!"; id: textEditObject; objectName: "textEditObject" + anchors.fill: parent resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance" } } ] cursorDelegate: cursor } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 8f1be6f..574d2d5 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -1539,6 +1539,19 @@ void tst_qdeclarativetextedit::cursorDelegate() textEditObject->setCursorPosition(0); QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + QVERIFY(textEditObject->cursorRectangle().y() >= 0); + QVERIFY(textEditObject->cursorRectangle().y() < textEditObject->cursorRectangle().height()); + textEditObject->setVAlign(QDeclarativeTextEdit::AlignVCenter); + QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); + QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + QVERIFY(textEditObject->cursorRectangle().y() > (textEditObject->height() / 2) - textEditObject->cursorRectangle().height()); + QVERIFY(textEditObject->cursorRectangle().y() < (textEditObject->height() / 2) + textEditObject->cursorRectangle().height()); + textEditObject->setVAlign(QDeclarativeTextEdit::AlignBottom); + QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); + QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + QVERIFY(textEditObject->cursorRectangle().y() > textEditObject->height() - (textEditObject->cursorRectangle().height() * 2)); + QVERIFY(textEditObject->cursorRectangle().y() < textEditObject->height()); + //Test Delegate gets deleted textEditObject->setCursorDelegate(0); QVERIFY(!textEditObject->findChild("cursorInstance")); @@ -2227,6 +2240,8 @@ void tst_qdeclarativetextedit::preeditMicroFocus() QTest::qWaitForWindowShown(&view); QTRY_COMPARE(QApplication::activeWindow(), static_cast(&view)); + QSignalSpy cursorRectangleSpy(&edit, SIGNAL(cursorRectangleChanged())); + QRect currentRect; QRect previousRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect(); @@ -2237,8 +2252,9 @@ void tst_qdeclarativetextedit::preeditMicroFocus() currentRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect(); QCOMPARE(currentRect, previousRect); #if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) - QCOMPARE(ic.updateReceived, true); + QCOMPARE(ic.updateReceived, false); // The cursor position hasn't changed. #endif + QCOMPARE(cursorRectangleSpy.count(), 0); // Verify that the micro focus rect moves to the left as the cursor position // is incremented. @@ -2250,6 +2266,8 @@ void tst_qdeclarativetextedit::preeditMicroFocus() #if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) QCOMPARE(ic.updateReceived, true); #endif + QVERIFY(cursorRectangleSpy.count() > 0); + cursorRectangleSpy.clear(); previousRect = currentRect; } @@ -2263,6 +2281,7 @@ void tst_qdeclarativetextedit::preeditMicroFocus() #if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) QCOMPARE(ic.updateReceived, true); #endif + QVERIFY(cursorRectangleSpy.count() > 0); } void tst_qdeclarativetextedit::inputContextMouseHandler() -- cgit v0.12 From 1840a4383fd19bc64ef6d81c09c3f54aeb52d777 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 13 Apr 2011 11:34:46 +0300 Subject: Predictive Text causing app to crash after repeated edit attempts Splitview changes cause application to crash, since the cancellation of FEP transaction is not notified to the native side. This leads the native side and Qt to be not in sync. Task-number: QT-4879 Reviewed-by: Guoqing Zhang --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 868565d..8574f2c 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -231,7 +231,7 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) // It ignores the mouse event, so we need to commit and send a selection event (which will get triggered // after the commit) if (!m_preeditString.isEmpty()) { - commitCurrentString(false); + commitCurrentString(true); int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt(); -- cgit v0.12 From cc526edbff1cc413532f7ab1b6c088adae76744d Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Wed, 13 Apr 2011 11:38:13 +0300 Subject: Fix to 'QImage convertToFormat doesn't work correctly' OpenVG paint engine tries to use vgWritePixels shortcut whenever possible to optimize rendering performance. The check 'canVgWritePixels' failed to map formats correctly and resulted to incorrect return value. Task-number: QTBUG-18682 Reviewed-by: Jason Barron --- src/openvg/qpaintengine_vg.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 570adfd..ebdfa5f 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1024,9 +1024,11 @@ static VGImage toVGImage switch (img.format()) { case QImage::Format_Mono: img = image.convertToFormat(QImage::Format_MonoLSB, flags); + img.invertPixels(); format = VG_BW_1; break; case QImage::Format_MonoLSB: + img.invertPixels(); format = VG_BW_1; break; case QImage::Format_RGB32: @@ -3189,6 +3191,19 @@ void qt_vg_drawVGImageStencil bool QVGPaintEngine::canVgWritePixels(const QImage &image) const { Q_D(const QVGPaintEngine); + + // qt_vg_image_to_vg_format returns VG_sARGB_8888 as + // fallback case if no matching VG format is found. + // If given image format is not Format_ARGB32 and returned + // format is VG_sARGB_8888, it means that no match was + // found. In that case vgWritePixels cannot be used. + // Also 1-bit formats cannot be used directly either. + if ((image.format() != QImage::Format_ARGB32 + && qt_vg_image_to_vg_format(image.format()) == VG_sARGB_8888) + || image.depth() == 1) { + return false; + } + // vgWritePixels ignores masking, blending and xforms so we can only use it if // ALL of the following conditions are true: // - It is a simple translate, or a scale of -1 on the y-axis (inverted) -- cgit v0.12 From 52187b084491641ef80536c743c2261af8bfe11c Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 13 Apr 2011 16:34:06 +1000 Subject: Moving contentY by large values in List/GridView is slow We needed to create/destroy every delegate between the current position and the new position. Now we estimate element at the new position and just create the elements from that item. Change-Id: I9da1354cbadb4e44fafc1a0bee619d058d1e06a2 Task-number: QTBUG-14974 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativegridview.cpp | 20 ++++++++ .../graphicsitems/qdeclarativelistview.cpp | 22 +++++++++ .../tst_qdeclarativegridview.cpp | 51 ++++++++++++++++++++ .../tst_qdeclarativelistview.cpp | 56 ++++++++++++++++++++++ 4 files changed, 149 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 3ec29c1..21bfc59 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -584,6 +584,26 @@ void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer) --i; modelIndex = visibleItems.at(i)->index + 1; } + + if (visibleItems.count() && (fillFrom > rowPos + rowSize()*2 + || fillTo < rowPosAt(visibleIndex) - rowSize())) { + // We've jumped more than a page. Estimate which items are now + // visible and fill from there. + int count = (fillFrom - (rowPos + rowSize())) / (rowSize()) * columns; + for (int i = 0; i < visibleItems.count(); ++i) + releaseItem(visibleItems.at(i)); + visibleItems.clear(); + modelIndex += count; + if (modelIndex >= model->count()) + modelIndex = model->count() - 1; + else if (modelIndex < 0) + modelIndex = 0; + modelIndex = modelIndex / columns * columns; + visibleIndex = modelIndex; + colPos = colPosAt(visibleIndex); + rowPos = rowPosAt(visibleIndex); + } + int colNum = colPos / colSize(); FxGridItem *item = 0; diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index cb751f6..7c01293 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -744,6 +744,28 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer) if (visibleItems.at(i)->index != -1) modelIndex = visibleItems.at(i)->index + 1; } + + if (visibleItems.count() && (fillFrom > itemEnd+averageSize+spacing + || fillTo < visiblePos - averageSize - spacing)) { + // We've jumped more than a page. Estimate which items are now + // visible and fill from there. + int count = (fillFrom - itemEnd) / (averageSize + spacing); + for (int i = 0; i < visibleItems.count(); ++i) + releaseItem(visibleItems.at(i)); + visibleItems.clear(); + modelIndex += count; + if (modelIndex >= model->count()) { + count -= modelIndex - model->count() + 1; + modelIndex = model->count() - 1; + } else if (modelIndex < 0) { + count -= modelIndex; + modelIndex = 0; + } + visibleIndex = modelIndex; + visiblePos = itemEnd + count * (averageSize + spacing) + 1; + itemEnd = visiblePos-1; + } + bool changed = false; FxListItem *item = 0; qreal pos = itemEnd + 1; diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index c183934..c8e7817 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -97,6 +97,7 @@ private slots: void onRemove_data(); void testQtQuick11Attributes(); void testQtQuick11Attributes_data(); + void contentPosJump(); private: QDeclarativeView *createView(); @@ -2077,6 +2078,56 @@ void tst_QDeclarativeGridView::testQtQuick11Attributes_data() << ""; } +void tst_QDeclarativeGridView::contentPosJump() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 100; i++) + model.addItem("Item" + QString::number(i), ""); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + ctxt->setContextProperty("testRightToLeft", QVariant(false)); + ctxt->setContextProperty("testTopToBottom", QVariant(false)); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview1.qml")); + qApp->processEvents(); + + QDeclarativeGridView *gridview = findItem(canvas->rootObject(), "grid"); + QVERIFY(gridview != 0); + + QDeclarativeItem *contentItem = gridview->contentItem(); + QVERIFY(contentItem != 0); + + // Test jumping more than a page of items. + gridview->setContentY(500); + + // Confirm items positioned correctly + int itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 24; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QVERIFY(item); + QVERIFY(item->x() == (i%3)*80); + QVERIFY(item->y() == (i/3)*60); + } + + gridview->setContentY(-100); + itemCount = findItems(contentItem, "wrapper").count(); + QVERIFY(itemCount < 15); + // Confirm items positioned correctly + for (int i = 0; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QVERIFY(item); + QVERIFY(item->x() == (i%3)*80); + QVERIFY(item->y() == (i/3)*60); + } + + delete canvas; +} + QDeclarativeView *tst_QDeclarativeGridView::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index ec60e8a..0c96587 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -120,6 +120,7 @@ private slots: void rightToLeft(); void test_mirroring(); void orientationChange(); + void contentPosJump(); private: template void items(); @@ -2630,6 +2631,61 @@ void tst_QDeclarativeListView::orientationChange() delete canvas; } +void tst_QDeclarativeListView::contentPosJump() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 50; i++) + model.addItem("Item" + QString::number(i), ""); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listviewtest.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = findItem(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + // Confirm items positioned correctly + int itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 0; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_VERIFY(item->y() == i*20); + } + + // Test jumping more than a page of items. + listview->setContentY(500); + itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 25; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_VERIFY(item->y() == i*20); + } + + listview->setContentY(-100); + itemCount = findItems(contentItem, "wrapper").count(); + QVERIFY(itemCount < 20); + for (int i = 0; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_VERIFY(item->y() == i*20); + } + + delete canvas; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From f6505f9f2eb4c594d3a249655879117e2a136468 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 14 Apr 2011 11:06:39 +1000 Subject: Add pincharea.qmlproject file for PinchArea example. Change-Id: I9d3129be4d03904805e53489c1117104e08ce860 --- .../touchinteraction/pincharea/pincharea.qmlproject | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/declarative/touchinteraction/pincharea/pincharea.qmlproject diff --git a/examples/declarative/touchinteraction/pincharea/pincharea.qmlproject b/examples/declarative/touchinteraction/pincharea/pincharea.qmlproject new file mode 100644 index 0000000..e526217 --- /dev/null +++ b/examples/declarative/touchinteraction/pincharea/pincharea.qmlproject @@ -0,0 +1,18 @@ +/* File generated by QtCreator */ + +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} -- cgit v0.12 From 013aa31cea9f82b53b988d910c42c5590b32c1cc Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 14 Apr 2011 13:03:31 +1000 Subject: Fix uninitialized variable. Change-Id: Ieebfc72cf9b31c9d2522487ed7cd860f060ef0be Task-number: QTBUG-15877 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 21bfc59..af2b804 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2250,7 +2250,7 @@ qreal QDeclarativeGridView::maxXExtent() const qreal extent; qreal highlightStart; qreal highlightEnd; - qreal lastItemPosition; + qreal lastItemPosition = 0; if (d->isRightToLeftTopToBottom()){ highlightStart = d->highlightRangeStartValid ? d->highlightRangeEnd : d->size(); highlightEnd = d->highlightRangeEndValid ? d->highlightRangeStart : d->size(); -- cgit v0.12 From eac733e658422af2ceefea294023d89fc6512143 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 14 Apr 2011 14:54:35 +1000 Subject: Fix so concurrent jobs produce the correct model results Concurrent jobs sometimes modified another job's results as results were stored in member variables and modified without locks. This change removes the use of member variables for the current job, and uses QAtomicInt for the incremented job ids. (Regression from 4df66da8f9e5a9f3c981c6c60254899146dd1cc0) Task-number: QTBUG-18266 Change-Id: Ia6783e9d17603e0ff5ccd40d8cc992bdc2d3f0e9 Reviewed-by: Charles Yin --- src/declarative/util/qdeclarativexmllistmodel.cpp | 67 ++++++++++------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index c79baa4..a61ac06 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -144,6 +144,7 @@ struct XmlQueryJob QList roleQueryErrorId; // the ptr to send back if there is an error QStringList keyRoleQueries; QStringList keyRoleResultsCache; + QString prefix; }; class QDeclarativeXmlQuery : public QObject @@ -172,6 +173,12 @@ public: } int doQuery(QString query, QString namespaces, QByteArray data, QList* roleObjects, QStringList keyRoleResultsCache) { + { + QMutexLocker m1(&m_mutex); + m_queryIds.ref(); + if (m_queryIds <= 0) + m_queryIds = 1; + } XmlQueryJob job; job.queryId = m_queryIds; @@ -194,9 +201,6 @@ public: { QMutexLocker ml(&m_mutex); m_jobs.insert(m_queryIds, job); - m_queryIds++; - if (m_queryIds <= 0) - m_queryIds = 1; } QMetaObject::invokeMethod(this, "processQuery", Qt::QueuedConnection, Q_ARG(int, job.queryId)); @@ -214,20 +218,15 @@ private slots: job = m_jobs.value(queryId); } - QDeclarativeXmlQueryResult r; - doQueryJob(&job); - doSubQueryJob(&job); - r.queryId = job.queryId; - r.size = m_size; - r.data = m_modelData; - r.inserted = m_insertedItemRanges; - r.removed = m_removedItemRanges; - r.keyRoleResultsCache = job.keyRoleResultsCache; + QDeclarativeXmlQueryResult result; + result.queryId = job.queryId; + doQueryJob(&job, &result); + doSubQueryJob(&job, &result); { QMutexLocker ml(&m_mutex); if (m_jobs.contains(queryId)) { - emit queryCompleted(r); + emit queryCompleted(result); m_jobs.remove(queryId); } } @@ -241,8 +240,8 @@ protected: private: - void doQueryJob(XmlQueryJob* job); - void doSubQueryJob(XmlQueryJob* job); + void doQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); + void doSubQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); void getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const; void addIndexToRangeList(QList *ranges, int index) const; @@ -250,17 +249,12 @@ private: QMutex m_mutex; QThread m_thread; QMap m_jobs; - int m_queryIds; - QString m_prefix; - int m_size; - QList > m_modelData; - QList m_insertedItemRanges; - QList m_removedItemRanges; + QAtomicInt m_queryIds; }; Q_GLOBAL_STATIC(QDeclarativeXmlQuery, globalXmlQuery) -void QDeclarativeXmlQuery::doQueryJob(XmlQueryJob* currentJob) +void QDeclarativeXmlQuery::doQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); @@ -295,10 +289,8 @@ void QDeclarativeXmlQuery::doQueryJob(XmlQueryJob* currentJob) } currentJob->data = xml; - m_prefix = namespaces + prefix + QLatin1Char('/'); - m_size = 0; - if (count > 0) - m_size = count; + currentJob->prefix = namespaces + prefix + QLatin1Char('/'); + currentResult->size = (count > 0 ? count : 0); } void QDeclarativeXmlQuery::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const @@ -306,9 +298,9 @@ void QDeclarativeXmlQuery::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QS const QStringList &keysQueries = currentJob.keyRoleQueries; QString keysQuery; if (keysQueries.count() == 1) - keysQuery = m_prefix + keysQueries[0]; + keysQuery = currentJob.prefix + keysQueries[0]; else if (keysQueries.count() > 1) - keysQuery = m_prefix + QLatin1String("concat(") + keysQueries.join(QLatin1String(",")) + QLatin1String(")"); + keysQuery = currentJob.prefix + QLatin1String("concat(") + keysQueries.join(QLatin1String(",")) + QLatin1String(")"); if (!keysQuery.isEmpty()) { query->setQuery(keysQuery); @@ -331,10 +323,9 @@ void QDeclarativeXmlQuery::addIndexToRangeList(QList * ranges->append(qMakePair(index, 1)); } -void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob* currentJob) +void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); - m_modelData.clear(); QBuffer b(¤tJob->data); b.open(QIODevice::ReadOnly); @@ -347,16 +338,14 @@ void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob* currentJob) // See if any values of key roles have been inserted or removed. - m_insertedItemRanges.clear(); - m_removedItemRanges.clear(); if (currentJob->keyRoleResultsCache.isEmpty()) { - m_insertedItemRanges << qMakePair(0, m_size); + currentResult->inserted << qMakePair(0, currentResult->size); } else { if (keyRoleResults != currentJob->keyRoleResultsCache) { QStringList temp; for (int i=0; ikeyRoleResultsCache.count(); i++) { if (!keyRoleResults.contains(currentJob->keyRoleResultsCache[i])) - addIndexToRangeList(&m_removedItemRanges, i); + addIndexToRangeList(¤tResult->removed, i); else temp << currentJob->keyRoleResultsCache[i]; } @@ -364,12 +353,12 @@ void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob* currentJob) for (int i=0; iinserted, i); } } } } - currentJob->keyRoleResultsCache = keyRoleResults; + currentResult->keyRoleResultsCache = keyRoleResults; // Get the new values for each role. //### we might be able to condense even further (query for everything in one go) @@ -377,7 +366,7 @@ void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob* currentJob) for (int i = 0; i < queries.size(); ++i) { QList resultList; if (!queries[i].isEmpty()) { - subquery.setQuery(m_prefix + QLatin1String("(let $v := string(") + queries[i] + QLatin1String(") return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); + subquery.setQuery(currentJob->prefix + QLatin1String("(let $v := string(") + queries[i] + QLatin1String(") return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); if (subquery.isValid()) { QXmlResultItems resultItems; subquery.evaluateTo(&resultItems); @@ -391,9 +380,9 @@ void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob* currentJob) } } //### should warn here if things have gone wrong. - while (resultList.count() < m_size) + while (resultList.count() < currentResult->size) resultList << QVariant(); - m_modelData << resultList; + currentResult->data << resultList; b.seek(0); } -- cgit v0.12 From d176e39de8fcde92a92866e7b0db5904c90a1e82 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 14 Apr 2011 09:05:53 +0200 Subject: Do not use SetSurfaceTransparency() on raster. When raster graphics system is forced and the HW was capable enough, we still tried to use SetSurfaceTransparency() on the RWindow to enable semi-transparency, which is wrong as it only works for windows that have a separate surface. Reviewed-by: Jani Hautakangas --- src/gui/kernel/qapplication_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index f73eb02..6e70fc2 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1855,6 +1855,8 @@ void qt_init(QApplicationPrivate * /* priv */, int) } else { QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; } + if (QApplicationPrivate::graphics_system_name == QLatin1String("raster")) + QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; #else QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; #endif -- cgit v0.12 From a5898f33f215ff2ac333be61306a47ca162b2104 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 14 Apr 2011 09:13:42 +0200 Subject: Trigger fullscreen transition effects properly on app exit. Avkon calls BeginFullScreen() and EndFullScreen() to trigger the fullscreen system transition effects for application exit, however the calls are made too late for Qt apps because the widgets are already destroyed. Instead, the effects are triggered explicitly from Qt, before closing the widgets, or from aboutToQuit, whichever comes first. Task-number: QT-4718 Reviewed-by: Jani Hautakangas --- mkspecs/common/symbian/symbian.conf | 2 +- src/gui/kernel/qapplication.cpp | 17 ++++++++++++- src/gui/kernel/qapplication_s60.cpp | 7 +++-- src/gui/kernel/qt_s60_p.h | 51 +++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 4 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index f955e3c..8e04099 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -84,7 +84,7 @@ QMAKE_LIBS_OPENGL_ES2_QT = $$QMAKE_LIBS_OPENGL_ES2 $$QMAKE_LIBS_CFBSBITMAP -lcon QMAKE_LIBS_OPENVG = $$QMAKE_LIBS_CFBSBITMAP -llibOpenVG QMAKE_LIBS_THREAD = -llibpthread QMAKE_LIBS_COMPAT = -QMAKE_LIBS_S60 = -lavkon -leikcoctl +QMAKE_LIBS_S60 = -lavkon -leikcoctl -lgfxtrans exists($${EPOCROOT}epoc32/include/platform/sgresource/sgimage.h) { QMAKE_LIBS_OPENVG += -lsgresource diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 59aec91..f906bbf 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -128,6 +128,10 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp //#define ALIEN_DEBUG +#if defined(Q_OS_SYMBIAN) +#include "qt_s60_p.h" +#endif + static void initResources() { #if defined(Q_WS_WINCE) @@ -2432,6 +2436,11 @@ bool QApplication::event(QEvent *e) { Q_D(QApplication); if(e->type() == QEvent::Close) { +#if defined(Q_OS_SYMBIAN) + // In order to have proper application-exit effects on Symbian, certain + // native APIs have to be called _before_ closing/destroying the widgets. + bool effectStarted = qt_beginFullScreenEffect(); +#endif QCloseEvent *ce = static_cast(e); ce->accept(); closeAllWindows(); @@ -2445,8 +2454,14 @@ bool QApplication::event(QEvent *e) break; } } - if(ce->isAccepted()) + if (ce->isAccepted()) { return true; + } else { +#if defined(Q_OS_SYMBIAN) + if (effectStarted) + qt_abortFullScreenEffect(); +#endif + } } else if(e->type() == QEvent::LanguageChange) { #ifndef QT_NO_TRANSLATION setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6e70fc2..6620efd 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1828,9 +1828,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) systemFont.setFamily(systemFont.defaultFamily()); QApplicationPrivate::setSystemFont(systemFont); -#ifdef Q_SYMBIAN_TRANSITION_EFFECTS QObject::connect(qApp, SIGNAL(aboutToQuit()), qApp, SLOT(_q_aboutToQuit())); -#endif #ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE QApplicationPrivate::instance()->useTranslucentEGLSurfaces = true; @@ -1921,6 +1919,9 @@ void qt_cleanup() S60->setButtonGroupContainer(0); #endif + // Call EndFullScreen() to prevent confusing the system effect state machine. + qt_endFullScreenEffect(); + if (S60->qtOwnsS60Environment) { // Restore the S60 framework trap handler. See qt_init(). User::SetTrapHandler(S60->s60InstalledTrapHandler); @@ -2659,6 +2660,8 @@ void QApplication::restoreOverrideCursor() void QApplicationPrivate::_q_aboutToQuit() { + qt_beginFullScreenEffect(); + #ifdef Q_SYMBIAN_TRANSITION_EFFECTS // Send the shutdown tfx command S60->wsSession().SendEffectCommand(ETfxCmdAppShutDown); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index e24405c..da44016 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -77,6 +77,8 @@ #include // CAknContextPane #include // CEikStatusPane #include // MAknFadedComponent and TAknPopupFader +#include // BeginFullScreen +#include // BeginFullScreen #endif QT_BEGIN_NAMESPACE @@ -85,6 +87,9 @@ QT_BEGIN_NAMESPACE // system events seems to start with 0x10 const TInt KInternalStatusPaneChange = 0x50000000; +// For BeginFullScreen(). +const TUint KQtAppExitFlag = 0x400; + static const int qt_symbian_max_screens = 4; //this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2 @@ -193,6 +198,9 @@ public: int nativeScreenWidthInPixels; int nativeScreenHeightInPixels; + + int beginFullScreenCalled : 1; + int endFullScreenCalled : 1; }; Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data(); @@ -334,6 +342,8 @@ inline QS60Data::QS60Data() #ifdef Q_OS_SYMBIAN ,s60InstalledTrapHandler(0) #endif + ,beginFullScreenCalled(0), + endFullScreenCalled(0) { } @@ -565,6 +575,47 @@ void qt_symbian_set_cursor_visible(bool visible); bool qt_symbian_is_cursor_visible(); #endif +static inline bool qt_beginFullScreenEffect() +{ +#ifdef Q_WS_S60 + // Only for post-S^3. On earlier versions the system transition effects + // may not be able to capture the non-Avkon content, leading to confusing + // looking effects, so just skip the whole thing. + if (S60->beginFullScreenCalled || QSysInfo::s60Version() <= QSysInfo::SV_S60_5_2) + return false; + S60->beginFullScreenCalled = true; + // For Avkon apps the app-exit effect is triggered from CAknAppUi::PrepareToExit(). + // That is good for Avkon apps, but in case of Qt the RWindows are destroyed earlier. + // Therefore we call BeginFullScreen() ourselves. + GfxTransEffect::BeginFullScreen(AknTransEffect::EApplicationExit, + TRect(0, 0, 0, 0), + AknTransEffect::EParameterType, + AknTransEffect::GfxTransParam(S60->uid, + AknTransEffect::TParameter::EAvkonCheck | KQtAppExitFlag)); + return true; +#endif +} + +static inline void qt_abortFullScreenEffect() +{ +#ifdef Q_WS_S60 + if (!S60->beginFullScreenCalled || QSysInfo::s60Version() <= QSysInfo::SV_S60_5_2) + return; + GfxTransEffect::AbortFullScreen(); + S60->beginFullScreenCalled = S60->endFullScreenCalled = false; +#endif +} + +static inline void qt_endFullScreenEffect() +{ +#ifdef Q_WS_S60 + if (S60->endFullScreenCalled || QSysInfo::s60Version() <= QSysInfo::SV_S60_5_2) + return; + S60->endFullScreenCalled = true; + GfxTransEffect::EndFullScreen(); +#endif +} + QT_END_NAMESPACE #endif // QT_S60_P_H -- cgit v0.12 From c156280a637abd6acb3894723a9e21ba2abc8fb8 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 14 Apr 2011 12:01:01 +0300 Subject: Splitview: opening a context menu should not re-position of focusItem When splitview is open and user long taps an text input item, a context menu is opened. This leads to some drawing operations on splitview implementation, even though these should be skipped. The focusItem might even be re-positioned into incorrect position due to the failure. As a fix, check if the focusItem is already positioned correctly and avoid doing anything when it already is. Task-number: QTBUG-18738 Reviewed-by: Guoqing Zhang --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 8574f2c..b64ce0c 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -538,11 +538,11 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) if (alwaysResize) { windowToMove->setUpdatesEnabled(false); - if (!moveWithinVisibleArea) + if (!moveWithinVisibleArea) { m_splitViewResizeBy = widget->height(); - - windowTop = widget->geometry().top(); - widget->resize(widget->width(), splitViewRect.height() - windowTop); + windowTop = widget->geometry().top(); + widget->resize(widget->width(), splitViewRect.height() - windowTop); + } if (gv->scene()) { const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF(); -- cgit v0.12 From f4dedf1a4d7e530c715f99327da175cec67d66e4 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 14 Apr 2011 13:00:29 +0300 Subject: QGraphicsView with vertical scrollbar flickers when splitview opens Do windowstate change to fullscreen inside updateEnabled(false) - updateEnabled(true) guard block to avoid flickering of screen area, when keyboard opens in splitview. In worst case, screen is drawn three times: - resize the content area to fit into splitview - change windowstate to fullscreen - ensure visibility of the focusitem by scrolling the view Now, all these happen inside one "update". Task-number: QTBUG-18737 Reviewed-by: Guoqing Zhang --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index b64ce0c..e4b965b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -531,13 +531,15 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) // and greatly reduces event passing in orientation switch cases, // as the statuspane size is not changing. + if (alwaysResize) + windowToMove->setUpdatesEnabled(false); + if (!(windowToMove->windowState() & Qt::WindowFullScreen)) { windowToMove->setWindowState( (windowToMove->windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen)) | Qt::WindowFullScreen); } if (alwaysResize) { - windowToMove->setUpdatesEnabled(false); if (!moveWithinVisibleArea) { m_splitViewResizeBy = widget->height(); windowTop = widget->geometry().top(); @@ -548,11 +550,13 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF(); gv->ensureVisible(microFocusRect); } - windowToMove->setUpdatesEnabled(true); } else { translateInputWidget(); } + if (alwaysResize) + windowToMove->setUpdatesEnabled(true); + widget->setAttribute(Qt::WA_Resized, userResize); //not a user resize } -- cgit v0.12 From 8a37a69c961092aae7dd7f55f30a15b3fae1b7cc Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 14 Apr 2011 13:22:36 +0300 Subject: Splitview flag should also be updated to inputcontext Currently splitview support is defined in exported global private method. There is no guarantee that input context is created, or updated when the API is called. This is problematic, since the client need to find a correct place and time when to call the API. As a change, update existing input context when the API is called. Also, take into account the splitview flag when updating input context. This ensures that client can enforce the flag use correctly. Task-number: QTBUG-18715 Reviewed-by: Guoqing Zhang --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index e4b965b..c11d5e8 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -77,6 +77,15 @@ QT_BEGIN_NAMESPACE Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable) { S60->partial_keyboard = enable; + + QInputContext *ic = 0; + if (QApplication::focusWidget()) { + ic = QApplication::focusWidget()->inputContext(); + } else if (qApp && qApp->inputContext()) { + ic = qApp->inputContext(); + } + if (ic) + ic->update(); } QCoeFepInputContext::QCoeFepInputContext(QObject *parent) @@ -580,6 +589,19 @@ void QCoeFepInputContext::updateHints(bool mustUpdateInputCapabilities) QWidget *w = focusWidget(); if (w) { Qt::InputMethodHints hints = w->inputMethodHints(); + + // Since splitview support works like an input method hint, yet it is private flag, + // we need to update its state separately. + if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) { + TInt currentFlags = m_fepState->Flags(); + if (S60->partial_keyboard) + currentFlags |= QT_EAknEditorFlagEnablePartialScreen; + else + currentFlags &= ~QT_EAknEditorFlagEnablePartialScreen; + if (currentFlags != m_fepState->Flags()) + m_fepState->SetFlags(currentFlags); + } + if (hints != m_lastImHints) { m_lastImHints = hints; applyHints(hints); -- cgit v0.12 From ddd633f2f4234aae353cd0239974a3a997abc71e Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 14 Apr 2011 14:08:23 +0200 Subject: QDeclarativeDebug: Don't crash when connection is closed Protocol might still be in the process of processing messages when disconnect() is called (e.g. due to an invalid package). Therefore delay it's deletion until the next event loop runs. Reviewed-by: Christiaan Janssen Task-number: QTBUG-18771 --- src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp index 69c1ef5..7db0db3 100644 --- a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp @@ -97,7 +97,8 @@ void QTcpServerConnection::send(const QByteArray &message) { Q_D(QTcpServerConnection); - if (!isConnected()) + if (!isConnected() + || !d->protocol || !d->socket) return; QPacket pack; @@ -111,9 +112,10 @@ void QTcpServerConnection::disconnect() { Q_D(QTcpServerConnection); - delete d->protocol; + // protocol might still be processing packages at this point + d->protocol->deleteLater(); d->protocol = 0; - delete d->socket; + d->socket->deleteLater(); d->socket = 0; } @@ -143,6 +145,9 @@ void QTcpServerConnection::listen() void QTcpServerConnection::readyRead() { Q_D(QTcpServerConnection); + if (!d->protocol) + return; + QPacket packet = d->protocol->read(); QByteArray content = packet.data(); -- cgit v0.12 From 9ed28d039da0f3745ca84203efa92203f31e97e7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 30 Mar 2011 14:52:21 +0200 Subject: QmlDebug: Rename 'tcpserver' library to 'qmldbg_tcp' Make the name less ambiguous, especially on Symbian were all .dlls end up in sys\bin. Reviewed-by: Pawel Polanski --- src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro | 18 +++ .../qmltooling/qmldbg_tcp/qtcpserverconnection.cpp | 178 +++++++++++++++++++++ .../qmltooling/qmldbg_tcp/qtcpserverconnection.h | 84 ++++++++++ src/plugins/qmltooling/qmltooling.pro | 3 +- .../qmltooling/tcpserver/qtcpserverconnection.cpp | 178 --------------------- .../qmltooling/tcpserver/qtcpserverconnection.h | 84 ---------- src/plugins/qmltooling/tcpserver/tcpserver.pro | 18 --- tools/qml/qml.pro | 2 +- 8 files changed, 282 insertions(+), 283 deletions(-) create mode 100644 src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro create mode 100644 src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp create mode 100644 src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h delete mode 100644 src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp delete mode 100644 src/plugins/qmltooling/tcpserver/qtcpserverconnection.h delete mode 100644 src/plugins/qmltooling/tcpserver/tcpserver.pro diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro new file mode 100644 index 0000000..e8ab962 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro @@ -0,0 +1,18 @@ +TARGET = qmldbg_tcp +QT += declarative network + +include(../../qpluginbase.pri) + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling +QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" + +SOURCES += \ + qtcpserverconnection.cpp + +HEADERS += \ + qtcpserverconnection.h + +target.path += $$[QT_INSTALL_PLUGINS]/qmltooling +INSTALLS += target + +symbian:TARGET.UID3=0x20031E90 diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp new file mode 100644 index 0000000..7db0db3 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -0,0 +1,178 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qtcpserverconnection.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QTcpServerConnectionPrivate { +public: + QTcpServerConnectionPrivate(); + + int port; + QTcpSocket *socket; + QPacketProtocol *protocol; + QTcpServer *tcpServer; + + QDeclarativeDebugServer *debugServer; +}; + +QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : + port(0), + socket(0), + protocol(0), + tcpServer(0), + debugServer(0) +{ +} + +QTcpServerConnection::QTcpServerConnection() : + d_ptr(new QTcpServerConnectionPrivate) +{ + +} + +QTcpServerConnection::~QTcpServerConnection() +{ + delete d_ptr; +} + +void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) +{ + Q_D(QTcpServerConnection); + d->debugServer = server; +} + +bool QTcpServerConnection::isConnected() const +{ + Q_D(const QTcpServerConnection); + return d->socket && d->socket->state() == QTcpSocket::ConnectedState; +} + +void QTcpServerConnection::send(const QByteArray &message) +{ + Q_D(QTcpServerConnection); + + if (!isConnected() + || !d->protocol || !d->socket) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + d->socket->flush(); +} + +void QTcpServerConnection::disconnect() +{ + Q_D(QTcpServerConnection); + + // protocol might still be processing packages at this point + d->protocol->deleteLater(); + d->protocol = 0; + d->socket->deleteLater(); + d->socket = 0; +} + +void QTcpServerConnection::setPort(int port, bool block) +{ + Q_D(QTcpServerConnection); + d->port = port; + + listen(); + if (block) + d->tcpServer->waitForNewConnection(-1); +} + +void QTcpServerConnection::listen() +{ + Q_D(QTcpServerConnection); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + + +void QTcpServerConnection::readyRead() +{ + Q_D(QTcpServerConnection); + if (!d->protocol) + return; + + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +void QTcpServerConnection::newConnection() +{ + Q_D(QTcpServerConnection); + + if (d->socket) { + qWarning("QDeclarativeDebugServer: Another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->socket = d->tcpServer->nextPendingConnection(); + d->socket->setParent(this); + d->protocol = new QPacketProtocol(d->socket, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + + +Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) + +QT_END_NAMESPACE + diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h new file mode 100644 index 0000000..a6e17e6 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTCPSERVERCONNECTION_H +#define QTCPSERVERCONNECTION_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServer; +class QTcpServerConnectionPrivate; +class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QTcpServerConnection) + Q_DISABLE_COPY(QTcpServerConnection) + Q_INTERFACES(QDeclarativeDebugServerConnection) + + +public: + QTcpServerConnection(); + ~QTcpServerConnection(); + + void setServer(QDeclarativeDebugServer *server); + void setPort(int port, bool bock); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + + void listen(); + void waitForConnection(); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + QTcpServerConnectionPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QTCPSERVERCONNECTION_H diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index 01cf1a9..2442dc0 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -1,4 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = tcpserver - +SUBDIRS = qmldbg_tcp diff --git a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp deleted file mode 100644 index 7db0db3..0000000 --- a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtcpserverconnection.h" - -#include -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -class QTcpServerConnectionPrivate { -public: - QTcpServerConnectionPrivate(); - - int port; - QTcpSocket *socket; - QPacketProtocol *protocol; - QTcpServer *tcpServer; - - QDeclarativeDebugServer *debugServer; -}; - -QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : - port(0), - socket(0), - protocol(0), - tcpServer(0), - debugServer(0) -{ -} - -QTcpServerConnection::QTcpServerConnection() : - d_ptr(new QTcpServerConnectionPrivate) -{ - -} - -QTcpServerConnection::~QTcpServerConnection() -{ - delete d_ptr; -} - -void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) -{ - Q_D(QTcpServerConnection); - d->debugServer = server; -} - -bool QTcpServerConnection::isConnected() const -{ - Q_D(const QTcpServerConnection); - return d->socket && d->socket->state() == QTcpSocket::ConnectedState; -} - -void QTcpServerConnection::send(const QByteArray &message) -{ - Q_D(QTcpServerConnection); - - if (!isConnected() - || !d->protocol || !d->socket) - return; - - QPacket pack; - pack.writeRawData(message.data(), message.length()); - - d->protocol->send(pack); - d->socket->flush(); -} - -void QTcpServerConnection::disconnect() -{ - Q_D(QTcpServerConnection); - - // protocol might still be processing packages at this point - d->protocol->deleteLater(); - d->protocol = 0; - d->socket->deleteLater(); - d->socket = 0; -} - -void QTcpServerConnection::setPort(int port, bool block) -{ - Q_D(QTcpServerConnection); - d->port = port; - - listen(); - if (block) - d->tcpServer->waitForNewConnection(-1); -} - -void QTcpServerConnection::listen() -{ - Q_D(QTcpServerConnection); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - - -void QTcpServerConnection::readyRead() -{ - Q_D(QTcpServerConnection); - if (!d->protocol) - return; - - QPacket packet = d->protocol->read(); - - QByteArray content = packet.data(); - d->debugServer->receiveMessage(content); -} - -void QTcpServerConnection::newConnection() -{ - Q_D(QTcpServerConnection); - - if (d->socket) { - qWarning("QDeclarativeDebugServer: Another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; - } - - d->socket = d->tcpServer->nextPendingConnection(); - d->socket->setParent(this); - d->protocol = new QPacketProtocol(d->socket, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); -} - - -Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) - -QT_END_NAMESPACE - diff --git a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.h b/src/plugins/qmltooling/tcpserver/qtcpserverconnection.h deleted file mode 100644 index a6e17e6..0000000 --- a/src/plugins/qmltooling/tcpserver/qtcpserverconnection.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTCPSERVERCONNECTION_H -#define QTCPSERVERCONNECTION_H - -#include -#include - -QT_BEGIN_NAMESPACE - -class QDeclarativeDebugServer; -class QTcpServerConnectionPrivate; -class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QTcpServerConnection) - Q_DISABLE_COPY(QTcpServerConnection) - Q_INTERFACES(QDeclarativeDebugServerConnection) - - -public: - QTcpServerConnection(); - ~QTcpServerConnection(); - - void setServer(QDeclarativeDebugServer *server); - void setPort(int port, bool bock); - - bool isConnected() const; - void send(const QByteArray &message); - void disconnect(); - - void listen(); - void waitForConnection(); - -private Q_SLOTS: - void readyRead(); - void newConnection(); - -private: - QTcpServerConnectionPrivate *d_ptr; -}; - -QT_END_NAMESPACE - -#endif // QTCPSERVERCONNECTION_H diff --git a/src/plugins/qmltooling/tcpserver/tcpserver.pro b/src/plugins/qmltooling/tcpserver/tcpserver.pro deleted file mode 100644 index f4f2666..0000000 --- a/src/plugins/qmltooling/tcpserver/tcpserver.pro +++ /dev/null @@ -1,18 +0,0 @@ -TARGET = tcpserver -QT += declarative network - -include(../../qpluginbase.pri) - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling -QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" - -SOURCES += \ - qtcpserverconnection.cpp - -HEADERS += \ - qtcpserverconnection.h - -target.path += $$[QT_INSTALL_PLUGINS]/qmltooling -INSTALLS += target - -symbian:TARGET.UID3=0x20031E90 \ No newline at end of file diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index b1d56ea..bdc4b10 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -39,7 +39,7 @@ symbian { TARGET.CAPABILITY = NetworkServices ReadUserData # Deploy plugin for remote debugging - qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/tcpserver$${QT_LIBINFIX}.dll + qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/qmldbgtcp$${QT_LIBINFIX}.dll qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmltooling DEPLOYMENT += qmldebuggingplugin } -- cgit v0.12 From ead56475cc6ecd7a6e7e17d63f0e22cf930bcae4 Mon Sep 17 00:00:00 2001 From: Tom Sutcliffe Date: Wed, 23 Mar 2011 16:53:48 +0000 Subject: Adding plugin qmltooling/qmlostplugin for QML debugging over OST (USB) on Symbian. Task-number: QTBUG-18764 Reviewed-by: kkoehne --- .../debugger/qdeclarativedebugserver.cpp | 18 +- src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro | 21 +++ src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp | 143 +++++++++++++++ src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h | 81 +++++++++ src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp | 180 +++++++++++++++++++ src/plugins/qmltooling/qmldbg_ost/qostdevice.h | 75 ++++++++ src/plugins/qmltooling/qmldbg_ost/usbostcomm.h | 191 +++++++++++++++++++++ src/plugins/qmltooling/qmltooling.pro | 1 + tools/qml/qml.pro | 2 +- 9 files changed, 706 insertions(+), 6 deletions(-) create mode 100644 src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro create mode 100644 src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp create mode 100644 src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h create mode 100644 src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp create mode 100644 src/plugins/qmltooling/qmldbg_ost/qostdevice.h create mode 100644 src/plugins/qmltooling/qmldbg_ost/usbostcomm.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 14e7187..18258f5 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -91,7 +91,7 @@ public: QStringList clientPlugins; bool gotHello; - static QDeclarativeDebugServerConnection *loadConnectionPlugin(); + static QDeclarativeDebugServerConnection *loadConnectionPlugin(const QString &pluginName); }; QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : @@ -113,7 +113,8 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() connection->send(message); } -QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin() +QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin( + const QString &pluginName) { QStringList pluginCandidates; const QStringList paths = QCoreApplication::libraryPaths(); @@ -122,7 +123,8 @@ QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectio if (dir.exists()) { QStringList plugins(dir.entryList(QDir::Files)); foreach (const QString &pluginPath, plugins) { - pluginCandidates << dir.absoluteFilePath(pluginPath); + if (QFileInfo(pluginPath).fileName().contains(pluginName)) + pluginCandidates << dir.absoluteFilePath(pluginPath); } } } @@ -166,7 +168,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() bool block = false; bool ok = false; - // format: qmljsdebugger=port:3768[,block] + // format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block] if (!appD->qmljsDebugArgumentsString().isEmpty()) { if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { const QString message = @@ -177,17 +179,23 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() return 0; } + QString pluginName; if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); + pluginName = QLatin1String("qmldbg_tcp"); + } else if (appD->qmljsDebugArgumentsString().contains("ost")) { + pluginName = QLatin1String("qmldbg_ost"); + ok = true; } + block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); if (ok) { server = new QDeclarativeDebugServer(); QDeclarativeDebugServerConnection *connection - = QDeclarativeDebugServerPrivate::loadConnectionPlugin(); + = QDeclarativeDebugServerPrivate::loadConnectionPlugin(pluginName); if (connection) { server->d_func()->connection = connection; diff --git a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro new file mode 100644 index 0000000..2748889 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro @@ -0,0 +1,21 @@ +TARGET = qmldbg_ost +QT += declarative network + +include(../../qpluginbase.pri) + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling +QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" + +SOURCES += \ + qmlostplugin.cpp \ + qostdevice.cpp + +HEADERS += \ + qmlostplugin.h \ + qostdevice.h \ + usbostcomm.h + +target.path += $$[QT_INSTALL_PLUGINS]/qmltooling +INSTALLS += target + +symbian:TARGET.UID3=0x20031E92 diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp new file mode 100644 index 0000000..e0d7664 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmlostplugin.h" +#include "qostdevice.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +static const TInt KQmlOstProtocolId = 0x94; + +class QmlOstPluginPrivate { +public: + QmlOstPluginPrivate(); + + QOstDevice *ost; + QPacketProtocol *protocol; + QDeclarativeDebugServer *debugServer; +}; + +QmlOstPluginPrivate::QmlOstPluginPrivate() : + ost(0), + protocol(0), + debugServer(0) +{ +} + +QmlOstPlugin::QmlOstPlugin() : + d_ptr(new QmlOstPluginPrivate) +{ +} + +QmlOstPlugin::~QmlOstPlugin() +{ + delete d_ptr; +} + +void QmlOstPlugin::setServer(QDeclarativeDebugServer *server) +{ + Q_D(QmlOstPlugin); + d->debugServer = server; +} + +bool QmlOstPlugin::isConnected() const +{ + Q_D(const QmlOstPlugin); + return d->ost && d->ost->isOpen(); +} + +void QmlOstPlugin::send(const QByteArray &message) +{ + Q_D(QmlOstPlugin); + + if (!isConnected()) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + //d->socket->flush(); +} + +void QmlOstPlugin::disconnect() +{ + Q_D(QmlOstPlugin); + + delete d->protocol; + d->protocol = 0; +} + +void QmlOstPlugin::setPort(int port, bool block) +{ + Q_UNUSED(port); + Q_UNUSED(block); + + Q_D(QmlOstPlugin); + + d->ost = new QOstDevice(this); + bool ok = d->ost->open(KQmlOstProtocolId); + if (!ok) { + if (d->ost->errorString().length()) + qDebug("Error from QOstDevice: %s", qPrintable(d->ost->errorString())); + qWarning("QDeclarativeDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! + return; + } + d->protocol = new QPacketProtocol(d->ost, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + qWarning("QDeclarativeDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! +} + +void QmlOstPlugin::readyRead() +{ + Q_D(QmlOstPlugin); + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +Q_EXPORT_PLUGIN2(qmlostplugin, QmlOstPlugin) + +QT_END_NAMESPACE diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h new file mode 100644 index 0000000..1e18444 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLOSTPLUGIN_H +#define QMLOSTPLUGIN_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServer; +class QmlOstPluginPrivate; + +class QmlOstPlugin : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QmlOstPlugin) + Q_DISABLE_COPY(QmlOstPlugin) + Q_INTERFACES(QDeclarativeDebugServerConnection) + + +public: + QmlOstPlugin(); + ~QmlOstPlugin(); + + void setServer(QDeclarativeDebugServer *server); + void setPort(int port, bool bock); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + +private Q_SLOTS: + void readyRead(); + +private: + QmlOstPluginPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QMLOSTPLUGIN_H diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp new file mode 100644 index 0000000..3c5515f --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp @@ -0,0 +1,180 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qostdevice.h" +#include + +#include "usbostcomm.h" + +class QOstDevicePrivate : public CActive +{ + QOstDevice* q_ptr; + Q_DECLARE_PUBLIC(QOstDevice) + +public: + QOstDevicePrivate() : CActive(CActive::EPriorityStandard) { + CActiveScheduler::Add(this); + } + ~QOstDevicePrivate() { + Cancel(); + } + +private: + void RunL(); + void DoCancel(); + +private: + RUsbOstComm ost; + TBuf8<4096> readBuf; + QByteArray dataBuf; +}; + +QOstDevice::QOstDevice(QObject *parent) : + QIODevice(parent), d_ptr(new QOstDevicePrivate) +{ + d_ptr->q_ptr = this; +} + +QOstDevice::~QOstDevice() +{ + close(); + delete d_ptr; +} + +bool QOstDevice::open(int ostProtocolId) +{ + if (isOpen()) + return false; + + Q_D(QOstDevice); + TInt err = d->ost.Connect(); + if (!err) err = d->ost.Open(); + const TVersion KRequiredVersion(1,1,0); + TVersion version = d->ost.Version(); + if (version.iMajor < KRequiredVersion.iMajor || + (version.iMajor == KRequiredVersion.iMajor && version.iMinor < KRequiredVersion.iMinor)) { + setErrorString("CODA version too old. At least version 4.0.18 (without TRK) is required."); + return false; + } + + if (!err) err = d->ost.RegisterProtocolID((TOstProtIds)ostProtocolId, EFalse); + if (!err) { + d->ost.ReadMessage(d->iStatus, d->readBuf); + d->SetActive(); + return QIODevice::open(ReadWrite | Unbuffered); + } + return false; +} + +void QOstDevicePrivate::RunL() +{ + Q_Q(QOstDevice); + //qDebug("QOstDevice received %d bytes q=%x", readBuf.Size(), q); + if (iStatus == KErrNone) { + QByteArray data = QByteArray::fromRawData((const char*)readBuf.Ptr(), readBuf.Size()); + dataBuf.append(data); + + readBuf.Zero(); + ost.ReadMessage(iStatus, readBuf); + SetActive(); + + emit q->readyRead(); + } else { + q->setErrorString(QString("Error %1 from RUsbOstComm::ReadMessage()").arg(iStatus.Int())); + } + //qDebug("-QOstDevicePrivate RunL"); +} + +void QOstDevicePrivate::DoCancel() +{ + ost.ReadCancel(); +} + +void QOstDevice::close() +{ + Q_D(QOstDevice); + QIODevice::close(); + d->Cancel(); + // RDbgTrcComm::Close isn't safe to call when not open, sigh + if (d->ost.Handle()) { + d->ost.Close(); + } +} + +qint64 QOstDevice::readData(char *data, qint64 maxSize) +{ + Q_D(QOstDevice); + if (d->dataBuf.length() == 0 && !d->IsActive()) + return -1; + qint64 available = qMin(maxSize, (qint64)d->dataBuf.length()); + memcpy(data, d->dataBuf.constData(), available); + d->dataBuf.remove(0, available); + return available; +} + +static const TInt KMaxOstPacketLen = 4096; + +qint64 QOstDevice::writeData(const char *data, qint64 maxSize) +{ + Q_D(QOstDevice); + TPtrC8 ptr((const TUint8*)data, (TInt)maxSize); + while (ptr.Length()) { + TPtrC8 fragment = ptr.Left(qMin(ptr.Length(), KMaxOstPacketLen)); + //qDebug("QOstDevice writing %d bytes", fragment.Length()); + TRequestStatus stat; + d->ost.WriteMessage(stat, fragment); + User::WaitForRequest(stat); + if (stat.Int() != KErrNone) { + setErrorString(QString("Error %1 from RUsbOstComm::WriteMessage()").arg(stat.Int())); + return -1; + } + ptr.Set(ptr.Mid(fragment.Length())); + } + emit bytesWritten(maxSize); //TODO does it matter this is emitted synchronously? + //qDebug("QOstDevice wrote %d bytes", ptr.Size()); + return maxSize; +} + +qint64 QOstDevice::bytesAvailable() const +{ + Q_D(const QOstDevice); + return d->dataBuf.length(); +} diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h new file mode 100644 index 0000000..26bdc15 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QOSTDEVICE_H +#define QOSTDEVICE_H + +#include + +QT_BEGIN_NAMESPACE + +class QOstDevicePrivate; + +class QOstDevice : public QIODevice +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QOstDevice) + Q_DISABLE_COPY(QOstDevice) + +public: + explicit QOstDevice(QObject *parent=0); + ~QOstDevice(); + + bool open(int ostProtocolId); + void close(); + +protected: + qint64 readData(char *data, qint64 maxSize); + qint64 writeData(const char *data, qint64 maxSize); + qint64 bytesAvailable() const; + +private: + QOstDevicePrivate* d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QOSTDEVICE_H diff --git a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h new file mode 100644 index 0000000..5f29e71 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h @@ -0,0 +1,191 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef USBHOSTCOMM_H +#define USBHOSTCOMM_H + +// Based on the official usbostrouter header, modified to remove dependancy on +// the client DLL + +#include + +typedef int TOstProtIds; + +class RUsbOstComm : public RSessionBase +{ +public: + RUsbOstComm(); + TInt Connect(); + TInt Disconnect(); + TInt Open(); + TInt Close(); + TInt RegisterProtocolID(TOstProtIds aId, TBool aNeedHeader); + void ReadMessage(TRequestStatus& aStatus, TDes8& aDes); + TInt ReadCancel(); + void WriteMessage(TRequestStatus& aStatus, const TDesC8& aDes, TBool aHasHeader=EFalse); + TVersion Version() const; + +private: + enum TUsbOstCmdCode + { + EUsbOstCmdCodeFirst, + EUsbOstCmdConnect, + EUsbOstCmdDisconnect, + EUsbOstCmdCodeGetAcmConfig, + EUsbOstCmdCodeSetAcmConfig, + EUsbOstCmdCodeOpen, + EUsbOstCmdCodeClose, + EUsbOstCmdCodeRegisterId, + EUsbOstCmdCodeRegisterIds, + EUsbOstCmdCodeUnRegisterId, + EUsbOstCmdCodeUnRegisterIds, + EUsbOstCmdCodeReadMsg, + EUsbOstCmdCodeReadCancel, + EUsbOstCmdCodeWriteMsg, + EUsbOstCmdCodeWriteCancel, + EUsbOstCmdCodeLast + }; +}; + +RUsbOstComm::RUsbOstComm() +{ +} + +TInt RUsbOstComm::Connect() +{ + _LIT(KUsbOstServerName, "!UsbOstRouter"); + _LIT(KUsbOstServerImageName, "usbostrouter"); + const TUid KUsbOstServerUid = { 0x200170BE }; + TInt startupAttempts = 2; + for(;;) { + TInt ret = CreateSession(KUsbOstServerName, TVersion(1,0,0)); + if (ret != KErrNotFound && ret != KErrServerTerminated) { + return ret; + } + + if (startupAttempts-- == 0) { + return ret; + } + + RProcess server; + ret = server.Create(KUsbOstServerImageName, KNullDesC, KUsbOstServerUid); + if (ret != KErrNone) + return ret; + + TRequestStatus serverDiedRequestStatus; + server.Rendezvous(serverDiedRequestStatus); + + if (serverDiedRequestStatus != KRequestPending) { + // Abort startup + server.Kill(KErrNone); + } else { + // Logon OK - start the server + server.Resume(); + } + User::WaitForRequest(serverDiedRequestStatus); + ret = (server.ExitType() == EExitPanic) ? KErrGeneral : serverDiedRequestStatus.Int(); + server.Close(); + + if (ret != KErrNone && ret != KErrAlreadyExists) { + return ret; + } + } +} + +TInt RUsbOstComm::Disconnect() +{ + return SendReceive(EUsbOstCmdDisconnect); +} + +TInt RUsbOstComm::Open() +{ + return SendReceive(EUsbOstCmdCodeOpen); +} + +TInt RUsbOstComm::Close() +{ + TInt err = SendReceive(EUsbOstCmdCodeClose); + RHandleBase::Close(); + return err; +} + +TInt RUsbOstComm::RegisterProtocolID(const TOstProtIds aId, TBool aNeedHeader) +{ + TIpcArgs args(aId, aNeedHeader); + return SendReceive(EUsbOstCmdCodeRegisterId, args); +} + +void RUsbOstComm::ReadMessage(TRequestStatus& aStatus, TDes8& aDes) +{ + TIpcArgs args(aDes.MaxLength(), &aDes); + SendReceive(EUsbOstCmdCodeReadMsg, args, aStatus); +} + +TInt RUsbOstComm::ReadCancel() +{ + return SendReceive(EUsbOstCmdCodeReadCancel); +} + +void RUsbOstComm::WriteMessage(TRequestStatus& aStatus, const TDesC8& aDes, TBool aHasHeader) +{ + TIpcArgs args(aHasHeader, aDes.Length(), &aDes); + SendReceive(EUsbOstCmdCodeWriteMsg, args, aStatus); +} + +typedef TVersion (*TVersionFunction)(const RUsbOstComm*); +const TInt KVersionOrdinal = 17; + +TVersion RUsbOstComm::Version() const +{ + // This function has to go to the DLL, unfortunately + TVersion result; // Return 0.0.0 on any error + RLibrary lib; + TInt err = lib.Load(_L("usbostcomm")); + if (err) return result; + + TLibraryFunction fn = lib.Lookup(KVersionOrdinal); + if (fn) + result = ((TVersionFunction)fn)(this); + lib.Close(); + return result; +} + +#endif //USBHOSTCOMM_H diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro index 2442dc0..9b3346f 100644 --- a/src/plugins/qmltooling/qmltooling.pro +++ b/src/plugins/qmltooling/qmltooling.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs SUBDIRS = qmldbg_tcp +symbian:SUBDIRS += qmldbg_ost diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index bdc4b10..84ebba8 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -39,7 +39,7 @@ symbian { TARGET.CAPABILITY = NetworkServices ReadUserData # Deploy plugin for remote debugging - qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/qmldbgtcp$${QT_LIBINFIX}.dll + qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/qmldbg_tcp$${QT_LIBINFIX}.dll $$QT_BUILD_TREE/plugins/qmltooling/qmldbg_ost$${QT_LIBINFIX}.dll qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmltooling DEPLOYMENT += qmldebuggingplugin } -- cgit v0.12 From b4b85257ccff6ba21bcbcbd46a9f7f09884abe79 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 15 Apr 2011 11:48:06 +1000 Subject: Resolve unqualified attached properties correctly When resolving unqualified attached properties, we should use the scope object, not the context object. Otherwise they will always resolve to the root object of the context, regardless of where they are written. In this example, QtObject { id: root QtObject { id: me property int a: AttachedObject.x } } the attached object should be loaded on the "me" object, not the "root" object. Change-Id: I386f886f62df7b8020c3ff703cdfc891d5739713 Reviewed-by: Martin Jones --- .../qml/qdeclarativecontextscriptclass.cpp | 16 ++++++++-------- .../data/attachedProperty.2.qml | 22 ++++++++++++++++++++++ .../declarative/qdeclarativeecmascript/testtypes.h | 5 +++-- .../tst_qdeclarativeecmascript.cpp | 10 ++++++++++ 4 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp index bb4ece4..3abd787 100644 --- a/src/declarative/qml/qdeclarativecontextscriptclass.cpp +++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp @@ -227,6 +227,7 @@ QDeclarativeContextScriptClass::queryProperty(QDeclarativeContextData *bindConte if (data) { lastData = data; lastContext = bindContext; + lastScopeObject = scopeObject; return QScriptClass::HandlesReadAccess; } } @@ -268,17 +269,12 @@ QDeclarativeContextScriptClass::property(Object *object, const Identifier &name) QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine); - if (lastScopeObject) { - - return ep->objectClass->property(lastScopeObject, name); - - } else if (lastData) { + if (lastData) { if (lastData->type) { - return Value(scriptEngine, ep->typeNameClass->newObject(bindContext->contextObject, lastData->type)); + return Value(scriptEngine, ep->typeNameClass->newObject(lastScopeObject, lastData->type)); } else if (lastData->typeNamespace) { - return Value(scriptEngine, ep->typeNameClass->newObject(bindContext->contextObject, - lastData->typeNamespace)); + return Value(scriptEngine, ep->typeNameClass->newObject(lastScopeObject, lastData->typeNamespace)); } else { int index = lastData->importedScriptIndex; if (index < bindContext->importedScripts.count()) { @@ -288,6 +284,10 @@ QDeclarativeContextScriptClass::property(Object *object, const Identifier &name) } } + } else if (lastScopeObject) { + + return ep->objectClass->property(lastScopeObject, name); + } else if (lastPropertyIndex != -1) { QScriptValue rv; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml new file mode 100644 index 0000000..a7184c9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.2.qml @@ -0,0 +1,22 @@ +import Qt.test 1.0 +import Qt.test 1.0 as Namespace + +MyQmlObject { + property alias a: me.a + property alias b: me.a + property alias c: me.a + property alias d: me.a + + property MyQmlObject obj + obj: MyQmlObject { + MyQmlObject.value2: 13 + + id: me + property int a: MyQmlObject.value2 * 2 + property int b: Namespace.MyQmlObject.value2 * 2 + property int c: me.Namespace.MyQmlObject.value * 2 + property int d: me.Namespace.MyQmlObject.value * 2 + } +} + + diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 94cec3f..ad38d27 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -60,17 +60,18 @@ class MyQmlAttachedObject : public QObject { Q_OBJECT Q_PROPERTY(int value READ value CONSTANT) - Q_PROPERTY(int value2 READ value2 WRITE setValue2) + Q_PROPERTY(int value2 READ value2 WRITE setValue2 NOTIFY value2Changed) public: MyQmlAttachedObject(QObject *parent) : QObject(parent), m_value2(0) {} int value() const { return 19; } int value2() const { return m_value2; } - void setValue2(int v) { m_value2 = v; } + void setValue2(int v) { if (m_value2 == v) return; m_value2 = v; emit value2Changed(); } void emitMySignal() { emit mySignal(); } signals: + void value2Changed(); void mySignal(); private: diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 7876671..1ec12fe 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -650,6 +650,16 @@ void tst_qdeclarativeecmascript::attachedProperties() } { + QDeclarativeComponent component(&engine, TEST_FILE("attachedProperty.2.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + QCOMPARE(object->property("a").toInt(), 26); + QCOMPARE(object->property("b").toInt(), 26); + QCOMPARE(object->property("c").toInt(), 26); + QCOMPARE(object->property("d").toInt(), 26); + } + + { QDeclarativeComponent component(&engine, TEST_FILE("writeAttachedProperty.qml")); QObject *object = component.create(); QVERIFY(object != 0); -- cgit v0.12 From 7bc3dfc5214c6a31259d366be8e20c48195b0a50 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 15 Apr 2011 16:29:11 +1000 Subject: Fixed autotest after b4b85257ccff6ba21bcbcbd46a9f7f09884abe79 Change-Id: I7371d5c2f76254e6746d5a86874a045fc6aec32d --- tests/auto/declarative/qdeclarativeanimations/data/attached.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativeanimations/data/attached.qml b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml index 5da4a69..c5d5535 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/attached.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml @@ -17,7 +17,7 @@ Rectangle { transitions: Transition { PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true } - ScriptAction { script: console.log(ListView.delayRemove ? "on" : "off") } + ScriptAction { script: console.log(wrapper.ListView.delayRemove ? "on" : "off") } } Component.onCompleted: { -- cgit v0.12 From 81044282befaa5af7247804c7875df83c89c6459 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 15 Apr 2011 08:33:28 +0200 Subject: QmlDebug: Fix license headers in new ost plugin Reviewed-by: Trust-me --- src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp | 26 +++++++++++----------- src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h | 26 +++++++++++----------- src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp | 26 +++++++++++----------- src/plugins/qmltooling/qmldbg_ost/qostdevice.h | 26 +++++++++++----------- src/plugins/qmltooling/qmldbg_ost/usbostcomm.h | 26 +++++++++++----------- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp index e0d7664..1c91c34 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -7,11 +7,11 @@ ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,16 +25,16 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h index 1e18444..eee6ee1 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h @@ -7,11 +7,11 @@ ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,16 +25,16 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp index 3c5515f..21b0169 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp @@ -7,11 +7,11 @@ ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,16 +25,16 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h index 26bdc15..ba1f443 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h @@ -7,11 +7,11 @@ ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,16 +25,16 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h index 5f29e71..48ff7bf 100644 --- a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h +++ b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h @@ -7,11 +7,11 @@ ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -25,16 +25,16 @@ ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v0.12 From 9672bec709bb8ee3d35dcd889b218708e4804c55 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 15 Apr 2011 09:05:31 +0200 Subject: Make EGL surface transparency working on Symbian. When the hardware is capable enough, setting WA_TranslucentBackground will not lead to falling back to raster, but will continue using OpenVG or OpenGL based rendering. However this needs an alpha channel which was not requested previously. This patch corrects it. Task-number: QT-4729 Reviewed-by: Jani Hautakangas --- src/gui/egl/qegl_symbian.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 6533d11..fabf9d1 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "qegl_p.h" #include "qeglcontext_p.h" @@ -73,10 +74,14 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) return; int devType = dev->devType(); - if (devType == QInternal::Image) + if (devType == QInternal::Image) { setPixelFormat(static_cast(dev)->format()); - else - setPixelFormat(QImage::Format_RGB32); + } else { + QImage::Format format = QImage::Format_RGB32; + if (QApplicationPrivate::instance() && QApplicationPrivate::instance()->useTranslucentEGLSurfaces) + format = QImage::Format_ARGB32_Premultiplied; + setPixelFormat(format); + } } -- cgit v0.12 From dc65a73fa38d1f85b75e9d4ad71ebdbc1c7d85f5 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 15 Apr 2011 14:51:34 +0200 Subject: Build fix for transition effect support on S60 5.0. Task-number: QT-4718 Reviewed-by: TRUSTME --- src/gui/kernel/kernel.pri | 2 ++ src/gui/kernel/qt_s60_p.h | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index f9c84c1..467eb9b 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -111,6 +111,8 @@ win32 { } symbian { + exists($${EPOCROOT}epoc32/include/platform/mw/akntranseffect.h): DEFINES += QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H + SOURCES += \ kernel/qapplication_s60.cpp \ kernel/qeventdispatcher_s60.cpp \ diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index da44016..8aba53a 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -78,8 +78,10 @@ #include // CEikStatusPane #include // MAknFadedComponent and TAknPopupFader #include // BeginFullScreen +#ifdef QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H #include // BeginFullScreen #endif +#endif QT_BEGIN_NAMESPACE @@ -577,7 +579,7 @@ bool qt_symbian_is_cursor_visible(); static inline bool qt_beginFullScreenEffect() { -#ifdef Q_WS_S60 +#if defined(Q_WS_S60) && defined(QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H) // Only for post-S^3. On earlier versions the system transition effects // may not be able to capture the non-Avkon content, leading to confusing // looking effects, so just skip the whole thing. @@ -593,12 +595,14 @@ static inline bool qt_beginFullScreenEffect() AknTransEffect::GfxTransParam(S60->uid, AknTransEffect::TParameter::EAvkonCheck | KQtAppExitFlag)); return true; +#else + return false; #endif } static inline void qt_abortFullScreenEffect() { -#ifdef Q_WS_S60 +#if defined(Q_WS_S60) && defined(QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H) if (!S60->beginFullScreenCalled || QSysInfo::s60Version() <= QSysInfo::SV_S60_5_2) return; GfxTransEffect::AbortFullScreen(); @@ -608,7 +612,7 @@ static inline void qt_abortFullScreenEffect() static inline void qt_endFullScreenEffect() { -#ifdef Q_WS_S60 +#if defined(Q_WS_S60) && defined(QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H) if (S60->endFullScreenCalled || QSysInfo::s60Version() <= QSysInfo::SV_S60_5_2) return; S60->endFullScreenCalled = true; -- cgit v0.12 From cec6c3ad52f6b4cdf04b70340ff7d15ebd8c7d26 Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Fri, 15 Apr 2011 16:48:27 +0200 Subject: QDesktopServices::openUrl() doesn't handle URL encodings correctly I think this is a problem with the USE_SCHEMEHANDLER version of handleUrl() in qt/src/gui/util/qdesktopservices_s60.cpp. It calls url.toString() which removes percent encoding. I think url.toEncoded() should be used instead. Task-number: QTBUG-18772 Reviewed-by: joao --- src/gui/util/qdesktopservices_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index 96860df..8caeb74 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -314,7 +314,7 @@ static bool handleUrl(const QUrl &url) if (!url.isValid()) return false; - QString urlString(url.toString()); + QString urlString(url.toEncoded()); TPtrC urlPtr(qt_QString2TPtrC(urlString)); TRAPD( err, handleUrlL(urlPtr)); return err ? false : true; -- cgit v0.12 From fb0d4ad8f585befb58f77f8d4eaf58944448b8a7 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 18 Apr 2011 10:54:53 +0300 Subject: Add new QSysInfo::symbianVersion() enums Add new enums for future Symbian platforms and fix the docs of existing ones. Task-number: QT-4593 Reviewed-by: Sami Merila --- mkspecs/common/symbian/symbian.conf | 49 ++++++++++++++++++++----------------- src/corelib/global/qglobal.cpp | 25 +++++++++++++------ src/corelib/global/qglobal.h | 9 ++++--- 3 files changed, 50 insertions(+), 33 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 8e04099..0288ada 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -164,34 +164,39 @@ exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) { # Try to detect SDK version if it wasn't set by environment.prf isEmpty(SYMBIAN_VERSION)|isEmpty(S60_VERSION) { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.3.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.3.sis) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3 - isEmpty(S60_VERSION): S60_VERSION = 5.3 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.4.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.4.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 5.4 + isEmpty(S60_VERSION): S60_VERSION = 5.4 } else { - # The Symbian^3 PDK does not necessarily contain the required sis files. - # However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too. - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3 - isEmpty(S60_VERSION): S60_VERSION = 5.2 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.3.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.3.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 5.3 + isEmpty(S60_VERSION): S60_VERSION = 5.3 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian2 - isEmpty(S60_VERSION): S60_VERSION = 5.1 + # The Symbian^3 PDK does not necessarily contain the required sis files. + # However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too. + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3 + isEmpty(S60_VERSION): S60_VERSION = 5.2 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.4 - isEmpty(S60_VERSION): S60_VERSION = 5.0 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian2 + isEmpty(S60_VERSION): S60_VERSION = 5.1 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.3 - isEmpty(S60_VERSION): S60_VERSION = 3.2 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.4 + isEmpty(S60_VERSION): S60_VERSION = 5.0 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.1.sis) { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.2 - isEmpty(S60_VERSION): S60_VERSION = 3.1 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.3 + isEmpty(S60_VERSION): S60_VERSION = 3.2 } else { - isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Unknown - isEmpty(S60_VERSION): S60_VERSION = Unknown + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.1.sis) { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.2 + isEmpty(S60_VERSION): S60_VERSION = 3.1 + } else { + isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Unknown + isEmpty(S60_VERSION): S60_VERSION = Unknown + } } } } diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 35719b1..2cfd9cc 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1197,10 +1197,12 @@ bool qSharedBuild() \value SV_9_2 Symbian OS v9.2 \value SV_9_3 Symbian OS v9.3 \value SV_9_4 Symbian OS v9.4 - \value SV_SF_1 Symbian^1 + \value SV_SF_1 S60 5th Edition (Symbian^1) \value SV_SF_2 Symbian^2 - \value SV_SF_3 Symbian^3 + \value SV_SF_3 Symbian^3 or Symbian Anna \value SV_SF_4 \e{This enum value is deprecated.} + \value SV_API_5_3 Symbian/S60 API version 5.3 release + \value SV_API_5_4 Symbian/S60 API version 5.4 release \value SV_Unknown An unknown and currently unsupported platform \sa S60Version, WinVersion, MacVersion @@ -1217,9 +1219,10 @@ bool qSharedBuild() \value SV_S60_3_1 S60 3rd Edition Feature Pack 1 \value SV_S60_3_2 S60 3rd Edition Feature Pack 2 \value SV_S60_5_0 S60 5th Edition - \value SV_S60_5_1 S60 5th Edition Feature Pack 1 - \value SV_S60_5_2 Symbian^3 - \value SV_S60_5_3 To be determined - FIXME + \value SV_S60_5_1 \e{This enum value is deprecated.} + \value SV_S60_5_2 Symbian^3 and Symbian Anna + \value SV_S60_5_3 Symbian/S60 API version 5.3 release + \value SV_S60_5_4 Symbian/S60 API version 5.4 release \value SV_S60_Unknown An unknown and currently unsupported platform \omitvalue SV_S60_None @@ -1852,9 +1855,12 @@ static void symbianInitVersions() } else if (minor == 2) { cachedS60Version = QSysInfo::SV_S60_5_2; cachedSymbianVersion = QSysInfo::SV_SF_3; - } else if (minor >= 3) { + } else if (minor == 3) { cachedS60Version = QSysInfo::SV_S60_5_3; - cachedSymbianVersion = QSysInfo::SV_SF_3; + cachedSymbianVersion = QSysInfo::SV_API_5_3; + } else if (minor >= 4) { + cachedS60Version = QSysInfo::SV_S60_5_4; + cachedSymbianVersion = QSysInfo::SV_API_5_4; } } } @@ -1880,7 +1886,10 @@ static void symbianInitVersions() cachedSymbianVersion = QSysInfo::SV_SF_3; # elif defined(S60_VERSION_5_3) cachedS60Version = QSysInfo::SV_S60_5_3; - cachedSymbianVersion = QSysInfo::SV_SF_3; + cachedSymbianVersion = QSysInfo::SV_API_5_3; +# elif defined(S60_VERSION_5_4) + cachedS60Version = QSysInfo::SV_S60_5_4; + cachedSymbianVersion = QSysInfo::SV_API_5_4; # endif } # endif diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 7768b46..e5109e6 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1524,7 +1524,9 @@ public: SV_SF_1 = SV_9_4, SV_SF_2 = 40, SV_SF_3 = 50, - SV_SF_4 = 60 // Deprecated + SV_SF_4 = 60, // Deprecated + SV_API_5_3 = 70, + SV_API_5_4 = 80 }; static SymbianVersion symbianVersion(); enum S60Version { @@ -1533,9 +1535,10 @@ public: SV_S60_3_1 = SV_9_2, SV_S60_3_2 = SV_9_3, SV_S60_5_0 = SV_9_4, - SV_S60_5_1 = SV_SF_2, + SV_S60_5_1 = SV_SF_2, // Deprecated SV_S60_5_2 = SV_SF_3, - SV_S60_5_3 = 70 + SV_S60_5_3 = SV_API_5_3, + SV_S60_5_4 = SV_API_5_4 }; static S60Version s60Version(); #endif -- cgit v0.12 From 41c3b83ff68d2a58f5fda462907bbf0f8c63effc Mon Sep 17 00:00:00 2001 From: Denis Oliver Kropp Date: Mon, 18 Apr 2011 12:24:31 +0200 Subject: Fix build of Qt/DirectFB without graphics view support. Merge-request: 1187 Reviewed-by: Oswald Buddenhagen --- src/gui/widgets/qcombobox.cpp | 2 ++ src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 4b087e9..04ab801 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -704,11 +704,13 @@ void QComboBoxPrivateContainer::hideEvent(QHideEvent *) { emit resetButton(); combo->update(); +#ifndef QT_NO_GRAPHICSVIEW // QGraphicsScenePrivate::removePopup closes the combo box popup, it hides it non-explicitly. // Hiding/showing the QComboBox after this will unexpectedly show the popup as well. // Re-hiding the popup container makes sure it is explicitly hidden. if (QGraphicsProxyWidget *proxy = graphicsProxyWidget()) proxy->hide(); +#endif } void QComboBoxPrivateContainer::mousePressEvent(QMouseEvent *e) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 3d8cf50..9a94c30 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -365,10 +365,12 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion ®ion, if (!win) return; -#ifndef QT_NO_QWS_PROXYSCREEN +#if !defined(QT_NO_QWS_PROXYSCREEN) && !defined(QT_NO_GRAPHICSVIEW) QWExtra *extra = qt_widget_private(widget)->extraData(); if (extra && extra->proxyWidget) return; +#else + Q_UNUSED(widget); #endif const quint8 windowOpacity = quint8(win->windowOpacity() * 0xff); -- cgit v0.12 From 7c1707ba2eb8998df9713b2539564a1daa3d7e8c Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 18 Apr 2011 13:46:42 +0300 Subject: Symbol table is very limited in numeric input mode Qt uses number mode keymap as a default in input context. If Special Character Table is not assigned into FEP state, the default keymap will be used. This will contain only few symbols ('*', '#', ...). As a fix, use alpha numeric keymap as a default keymap, using this will keep the symbol table same irregardless of current input mode (numbers, characters). Task-number: QT-4878 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index c11d5e8..92f8384 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -117,7 +117,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState->SetDefaultCase( EAknEditorTextCase ); m_fepState->SetPermittedCases( EAknEditorAllCaseModes ); m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); - m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap ); + m_fepState->SetNumericKeymap(EAknEditorAlphanumericNumberModeKeymap); } QCoeFepInputContext::~QCoeFepInputContext() -- cgit v0.12 From 63bf7cd581d9f69fecae82921d5c2c5b5eddc04a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 19 Apr 2011 12:05:48 +0200 Subject: Fix wrong merge of 3aa39b0164ce4bb9e --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 83d3adf..4f3b113 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2901,7 +2901,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q ret = "."; debug_msg(3, "Fixed[%d,%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, canon, orig_file.toLatin1().constData(), ret.toLatin1().constData(), in_d.toLatin1().constData(), out_d.toLatin1().constData(), - pwd.toLatin1().constData(), Option::output_dir.toLatin1().constData()); + qmake_getpwd().toLatin1().constData(), Option::output_dir.toLatin1().constData()); return ret; } -- cgit v0.12 From cd1a52099e4154ecaf4862d2248ddb1565b3c3ab Mon Sep 17 00:00:00 2001 From: Victor Ostashevsky Date: Tue, 19 Apr 2011 13:43:39 +0200 Subject: Ukrainian translation updated Merge-request: 1189 Reviewed-by: Oswald Buddenhagen --- translations/linguist_uk.ts | 4 +++ translations/qt_uk.ts | 69 ++++++++++++++++++++++++++++++++++++++++++++- translations/qtconfig_uk.ts | 20 +++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/translations/linguist_uk.ts b/translations/linguist_uk.ts index 56db6ba..a503475 100644 --- a/translations/linguist_uk.ts +++ b/translations/linguist_uk.ts @@ -86,6 +86,10 @@ DataModel + The translation file '%1' will not be loaded because it is empty. + Файл перекладу '%1' не буде завантажено, бо він порожній. + + <qt>Duplicate messages found in '%1': <qt>Повідомлення-дублікати знайдено в '%1': diff --git a/translations/qt_uk.ts b/translations/qt_uk.ts index 7f396ad..52e70a2 100644 --- a/translations/qt_uk.ts +++ b/translations/qt_uk.ts @@ -321,6 +321,10 @@ have libgstreamer-plugins-base installed. Playback complete Відтворення завершене + + Download error + Помилка звантаження + Phonon::MMF::AbstractVideoPlayer @@ -440,6 +444,10 @@ have libgstreamer-plugins-base installed. Error opening source: media type could not be determined Помилка відкриття джерела: не вдалося визначити тип медіа-даних + + Failed to set requested IAP + Збій встановлення точки доступу до Інтернет + Phonon::MMF::StereoWidening @@ -1200,6 +1208,11 @@ to %1: недостатньо ресурсів + %1: permission denied + QSystemSemaphore + %1: доступ заборонено + + %1: unknown error %2 QSystemSemaphore %1: невідома помилка %2 @@ -1366,6 +1379,13 @@ to + QDeclarativeApplication + + Application is an abstract class + Application - це абстрактний клас + + + QDeclarativeBehavior Cannot change the animation assigned to a Behavior. @@ -1493,6 +1513,14 @@ to Неможливо створити порожню специфікацію компоненти + "%1.%2" is not available in %3 %4.%5. + "%1.%2" не доступно в %3 %4.%5. + + + "%1.%2" is not available due to component versioning. + "%1.%2" не доступно через версіювання компонента. + + Incorrectly specified signal assignment Неправильно вказане призначення сигналу @@ -1589,6 +1617,10 @@ to Неправильне присвоєння властивості: очікувався скрипт + Cannot assign multiple values to a singular property + Неможливо присвоїти декілька значенть до одиничної властивості + + Cannot assign object to property Неможливо призначити об'єкт властивості @@ -1681,8 +1713,16 @@ to Непраильна позиція псевдоніму + Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> + Неправильне посилання на псевдонім. Посилання на псевдонім повинно бути вказане як <id>, <id>.<властивість> або <id>.<властивість-значення>.<властивість> + + + Alias property exceeds alias bounds + Властивість-псевдонім виходить за межі псевдоніму + + Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> - Неправильне посилання на псевдонім. Посилання на псевдонім має бути вказане, як <id> або <id>.<property> + Неправильне посилання на псевдонім. Посилання на псевдонім має бути вказане, як <id> або <id>.<property> Invalid alias reference. Unable to find id "%1" @@ -1695,6 +1735,10 @@ to Invalid empty URL Неправильний порожній URL + + createObject: value is not an object + createObject: значення не є об’єктом + QDeclarativeConnections @@ -1756,6 +1800,10 @@ to QDeclarativeImportDatabase + cannot load module "%1": File name case mismatch for "%2" + неможливо завантажити модуль "%1": Регістр імені файлу не збігається для "%2" + + module "%1" definition "%2" not readable неможливо прочитати визначення "%2" модуля "%1" @@ -1811,6 +1859,10 @@ to is not a type не є типом + + File name case mismatch for "%2" + Регістр імені файлу не збігається для "%2" + QDeclarativeKeyNavigationAttached @@ -1827,6 +1879,17 @@ to + QDeclarativeLayoutMirroringAttached + + LayoutDirection attached property only works with Items + Прикріплена властивість LayoutDirection працює лише з Item + + + LayoutMirroring is only available via attached properties + LayoutMirroring доступна лише через прикріплені властивості + + + QDeclarativeListModel remove: index %1 out of range @@ -6591,6 +6654,10 @@ Do you want to overwrite it? Error during SSL handshake: %1 Помилка рукостискання SSL: %1 + + The peer certificate is blacklisted + Сертифікат іншої сторони в чорному списку + QStateMachine diff --git a/translations/qtconfig_uk.ts b/translations/qtconfig_uk.ts index 3b1e2e5..24a9b7d 100644 --- a/translations/qtconfig_uk.ts +++ b/translations/qtconfig_uk.ts @@ -4,6 +4,26 @@ MainWindow + <p><b><font size+=2>Appearance</font></b></p><hr><p>Use this tab to customize the appearance of your Qt applications.</p><p>You can select the default GUI Style from the drop down list and customize the colors.</p><p>Any GUI Style plugins in your plugin path will automatically be added to the list of built-in Qt styles. (See the Library Paths tab for information on adding new plugin paths.)</p><p>When you choose 3-D Effects and Window Background colors, the Qt Configuration program will automatically generate a palette for you. To customize colors further, press the Tune Palette button to open the advanced palette editor.<p>The Preview Window shows what the selected Style and colors look like. + + + + <p><b><font size+=2>Fonts</font></b></p><hr><p>Use this tab to select the default font for your Qt applications. The selected font is shown (initially as 'Sample Text') in the line edit below the Family, Style and Point Size drop down lists.</p><p>Qt has a powerful font substitution feature that allows you to specify a list of substitute fonts. Substitute fonts are used when a font cannot be loaded, or if the specified font doesn't have a particular character.<p>For example, if you select the font Lucida, which doesn't have Korean characters, but need to show some Korean text using the Mincho font family you can do so by adding Mincho to the list. Once Mincho is added, any Korean characters that are not found in the Lucida font will be taken from the Mincho font. Because the font substitutions are lists, you can also select multiple families, such as Song Ti (for use with Chinese text). + + + + <p><b><font size+=2>Interface</font></b></p><hr><p>Use this tab to customize the feel of your Qt applications.</p><p>If the Resolve Symlinks checkbox is checked Qt will follow symlinks when handling URLs. For example, in the file dialog, if this setting is turned on and /usr/tmp is a symlink to /var/tmp, entering the /usr/tmp directory will cause the file dialog to change to /var/tmp. With this setting turned off, symlinks are not resolved or followed.</p><p>The Global Strut setting is useful for people who require a minimum size for all widgets (e.g. when using a touch panel or for users who are visually impaired). Leaving the Global Strut width and height at 0 will disable the Global Strut feature</p><p>XIM (Extended Input Methods) are used for entering characters in languages that have large character sets, for example, Chinese and Japanese. + + + + <p><b><font size+=2>Printer</font></b></p><hr><p>Use this tab to configure the way Qt generates output for the printer.You can specify if Qt should try to embed fonts into its generated output.If you enable font embedding, the resulting postscript will be more portable and will more accurately reflect the visual output on the screen; however the resulting postscript file size will be bigger.<p>When using font embedding you can select additional directories where Qt should search for embeddable font files. By default, the X server font path is used. + + + + <p><b><font size+=2>Phonon</font></b></p><hr><p>Use this tab to configure the Phonon GStreamer multimedia backend. <p>It is reccommended to leave all settings on "Auto" to let Phonon determine your settings automatically. + + + Desktop Settings (Default) Налаштування стільниці (Типово) -- cgit v0.12 From e93ef151eb7bc42e8139e2dc2d4ae3b7853b1c2d Mon Sep 17 00:00:00 2001 From: Sergey Belyashov Date: Tue, 19 Apr 2011 16:12:18 +0200 Subject: Updated Russian translation Merge-request: 2596 Reviewed-by: Oswald Buddenhagen --- translations/assistant_ru.ts | 12 +- translations/designer_ru.ts | 6 +- translations/linguist_ru.ts | 12 +- translations/qt_ru.ts | 655 +++++++++++++++++++++++-------------------- 4 files changed, 366 insertions(+), 319 deletions(-) diff --git a/translations/assistant_ru.ts b/translations/assistant_ru.ts index 6743986..b16f940 100644 --- a/translations/assistant_ru.ts +++ b/translations/assistant_ru.ts @@ -372,14 +372,14 @@ Reason: вместо стандартного -showUrl ссылка Отобразить документ по ссылке. -enableRemoteControl Включение удалённого управления Assistant. --show виджет Отображение указанного прикрепляемого виджета, - который может быть "contents", "index", +-show панель Отображение указанной панели, + которая может быть "contents", "index", "bookmarks" или "search". --activate виджет Включение указанного прикрепляемого виджета, - который может быть "contents", "index", +-activate панель Включение указанной панели, + которая может быть "contents", "index", "bookmarks" или "search". --hide виджет Скрытие указанного прикрепляемого виджета, - который может быть "contents", "index", +-hide панель Скрытие указанной панели, + которая может быть "contents", "index", "bookmarks" или "search". -register файлСправки Регистрация указанного файла справки (.qch) в данном файле коллекции. diff --git a/translations/designer_ru.ts b/translations/designer_ru.ts index 1b0b939..fec098c 100644 --- a/translations/designer_ru.ts +++ b/translations/designer_ru.ts @@ -439,7 +439,7 @@ Add Dock Window - Добавить прикрепляемое окно + Добавить панель Adjust Size of '%1' @@ -2699,7 +2699,7 @@ Do you want to replace it? newPrefix - + <p><b>Warning:</b> The file</p><p>%1</p><p>is outside of the current resource file's parent directory.</p> @@ -3222,7 +3222,7 @@ Do you want overwrite the template? Dock views - Прикрепляемые панели + Панели File diff --git a/translations/linguist_ru.ts b/translations/linguist_ru.ts index dfda98e..e5f57de 100644 --- a/translations/linguist_ru.ts +++ b/translations/linguist_ru.ts @@ -86,6 +86,10 @@ DataModel + The translation file '%1' will not be loaded because it is empty. + Невозможно загрузить файл перевода "%1", так как он пуст. + + <qt>Duplicate messages found in '%1': <qt>В '%1' обнаружены повторяющиеся сообщения: @@ -1268,7 +1272,7 @@ lupdate - это один из инструментов Qt Linguist. Он изв Phrases and guesses - Фразы и похожие переводы + Похожие переводы Sources and Forms @@ -1633,7 +1637,7 @@ All files (*) &Phrases - Фра&зы + &Глоссарии &Close Phrase Book @@ -1657,7 +1661,7 @@ All files (*) Vie&ws - Вид&ы + &Панели &Toolbars @@ -1977,7 +1981,7 @@ All files (*) &Display guesses - &Предлагать похожие + П&охожие переводы Set whether or not to display translation guesses. diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index e20fc0c..d399b6d 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -89,7 +89,7 @@ Revert back to device '%1' - Возвращение к устройству "%1" + Возвращение к устройству «%1» <html>Switching to the audio playback device <b>%1</b><br/>which has higher preference or is specifically configured for this stream.</html> @@ -188,7 +188,7 @@ have libgstreamer-plugins-base installed. Underflow - Переполнение + Ниже границы Already exists @@ -240,7 +240,7 @@ have libgstreamer-plugins-base installed. Server alert - Сигнал сервера + Сигнал сервера Invalid protocol @@ -444,6 +444,10 @@ have libgstreamer-plugins-base installed. Error opening source: media type could not be determined Ошибка открытия источника: не удалось определить тип медиа-данных + + Failed to set requested IAP + Не удалось задать указанную точку доступа + Phonon::MMF::StereoWidening @@ -482,7 +486,7 @@ have libgstreamer-plugins-base installed. Ambiguous %1 not handled - + Неоднозначная комбинация %1 не обработана @@ -704,7 +708,7 @@ have libgstreamer-plugins-base installed. <qt>Are you sure you wish to delete %1 "%2"?</qt> - <qt>Вы действительно хотите удалить %1 "%2"?</qt> + <qt>Вы действительно хотите удалить %1 «%2»?</qt> &Yes @@ -951,35 +955,35 @@ to Q3UrlOperator The protocol `%1' is not supported - Протокол "%1" не поддерживается + Протокол «%1» не поддерживается The protocol `%1' does not support listing directories - Протокол "%1" не поддерживает просмотр каталогов + Протокол «%1» не поддерживает просмотр каталогов The protocol `%1' does not support creating new directories - Протокол "%1" не поддерживает создание каталогов + Протокол «%1» не поддерживает создание каталогов The protocol `%1' does not support removing files or directories - Протокол "%1" не поддерживает удаление файлов или каталогов + Протокол «%1» не поддерживает удаление файлов или каталогов The protocol `%1' does not support renaming files or directories - Протокол "%1" не поддерживает переименование файлов или каталогов + Протокол «%1» не поддерживает переименование файлов или каталогов The protocol `%1' does not support getting files - Протокол "%1" не поддерживает доставку файлов + Протокол «%1» не поддерживает передачу файлов The protocol `%1' does not support putting files - Протокол "%1" не поддерживает отправку файлов + Протокол «%1» не поддерживает отправку файлов The protocol `%1' does not support copying or moving files or directories - Протокол "%1" не поддерживает копирование или перемещение файлов или каталогов + Протокол «%1» не поддерживает копирование или перемещение файлов или каталогов (unknown) @@ -1066,7 +1070,7 @@ to QApplication Executable '%1' requires Qt %2, found Qt %3. - Программный модуль "%1" требует Qt %2, найдена версия %3. + Программный модуль «%1» требует Qt %2, найдена версия %3. Incompatible Qt Library Error @@ -1219,6 +1223,11 @@ to %1: недостаточно ресурсов + %1: permission denied + QSystemSemaphore + %1: доступ запрещён + + %1: unknown error %2 QSystemSemaphore %1: неизвестная ошибка %2 @@ -1293,11 +1302,11 @@ to QDeclarativeAbstractAnimation Cannot animate non-existent property "%1" - Невозможно анимировать несуществуещее свойство "%1" + Невозможно анимировать несуществуещее свойство «%1» Cannot animate read-only property "%1" - Невозможно анимировать свойство только для чтения "%1" + Невозможно анимировать свойство только для чтения «%1» Animation is an abstract class @@ -1315,51 +1324,51 @@ to QDeclarativeAnchors Possible anchor loop detected on fill. - Обнаружена возможная цикличная привязка на fill. + Обнаружена возможная цикличная привязка на fill. Possible anchor loop detected on centerIn. - Обнаружена возможная цикличная привязка на centerIn. + Обнаружена возможная цикличная привязка на centerIn. Cannot anchor to an item that isn't a parent or sibling. - Невозможно установить привязку к элементу, не являющемуся родителем или соседом. + Невозможно установить привязку к элементу, не являющемуся родителем или соседом. Possible anchor loop detected on vertical anchor. - Обнаружена возможная цикличная привязка к вертикальной привязке. + Обнаружена возможная цикличная привязка к вертикальной привязке. Possible anchor loop detected on horizontal anchor. - Обнаружена возможная цикличная привязка к горизонтальной привязке. + Обнаружена возможная цикличная привязка к горизонтальной привязке. Cannot specify left, right, and hcenter anchors. - Невозможно задать левую, правую и среднюю привязки. + Невозможно задать левую, правую и среднюю привязки. Cannot anchor to a null item. - Невозможно привязаться к нулевому элементу. + Невозможно привязаться к нулевому элементу. Cannot anchor a horizontal edge to a vertical edge. - Невозможно привязать горизонтальный край к вертикальному. + Невозможно привязать горизонтальный край к вертикальному. Cannot anchor item to self. - Невозможно привязать элемент к самому себе. + Невозможно привязать элемент к самому себе. Cannot specify top, bottom, and vcenter anchors. - Невозможно задать верхнюю, нижнюю и среднюю привязки. + Невозможно задать верхнюю, нижнюю и среднюю привязки. Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors. - Невозможно использовать базовую привязку вместе с верхней, нижней и центральной по вертикали. + Невозможно использовать базовую привязку вместе с верхней, нижней и центральной по вертикали. Cannot anchor a vertical edge to a horizontal edge. - Невозможно привязать вертикальный край к горизонтальному. + Невозможно привязать вертикальный край к горизонтальному. @@ -1370,31 +1379,38 @@ to + QDeclarativeApplication + + Application is an abstract class + Класс Application - абстрактный + + + QDeclarativeBehavior Cannot change the animation assigned to a Behavior. - Невозможно изменить анимацию, назначенную поведению. + Невозможно изменить анимацию, назначенную поведению. QDeclarativeBinding Binding loop detected for property "%1" - Обнаружено зацикливание привязки для свойства "%1" + Обнаружено зацикливание привязки для свойства «%1» QDeclarativeCompiledBindings Binding loop detected for property "%1" - Обнаружена цикличная привязка для свойства "%1" + Обнаружена цикличная привязка для свойства «%1» QDeclarativeCompiler Invalid property assignment: "%1" is a read-only property - Некорректное присваивание свойства: "%1" свойство только для чтения + Некорректное присваивание свойства: «%1» свойство только для чтения Invalid property assignment: unknown enumeration @@ -1402,19 +1418,19 @@ to Invalid property assignment: string expected - Некорректное присваивание свойства: ожидается значение типа "string" + Некорректное присваивание свойства: ожидается значение типа «string» Invalid property assignment: url expected - Некорректное присваивание свойства: ожидается значение типа "url" + Некорректное присваивание свойства: ожидается значение типа «url» Invalid property assignment: unsigned int expected - Некорректное присваивание свойства: ожидается значение типа "unsigned int" + Некорректное присваивание свойства: ожидается значение типа «unsigned int» Invalid property assignment: int expected - Некорректное присваивание свойства: ожидается значение типа "int" + Некорректное присваивание свойства: ожидается значение типа «int» Invalid property assignment: number expected @@ -1422,31 +1438,31 @@ to Invalid property assignment: color expected - Некорректное присваивание свойства: ожидается значение типа "color" + Некорректное присваивание свойства: ожидается значение типа «color» Invalid property assignment: date expected - Некорректное присваивание свойства: ожидается значение типа "date" + Некорректное присваивание свойства: ожидается значение типа «date» Invalid property assignment: time expected - Некорректное присваивание свойства: ожидается значение типа "time" + Некорректное присваивание свойства: ожидается значение типа «time» Invalid property assignment: datetime expected - Некорректное присваивание свойства: ожидается значение типа "datetime" + Некорректное присваивание свойства: ожидается значение типа «datetime» Invalid property assignment: point expected - Некорректное присваивание свойства: ожидается значение типа "point" + Некорректное присваивание свойства: ожидается значение типа «point» Invalid property assignment: size expected - Некорректное присваивание свойства: ожидается значение типа "size" + Некорректное присваивание свойства: ожидается значение типа «size» Invalid property assignment: rect expected - Некорректное присваивание свойства: ожидается значение типа "rect" + Некорректное присваивание свойства: ожидается значение типа «rect» Invalid property assignment: boolean expected @@ -1454,11 +1470,11 @@ to Invalid property assignment: 3D vector expected - Некорректное присваивание свойства: ожидается значение типа "трёхмерный вектор" + Некорректное присваивание свойства: ожидается значение типа «трёхмерный вектор» Invalid property assignment: unsupported type "%1" - Некорректное присваивание свойства: неподдерживаемый тип "%1" + Некорректное присваивание свойства: неподдерживаемый тип «%1» Element is not creatable. @@ -1466,11 +1482,11 @@ to Component elements may not contain properties other than id - Элементы Component не могут содержать свойств кроме id + Элементы Component не могут содержать свойств кроме id Invalid component id specification - Некорректная спецификация id компонента + Некорректная спецификация id компонента id is not unique @@ -1478,60 +1494,68 @@ to Invalid component body specification - Некорректная спецификация тела компонента + Некорректная спецификация тела компонента Component objects cannot declare new properties. - Объекты Component не могут объявлять новые свойства. + Объекты Component не могут объявлять новые свойства. Component objects cannot declare new signals. - Объекты Component не могут объявлять новые сигналы. + Объекты Component не могут объявлять новые сигналы. Component objects cannot declare new functions. - Объекты Component не могут объявлять новые функции. + Объекты Component не могут объявлять новые функции. Cannot create empty component specification - Невозможно создать пустую спецификацю компонента + Невозможно создать пустую спецификацю компонента + + + "%1.%2" is not available in %3 %4.%5. + «%1.%2» не доступно в %3 %4.%5. + + + "%1.%2" is not available due to component versioning. + «%1.%2» не доступно из-за версии компоненты. Incorrectly specified signal assignment - Неверно указано назначение сигнала + Неверно указано назначение сигнала Cannot assign a value to a signal (expecting a script to be run) - Невозможно назначить значение сигналу (сценарий должен быть запущен) + Невозможно назначить значение сигналу (сценарий должен быть запущен) Empty signal assignment - Пустое назначение сигнала + Пустое назначение сигнала Empty property assignment - Пустое назначение свойства + Пустое назначение свойства Attached properties cannot be used here здесь - в данном контексте? - Прикреплённые свойства не могут быть использованы здесь + Прикреплённые свойства не могут быть использованы здесь Non-existent attached object - Несуществующий прикреплённый объект + Несуществующий прикреплённый объект Invalid attached object assignment - Некорректное назначение прикреплённого объекта + Некорректное назначение прикреплённого объекта Cannot assign to non-existent default property - Невозможно назначить несуществующему свойству по умолчанию + Невозможно назначить несуществующему свойству по умолчанию Cannot assign to non-existent property "%1" - Невозможно назначить несуществующему свойству "%1" + Невозможно назначить несуществующему свойству «%1» Invalid use of namespace @@ -1539,23 +1563,23 @@ to Not an attached property name - Не является именем привязанного свойства + Не является именем привязанного свойства Invalid use of id property - Некорректное использование свойства id + Некорректное использование свойства id Property has already been assigned a value - Свойству уже назначено значение + Свойству уже назначено значение Invalid grouped property access - Некорректный доступ к сгруппированному свойству + Некорректный доступ к сгруппированному свойству Cannot assign a value directly to a grouped property - Невозможно присвоить значение непосредственно сгруппированному свойству + Невозможно присвоить значение непосредственно сгруппированному свойству Invalid property use @@ -1563,55 +1587,55 @@ to Property assignment expected - Ожидается назначение свойства + Ожидается назначение свойства Single property assignment expected - Ожидается одиночное назначение свойства + Ожидается одиночное назначение свойства Unexpected object assignment - Неожиданное назначение объекта + Неожиданное назначение объекта Cannot assign object to list - Невозможно назначить объект списку + Невозможно назначить объект списку Can only assign one binding to lists - Можно назначить только одну связь для списка + Можно назначить только одну связь для списка Cannot assign primitives to lists - Невозможно назначить примитивы списку + Невозможно назначить примитивы списку Cannot assign multiple values to a script property - Невозможно назначить множественное значение свойству сценария + Невозможно назначить множественное значение свойству сценария Invalid property assignment: script expected - Некорректное присваивание свойства: ожидается сценарий + Некорректное присваивание свойства: ожидается сценарий Cannot assign multiple values to a singular property - Невозможно присвоить множество значений свойству, принимающему только одно + Невозможно присвоить множество значений свойству, принимающему только одно Cannot assign object to property - Невозможно назначить объектсвойству + Невозможно назначить объектсвойству "%1" cannot operate on "%2" - "%1" не может воздействовать на "%2" + «%1» не может воздействовать на «%2» Duplicate default property - Дублирование свойства по умолчанию + Дублирование свойства по умолчанию Duplicate property name - Дублирование названия свойства + Дублирование названия свойства Property names cannot begin with an upper case letter @@ -1623,7 +1647,7 @@ to Duplicate signal name - Дублирование названия сигнала + Дублирование названия сигнала Signal names cannot begin with an upper case letter @@ -1635,7 +1659,7 @@ to Duplicate method name - Дублирование название метода + Дублирование название метода Method names cannot begin with an upper case letter @@ -1647,11 +1671,11 @@ to Property value set multiple times - Значение свойства задано несколько раз + Значение свойства задано несколько раз Invalid property nesting - Некорректное вложенность свойств + Некорректное вложенность свойств Cannot override FINAL property @@ -1679,23 +1703,23 @@ to ID illegally masks global JavaScript property - Идентификатор неверно маскирует глобальное свойство JavaScript + Идентификатор неверно маскирует глобальное свойство JavaScript No property alias location - Отсутствует размещение псевдонима свойства + Отсутствует размещение псевдонима свойства Invalid alias location - Некорректное размещение псевдонима + Некорректное размещение псевдонима Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> - Некорректная ссылка на псевдоним. Ссылка на псевдоним должна быть указана, как <id>, <id>.<свойство> или <id>.<свойство значения>.<свойство> + Некорректная ссылка на псевдоним. Ссылка на псевдоним должна быть указана, как <id>, <id>.<свойство> или <id>.<свойство значения>.<свойство> Alias property exceeds alias bounds - Свойство псевдонима выходит за границы + Свойство псевдонима выходит за границы Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> @@ -1703,7 +1727,7 @@ to Invalid alias reference. Unable to find id "%1" - Некорректная ссылка на псевдоним. Не удалось найти id "%1" + Некорректная ссылка на псевдоним. Не удалось найти id «%1» @@ -1712,12 +1736,16 @@ to Invalid empty URL Пустой адрес URL + + createObject: value is not an object + createObject: значение не является объектом + QDeclarativeConnections Cannot assign to non-existent property "%1" - Невозможно назначить несуществующему свойству "%1" + Невозможно назначить несуществующему свойству «%1» Connections: nested objects not allowed @@ -1774,35 +1802,35 @@ to QDeclarativeImportDatabase cannot load module "%1": File name case mismatch for "%2" - невозможно загрузить модуль "%1": Регистр имени файла не соответствует "%2" + невозможно загрузить модуль «%1»: Регистр имени файла не соответствует «%2» module "%1" definition "%2" not readable - невозможно прочитать определение "%2" модуля "%1" + невозможно прочитать определение «%2» модуля «%1» plugin cannot be loaded for module "%1": %2 - модуль не может быть загружен для подмодуля "%1": %2 + не удалось загрузить плагин для модуля «%1»: %2 module "%1" plugin "%2" not found - подмодуль "%1" модуля "%2" не найден + модуль «%1» плагина «%2» не найден module "%1" version %2.%3 is not installed - модуль "%1" версии %2.%3 не установлен + модуль «%1» версии %2.%3 не установлен module "%1" is not installed - модуль "%1" не установлен + модуль «%1» не установлен "%1": no such directory - "%1": каталог не существует + «%1»: каталог не существует import "%1" has no qmldir and no namespace - каталог "%1" не содержит ни qmldir, ни namespace + каталог «%1» не содержит ни qmldir, ни namespace - %1 is not a namespace @@ -1834,21 +1862,32 @@ to File name case mismatch for "%2" - Регистр имени файла не соответствует "%2" + Регистр имени файла не соответствует «%2» QDeclarativeKeyNavigationAttached KeyNavigation is only available via attached properties - KeyNavigation доступна только через прикреплённые свойства + KeyNavigation доступна только через прикреплённые свойства QDeclarativeKeysAttached Keys is only available via attached properties - Keys доступны только через прикреплённые свойства + Keys доступны только через прикреплённые свойства + + + + QDeclarativeLayoutMirroringAttached + + LayoutDirection attached property only works with Items + Подключённое свойство LayoutDirection работает только с элементами + + + LayoutMirroring is only available via attached properties + LayoutMirroring доступно только через подключаемые свойства @@ -1887,7 +1926,7 @@ to ListElement: cannot use reserved "id" property - ListElement: невозможно использовать зарезервированное свойство "id" + ListElement: невозможно использовать зарезервированное свойство «id» ListElement: cannot use script for property value @@ -1895,7 +1934,7 @@ to ListModel: undefined property '%1' - ListModel: неопределённое свойство "%1" + ListModel: неопределённое свойство «%1» @@ -1971,7 +2010,7 @@ to Invalid regular expression flag '%0' - Некорректный флаг "%0" в регулярном выражении + Некорректный флаг «%0» в регулярном выражении Unterminated regular expression backslash sequence @@ -1987,15 +2026,15 @@ to Unexpected token `%1' - Неожиданный символ "%1" + Неожиданный символ «%1» Expected token `%1' - Ожидается символ "%1" + Ожидается символ «%1» Property value set multiple times - Значение свойства установлено несколько раз + Значение свойства установлено несколько раз Expected type name @@ -2003,11 +2042,11 @@ to Invalid import qualifier ID - Некорректный ID спецификатора импорта + Некорректный ID спецификатора импорта Reserved name "Qt" cannot be used as an qualifier - Зарезервированное имя "Qt" не может быть использовано в качестве спецификатора + Зарезервированное имя «Qt» не может быть использовано в качестве спецификатора Script import qualifiers must be unique. @@ -2019,7 +2058,7 @@ to Library import requires a version - Импорт библиотеки требует версию + Импорт библиотеки требует версию Expected parameter type @@ -2039,7 +2078,7 @@ to Readonly not yet supported - Readonly ещё не поддерживается + Readonly ещё не поддерживается JavaScript declaration outside Script element @@ -2079,26 +2118,26 @@ to QDeclarativePropertyChanges PropertyChanges does not support creating state-specific objects. - PropertyChanges не поддерживают создание объектов, зависимых от состояния. + PropertyChanges не поддерживают создание объектов, зависимых от состояния. Cannot assign to non-existent property "%1" - Невозможно назначить несуществующему свойству "%1" + Невозможно назначить несуществующему свойству «%1» Cannot assign to read-only property "%1" - Невозможно назначить свойству только для чтения "%1" + Невозможно назначить свойству только для чтения «%1» QDeclarativeTextInput Could not load cursor delegate - Не удалось загрузить делегат курсора + Не удалось загрузить делегат курсора Could not instantiate cursor delegate - Не удалось инстанциировать делегат курсора + Не удалось инстанциировать делегат курсора @@ -2109,11 +2148,11 @@ to Type %1 unavailable - Тип "%1" недоступен + Тип «%1» недоступен Namespace %1 cannot be used as a type - Пространство имён "%1" не может быть использовано в качестве типа + Пространство имён «%1» не может быть использовано в качестве типа %1 %2 @@ -2124,46 +2163,46 @@ to QDeclarativeVME Unable to create object of type %1 - Невозможно создать объект типа "%1" + Невозможно создать объект типа «%1» Cannot assign value %1 to property %2 - Невозможно установить значение "%1" свойству "%2" + Невозможно присвоить значение «%1» свойству «%2» Cannot assign object type %1 with no default method - Невозможно назначить объект типа %1 без метода по умолчанию + Невозможно присвоить объект типа «%1» без метода по умолчанию Cannot connect mismatched signal/slot %1 %vs. %2 - Невозможно подключить отсутствующий сигнал/слот %1 к %2 + Невозможно подключить отсутствующий сигнал/слот %1 к %2 Cannot assign an object to signal property %1 - Невозможно назначить объект к свойству сигнала %1 + Невозможно назначить объект к свойству сигнала %1 Cannot assign object to list - Невозможно назначить объект списку + Невозможно назначить объект списку Cannot assign object to interface property - Невозможно назначить объект свойству интерфейса + Невозможно назначить объект свойству интерфейса Unable to create attached object - Не удалось создать вложенный объект + Не удалось создать вложенный объект Cannot set properties on %1 as it is null - Невозможно установить свойства для %1, так как он нулевой + Невозможно установить свойства для %1, так как он нулевой QDeclarativeVisualDataModel Delegate component must be Item type. - Компинент делегата должен быть типа Item. + Компонента делегата должен быть типа Item. @@ -2177,14 +2216,14 @@ to QDeclarativeXmlListModelRole An XmlRole query must not start with '/' - Запрос XmlRole не должен начинаться с '/' + Запрос XmlRole не должен начинаться с «/» QDeclarativeXmlRoleList An XmlListModel query must start with '/' or "//" - Запрос XmlListModel должен начинаться с '/' или "//" + Запрос XmlListModel должен начинаться с «/» или «//» @@ -2345,11 +2384,11 @@ to Dock - Прикрепить + Прикрепить Float - Открепить + Открепить @@ -2478,7 +2517,7 @@ to '%1' is write protected. Do you want to delete it anyway? - "%1" защищён от записи. + «%1» защищён от записи. Действительно желаете удалить? @@ -2553,7 +2592,7 @@ Please verify the correct directory name was given. Are sure you want to delete '%1'? - Вы действительно хотите удалить "%1"? + Вы действительно хотите удалить «%1»? Could not delete directory. @@ -2652,7 +2691,7 @@ Please verify the correct directory name was given. <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - <b>Имя "%1" не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации. + <b>Имя «%1» не может быть использовано.</b><p>Попробуйте использовать имя меньшей длины и/или без символов пунктуации. Name @@ -3339,15 +3378,15 @@ Please verify the correct directory name was given. QLibrary Plugin verification data mismatch in '%1' - Проверочная информация для модуля "%1" не совпадает + Проверочная информация для модуля «%1» не совпадает The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - Модуль "%1" использует несоместимую библиотеку Qt. (%2.%3.%4) [%5] + Модуль «%1» использует несоместимую библиотеку Qt. (%2.%3.%4) [%5] The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - Модуль "%1" использует несоместимую библиотеку Qt. Ожидается ключ "%2", но получен ключ "%3" + Модуль «%1» использует несоместимую библиотеку Qt. Ожидается ключ «%2», но получен ключ «%3» Unknown error @@ -3359,11 +3398,11 @@ Please verify the correct directory name was given. The file '%1' is not a valid Qt plugin. - Файл "%1" - не является корректным модулем Qt. + Файл «%1» - не является корректным модулем Qt. The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - Модуль "%1" использует несоместимую библиотеку Qt. (Невозможно совместить релизные и отладочные библиотеки.) + Модуль «%1» использует несоместимую библиотеку Qt. (Невозможно совместить релизные и отладочные библиотеки.) Cannot load library %1: %2 @@ -3375,7 +3414,7 @@ Please verify the correct directory name was given. Cannot resolve symbol "%1" in %2: %3 - Невозможно разрешить символ "%1" в %2: %3 + Невозможно разрешить символ «%1» в %2: %3 @@ -3906,7 +3945,7 @@ Please verify the correct directory name was given. Protocol "%1" is unknown - Неизвестный протокол "%1" + Неизвестный протокол «%1» Network session error. @@ -3936,7 +3975,7 @@ Please verify the correct directory name was given. Roaming error или перемещения? - Ошибка роуминга + Ошибка роуминга Session aborted by user or system @@ -3964,7 +4003,7 @@ Please verify the correct directory name was given. Roaming was aborted or is not possible. - Роуминг прерван или невозможен. + Роуминг прерван или невозможен. @@ -4057,7 +4096,7 @@ Please verify the correct directory name was given. QODBCResult QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - QODBCResult::reset: Невозможно установить "SQL_CURSOR_STATIC" атрибутом выражение. Проверьте настройки драйвера ODBC + QODBCResult::reset: Невозможно установить «SQL_CURSOR_STATIC» атрибутом выражение. Проверьте настройки драйвера ODBC Unable to execute statement @@ -4096,11 +4135,11 @@ Please verify the correct directory name was given. QObject "%1" duplicates a previous role name and will be disabled. - "%1" повторяет имя предыдущей роли и не будет использовано. + «%1» повторяет имя предыдущей роли и не будет использовано. invalid query: "%1" - Некорректный запрос: "%1" + Некорректный запрос: «%1» PulseAudio Sound Server @@ -4440,7 +4479,7 @@ Please choose a different file name. The 'From' value cannot be greater than the 'To' value. - Значение "с" не может быть больше значения "по". + Значение «с» не может быть больше значения «по». A0 @@ -6187,15 +6226,15 @@ Please choose a different file name. Code input - + Ввод кода Multiple Candidate - + Несколько вариантов Previous Candidate - + Предыдущий вариант Hangul @@ -6285,23 +6324,23 @@ Please choose a different file name. Ctrl - Ctrl + Shift - Shift + Alt - Alt + Meta - Meta + + - + + F%1 @@ -6514,6 +6553,10 @@ Please choose a different file name. Ошибка создания сессии SSL: %1 + The peer certificate is blacklisted + Сертификат узла в чёрном списке + + Cannot provide a certificate with no key, %1 Невозможно предоставить сертификат без ключа, %1 @@ -6622,15 +6665,15 @@ Please choose a different file name. QStateMachine Missing initial state in compound state '%1' - Отсутствует исходное состояние в составном состоянии "%1" + Отсутствует исходное состояние в составном состоянии «%1» Missing default state in history state '%1' - Отсутствует состояние по умолчанию в историческом состоянии "%1" + Отсутствует состояние по умолчанию в историческом состоянии «%1» No common ancestor for targets and source of transition from state '%1' - Нет общего предка у источника и цели перехода из состояния "%1" + Нет общего предка у источника и цели перехода из состояния «%1» Unknown error @@ -7122,7 +7165,7 @@ Please choose a different file name. Choose File title for file button used in HTML forms - Обзор... + Выбрать файл No file selected @@ -7202,13 +7245,13 @@ Please choose a different file name. No Guesses Found No Guesses Found context menu item - Совпадений не найдено + Совпадений не найдено Ignore Ignore Spelling context menu item ?Пропускать - Пропустить + Пропустить Add To Dictionary @@ -7218,12 +7261,12 @@ Please choose a different file name. Search The Web Search The Web context menu item - Искать в Интернет + Искать в Интернет Look Up In Dictionary Look Up in Dictionary context menu item - Искать в словаре + Искать в словаре Open Link @@ -7234,7 +7277,7 @@ Please choose a different file name. Ignore Ignore Grammar context menu item ?Пропускать - Пропустить + Пропустить Spelling @@ -7244,12 +7287,12 @@ Please choose a different file name. Show Spelling and Grammar menu item title - Показать панель проверки правописания + Показать панель проверки правописания Hide Spelling and Grammar menu item title - Скрыть панель проверки правописания + Скрыть панель проверки правописания Check Spelling @@ -7374,22 +7417,22 @@ Please choose a different file name. Mute Button Media controller element - Кнопка "Отключить звук" + Кнопка «Отключить звук» Unmute Button Media controller element - Кнопка "Включить звук" + Кнопка «Включить звук» Play Button Media controller element - Кнопка "Воспроизведение" + Кнопка «Воспроизведение» Pause Button Media controller element - Кнопка "Пауза" + Кнопка «Пауза» Slider @@ -7404,12 +7447,12 @@ Please choose a different file name. Rewind Button Media controller element - Кнопка "Перемотка назад" + Кнопка «Перемотка назад» Return to Real-time Button Media controller element - Кнопка "Вернуть в реальное время" + Кнопка «Вернуть в реальное время» Elapsed Time @@ -7429,17 +7472,17 @@ Please choose a different file name. Fullscreen Button Media controller element - Кнопка "На весь экран" + Кнопка «На весь экран» Seek Forward Button Media controller element - Кнопка "Перемотка вперёд" + Кнопка «Перемотка вперёд» Seek Back Button Media controller element - Кнопка "Перемотка назад" + Кнопка «Перемотка назад» Audio element playback controls and status display @@ -7474,12 +7517,12 @@ Please choose a different file name. Movie time scrubber Media controller element - Перемотка + Перемотка Movie time scrubber thumb Media controller element - Позиция перемотки + Позиция перемотки Rewind movie @@ -7489,7 +7532,7 @@ Please choose a different file name. Return streaming movie to real-time Media controller element - Возвращает потоковое видео к воспроизведению в реальном времени + Возвращает потоковое видео к воспроизведению в реальном времени Current movie time @@ -7602,7 +7645,7 @@ Please choose a different file name. Commit - Передать + Подтвердить Done @@ -7806,11 +7849,11 @@ Please choose a different file name. Sequence ']]>' not allowed in content. - Последовательность "]]>" недопустима в содержимом. + Последовательность «]]>» недопустима в содержимом. Namespace prefix '%1' not declared - Префикс пространства имён "%1" не объявлен + Префикс пространства имён «%1» не объявлен Attribute redefined. @@ -7818,7 +7861,7 @@ Please choose a different file name. Unexpected character '%1' in public id literal. - Неожиданный символ "%1" в литерале открытого идентификатора. + Неожиданный символ «%1» в литерале открытого идентификатора. Invalid XML version string. @@ -7838,7 +7881,7 @@ Please choose a different file name. Standalone accepts only yes or no. - Псевдоатрибут "standalone" может принимать только значения "yes" или "no". + Псевдоатрибут «standalone» может принимать только значения «yes» или «no». Invalid attribute in XML declaration. @@ -7906,15 +7949,15 @@ Please choose a different file name. Reference to unparsed entity '%1'. - Ссылка на необработанный объект "%1". + Ссылка на необработанный объект «%1». Entity '%1' not declared. - Объект "%1" не объявлен. + Объект «%1» не объявлен. Reference to external entity '%1' in attribute value. - Ссылка на внешний объект "%1" в значении атрибута. + Ссылка на внешний объект «%1» в значении атрибута. Invalid character reference. @@ -7926,7 +7969,7 @@ Please choose a different file name. The standalone pseudo attribute must appear after the encoding. - Псевдоатрибут "standalone" должен находиться после указания кодировки. + Псевдоатрибут «standalone» должен находиться после указания кодировки. %1 is an invalid PUBLIC identifier. @@ -7953,7 +7996,7 @@ Please choose a different file name. The data of a processing instruction cannot contain the string %1 - Данные обрабатываемой инструкции не могут содержать строку "%1" + Данные обрабатываемой инструкции не могут содержать строку «%1» %1 is an invalid %2 @@ -7969,11 +8012,11 @@ Please choose a different file name. In the replacement string, %1 must be followed by at least one digit when not escaped. - В замещаемой строке "%1" должно сопровождаться как минимум одной цифрой, если неэкранировано. + В замещаемой строке «%1» должно сопровождаться как минимум одной цифрой, если неэкранировано. In the replacement string, %1 can only be used to escape itself or %2, not %3 - В замещаемой строке символ "%1" может использоваться только для экранирования самого себя или "%2", но не "%3" + В замещаемой строке символ «%1» может использоваться только для экранирования самого себя или «%2», но не «%3» %1 matches newline characters @@ -8165,7 +8208,7 @@ Please choose a different file name. At least one time component must appear after the %1-delimiter. - Как минимум одна компонента времени должна следовать за разделителем '%1'. + Как минимум одна компонента времени должна следовать за разделителем «%1». Dividing a value of type %1 by %2 (not-a-number) is not allowed. @@ -8289,7 +8332,7 @@ Please choose a different file name. %1 must be followed by %2 or %3, not at the end of the replacement string. - "%1" должно сопровождаться "%2" или "%3", но не в конце замещаемой строки. + «%1» должно сопровождаться «%2» или «%3», но не в конце замещаемой строки. %1 and %2 match the start and end of a line. @@ -8689,15 +8732,15 @@ Please choose a different file name. %1 has inheritance loop in its base type %2. - + У %1 зациклено наследование в его базовом типе %2. Circular inheritance of base type %1. - + Цикличное наследование базового типа %1. Circular inheritance of union %1. - + Цикличное наследование базового объединения %1. %1 is not allowed to derive from %2 by restriction as the latter defines it as final. @@ -8709,19 +8752,19 @@ Please choose a different file name. Base type of simple type %1 cannot be complex type %2. - + Базовым простого типа %1 не может быть сложный %2. Simple type %1 cannot have direct base type %2. - + У простого типа %1 %2 не может быть непосредственным базовым типом. Simple type %1 is not allowed to have base type %2. - + Недопустимо, чтобы простой тип %1 имел базовым %2. Simple type %1 can only have simple atomic type as base type. - + У простого типа %1 может быть только простой атомарный базовый тип. Simple type %1 cannot derive from %2 as the latter defines restriction as final. @@ -8729,11 +8772,11 @@ Please choose a different file name. Variety of item type of %1 must be either atomic or union. - + Виды типов элементов %1 должны быть или атомарными, или объединениями. Variety of member types of %1 must be atomic. - + Виды внутренних типов %1 должны быть атомарными. %1 is not allowed to derive from %2 by list as the latter defines it as final. @@ -8741,11 +8784,11 @@ Please choose a different file name. Simple type %1 is only allowed to have %2 facet. - + Простой тип %1 может иметь только фасет %2. Base type of simple type %1 must have variety of type list. - + Базовый тип простого типа %1 должен содержать какой-нибудь список. Base type of simple type %1 has defined derivation by restriction as final. @@ -8753,11 +8796,11 @@ Please choose a different file name. Item type of base type does not match item type of %1. - + Тип элемента базового типа не совпадает с типом элемента %1. Simple type %1 contains not allowed facet type %2. - + Простой тип %1 содержит недопустимый фасет типа %2. %1 is not allowed to derive from %2 by union as the latter defines it as final. @@ -8765,11 +8808,11 @@ Please choose a different file name. %1 is not allowed to have any facets. - + %1 не может имет никаких фасетов. Base type %1 of simple type %2 must have variety of union. - + Базовый тип %1 простого типа %2 должен содержать какое-то объединение. Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute. @@ -8777,171 +8820,171 @@ Please choose a different file name. Member type %1 cannot be derived from member type %2 of %3's base type %4. - + Внутренний тип %1 не может быть производным от типа %2, определённого в базовом типе типа %3 - %4. Derivation method of %1 must be extension because the base type %2 is a simple type. - + Метод наследования %1 должен быть «расширение», так как базовый тип %2 является простым. Complex type %1 has duplicated element %2 in its content model. - + Сложный тип %1 имеет повторяющийся элемент %2 в своей модели содержимого. Complex type %1 has non-deterministic content. - + Сложный тип %1 имеет недетерминированное содержимое. Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3. - + Атрибуты сложного типа %1 неверно дополняют атрибуты базового типа %2: %3. Content model of complex type %1 is not a valid extension of content model of %2. - + Модель содержимого сложного типа %1 неверно дополняет модель содержимого %2. Complex type %1 must have simple content. - + Сложный тип %1 должен иметь простое содержимое. Complex type %1 must have the same simple type as its base class %2. - + Сложный тип %1 должен содержать такой же простой тип, как и его базовый класс %2. Complex type %1 cannot be derived from base type %2%3. - + Сложный тип %1 не может быть производным от %2%3. Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3. - + Атрибуты сложного типа %1 не являются верным ограничением атрибутов базового типа %2: %3. Complex type %1 with simple content cannot be derived from complex base type %2. - + Сложный тип %1 с простым содержимым не может быть производным от сложного типа %2. Item type of simple type %1 cannot be a complex type. - + Простой тип %1 не может содержать элементов сложных типов. Member type of simple type %1 cannot be a complex type. - + Простой тип %1 не может определять сложные типы. %1 is not allowed to have a member type with the same name as itself. - + Не допустимо, чтобы %1 определял внутренний тип с таким же именем. %1 facet collides with %2 facet. - + Фасет %1 противоречит %2. %1 facet must have the same value as %2 facet of base type. - + Фасет %1 должен иметь такое же значение, как и фасет %2 базового типа. %1 facet must be equal or greater than %2 facet of base type. - + Фасет %1 должен быть не менее фасета %2 базового типа. %1 facet must be less than or equal to %2 facet of base type. - + Фасет %1 должен быть не более фасета %2 базового типа. %1 facet contains invalid regular expression - + Фасет %1 содержит неверное регулярное выражение Unknown notation %1 used in %2 facet. - + В фасете %2 используется неизвестное обозначение %1. %1 facet contains invalid value %2: %3. - + Фасет %1 содержит неверное значение %2: %3. %1 facet cannot be %2 or %3 if %4 facet of base type is %5. - + Фасет %1 не может быть %2 или %3, если фасет %4 базового типа равен %5. %1 facet cannot be %2 if %3 facet of base type is %4. - + Фасет %1 не может быть %2, если фасет %3 базового типа равен %4. %1 facet must be less than or equal to %2 facet. - + Фасет %1 должен быть не более фасета %2. %1 facet must be less than %2 facet of base type. - + Фасет %1 должен быть менее фасета %2 базового типа. %1 facet and %2 facet cannot appear together. - + Фасеты %1 и %2 не могут быть одновременно. %1 facet must be greater than %2 facet of base type. - + Фасет %1 должен быть более фасета %2 базового типа. %1 facet must be less than %2 facet. - + Фасет %1 должен быть менее фасета %2. %1 facet must be greater than or equal to %2 facet of base type. - + Фасет %1 должен быть не менее фасета %2 базового типа. Simple type contains not allowed facet %1. - + Простой тип содержит недопустимый фасет %1. %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list. - + Недопустимы фасеты %1, %2, %3, %4, %5 и %6 при наследовании списком. Only %1 and %2 facets are allowed when derived by union. - + При наследовании объединением доступны только фасеты %1 и %2. %1 contains %2 facet with invalid data: %3. - + %1 содержит фасет %2 с неверными данными: %3. Attribute group %1 contains attribute %2 twice. - + Группа атрибутов %1 содержит два атрибута %2. Attribute group %1 contains two different attributes that both have types derived from %2. - + Группа атрибутов %1 содержит два разных атрибута, производных от %2. Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3. - + Группа атрибутов %1 содержит атрибут %2, на значение которого наложено ограничение, но тип наследован от %3. Complex type %1 contains attribute %2 twice. - + Сложный тип %1 содержит два атрибута %2. Complex type %1 contains two different attributes that both have types derived from %2. - + Сложный тип %1 содержит два разных атрибута, производных от %2. Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3. - + Сложный тип %1 содержит атрибут %2, на значение которого наложено ограничение, но тип наследован от %3. Element %1 is not allowed to have a value constraint if its base type is complex. - + Элементу %1 недопустимо иметь ограничение на значения, если у его базовый тип сложный. Element %1 is not allowed to have a value constraint if its type is derived from %2. - + Элементу %1 недопустимо иметь ограничение на значения, если его тип производный от %2. Value constraint of element %1 is not of elements type: %2. - + Ограничение значения элемента %1 не типа элемента: %2. Element %1 is not allowed to have substitution group affiliation as it is no global element. @@ -8953,7 +8996,7 @@ Please choose a different file name. Value constraint of attribute %1 is not of attributes type: %2. - + Ограничение значения атрибута %1 не типа атрибута: %2. Attribute %1 has value constraint but has type derived from %2. @@ -9369,179 +9412,179 @@ Please choose a different file name. String content does not match the length facet. - + Содержимое строки не соответствует фасету length. String content does not match the minLength facet. - + Содержимое строки не соответствует фасету minLength. String content does not match the maxLength facet. - + Содержимое строки не соответствует фасету maxLength. String content does not match pattern facet. - + Содержимое строки не соответствует фасету pattern. String content is not listed in the enumeration facet. - + Содержимое строки отсутствует в фасете enumeration. Signed integer content does not match the maxInclusive facet. - + Знаковое целое не соответствует фасету maxInclusive. Signed integer content does not match the maxExclusive facet. - + Знаковое целое не соответствует фасету maxExclusive. Signed integer content does not match the minInclusive facet. - + Знаковое целое не соответствует фасету minInclusive. Signed integer content does not match the minExclusive facet. - + Знаковое целое не соответствует фасету minExclusive. Signed integer content is not listed in the enumeration facet. - + Знаковое целое отсутствует в фасете enumeration. Signed integer content does not match pattern facet. - + Знаковое целое не соответствует фасету pattern. Signed integer content does not match in the totalDigits facet. - + Знаковое целое не соответствует фасету totalDigits. Unsigned integer content does not match the maxInclusive facet. - + Беззнаковое целое не соответствует фасету maxInclusive. Unsigned integer content does not match the maxExclusive facet. - + Беззнаковое целое не соответствует фасету maxExclusive. Unsigned integer content does not match the minInclusive facet. - + Беззнаковое целое не соответствует фасету minInclusive. Unsigned integer content does not match the minExclusive facet. - + Беззнаковое целое не соответствует фасету minExclusive. Unsigned integer content is not listed in the enumeration facet. - + Беззнаковое целое отсутствует в фасете enumeration. Unsigned integer content does not match pattern facet. - + Беззнаковое целое не соответствует фасету pattern. Unsigned integer content does not match in the totalDigits facet. - + Беззнаковое целое не соответствует фасету totalDigits. Double content does not match the maxInclusive facet. - + Действительное число не соответствует фасету maxInclusive. Double content does not match the maxExclusive facet. - + Действительное число не соответствует фасету maxExclusive. Double content does not match the minInclusive facet. - + Действительное число не соответствует фасету minInclusive. Double content does not match the minExclusive facet. - + Действительное число не соответствует фасету minExclusive. Double content is not listed in the enumeration facet. - + Действительное число отсутствует в фасете enumeration. Double content does not match pattern facet. - + Действительное число не соответствует фасету pattern. Decimal content does not match in the fractionDigits facet. - + Десятичное не соответствует фасету fractionDigits. Decimal content does not match in the totalDigits facet. - + Десятичное не соответствует фасету totalDigits. Date time content does not match the maxInclusive facet. - + Дата-время не соответствует фасету maxInclusive. Date time content does not match the maxExclusive facet. - + Дата-время не соответствует фасету maxExclusive. Date time content does not match the minInclusive facet. - + Дата-время не соответствует фасету minInclusive. Date time content does not match the minExclusive facet. - + Дата-время не соответствует фасету minExclusive. Date time content is not listed in the enumeration facet. - + Дата-время отсутствует в фасете enumeration. Date time content does not match pattern facet. - + Дата-время не соответствует фасету pattern. Duration content does not match the maxInclusive facet. - + Длительность не соответствует фасету maxInclusive. Duration content does not match the maxExclusive facet. - + Длительность не соответствует фасету maxExclusive. Duration content does not match the minInclusive facet. - + Длительность не соответствует фасету minInclusive. Duration content does not match the minExclusive facet. - + Длительность не соответствует фасету minExclusive. Duration content is not listed in the enumeration facet. - + Длительность отсутствует в фасете enumeration. Duration content does not match pattern facet. - + Длительность не соответствует фасету pattern. Boolean content does not match pattern facet. - + Булевое число не соответствует фасету pattern. Binary content does not match the length facet. - + Двоичные данные не соответствуют фасету length. Binary content does not match the minLength facet. - + Двоичные данные не соответствуют фасету minLength. Binary content does not match the maxLength facet. - + Двоичные данные не соответствуют фасету maxLength. Binary content is not listed in the enumeration facet. - + Двоичные данные отсутствуют в фасете enumeration. Invalid QName content: %1. @@ -9549,43 +9592,43 @@ Please choose a different file name. QName content is not listed in the enumeration facet. - + Содержимое QName отсутствует в фасете enumeration. QName content does not match pattern facet. - + Содержимое QName не соответствует фасету pattern. Notation content is not listed in the enumeration facet. - + Содержимое Notation не перечислено в фасете enumeration. List content does not match length facet. - + Список не соответствует фасету length. List content does not match minLength facet. - + Список не соответствует фасету minLength. List content does not match maxLength facet. - + Список не соответствует фасету maxLength. List content is not listed in the enumeration facet. - + Содержимое списка не перечислено в фасете enumeration. List content does not match pattern facet. - + Содержимое списка не соответствует фасету pattern. Union content is not listed in the enumeration facet. - + Объединение не перечислено в фасете enumeration. Union content does not match pattern facet. - + Объединение не соответствует фасету pattern. Data of type %1 are not allowed to be empty. @@ -9753,7 +9796,7 @@ Please choose a different file name. ID value '%1' is not unique. - Значение ID "%1" неуникально. + Значение ID «%1» не уникально. '%1' attribute contains invalid QName content: %2. -- cgit v0.12 From d6a8beb9b15dc6cc6fe5d546d81c953e7f68520b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 19 Apr 2011 20:27:06 +0200 Subject: Fix compilation with symbian-armcc the case of the headers matter if you compile on linux Reviewed-by: Marius Storm-Olsen --- src/plugins/qmltooling/qmldbg_ost/qostdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h index ba1f443..e33cf2d 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h @@ -42,7 +42,7 @@ #ifndef QOSTDEVICE_H #define QOSTDEVICE_H -#include +#include QT_BEGIN_NAMESPACE -- cgit v0.12