From b0e16bdd187848df082c7d895f2ca5e78b6f6738 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Mon, 22 Aug 2016 17:55:47 +0200 Subject: qtquickcontrols-tableview.qdoc: unify wording of documentation This way it fits better to the other entries. Change-Id: I099ceaec4ecf80d267cb431815d63597e004fef1 Reviewed-by: Shawn Rutledge --- src/controls/doc/src/qtquickcontrols-tableview.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controls/doc/src/qtquickcontrols-tableview.qdoc b/src/controls/doc/src/qtquickcontrols-tableview.qdoc index 92efcff7..b5fc4e05 100644 --- a/src/controls/doc/src/qtquickcontrols-tableview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-tableview.qdoc @@ -223,8 +223,8 @@ \list \li function \b clear() - deselects all rows \li function \b selectAll() - selects all rows - \li function \b select(from, to) - select a range - \li function \b deselect(from, to) - de-selects a range + \li function \b select(from, to) - selects a range + \li function \b deselect(from, to) - deselects a range \li function \b forEach(callback) - iterates over all selected rows \li function \b contains(index) - checks whether the selection includes the given index \li signal \b selectionChanged() - the current row selection changed -- cgit v1.2.1 From 768f70e05ff4d8521f439d1e9410750bdf98b584 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 5 Oct 2016 14:42:44 +0200 Subject: Make FileDialog remember the folder Task-number: QTBUG-54310 Change-Id: I9beef4d983c5fcea4e969cae5090686dfc1d37c6 Reviewed-by: Shawn Rutledge --- src/dialogs/qquickabstractfiledialog.cpp | 16 ++++++++++++++-- src/dialogs/qquickabstractfiledialog_p.h | 3 +++ src/dialogs/qquickplatformfiledialog.cpp | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/dialogs/qquickabstractfiledialog.cpp b/src/dialogs/qquickabstractfiledialog.cpp index 26c7218b..4f0cdb9a 100644 --- a/src/dialogs/qquickabstractfiledialog.cpp +++ b/src/dialogs/qquickabstractfiledialog.cpp @@ -112,20 +112,32 @@ QUrl QQuickAbstractFileDialog::folder() const return m_options->initialDirectory(); } -void QQuickAbstractFileDialog::setFolder(const QUrl &f) +static QUrl fixupFolder(const QUrl &f) { QString lf = f.toLocalFile(); while (lf.startsWith("//")) lf.remove(0, 1); if (lf.isEmpty()) lf = QDir::currentPath(); - QUrl u = QUrl::fromLocalFile(lf); + return QUrl::fromLocalFile(lf); +} + +void QQuickAbstractFileDialog::setFolder(const QUrl &f) +{ + QUrl u = fixupFolder(f); if (m_dlgHelper) m_dlgHelper->setDirectory(u); m_options->setInitialDirectory(u); emit folderChanged(); } +void QQuickAbstractFileDialog::updateFolder(const QUrl &f) +{ + QUrl u = fixupFolder(f); + m_options->setInitialDirectory(u); + emit folderChanged(); +} + void QQuickAbstractFileDialog::setNameFilters(const QStringList &f) { m_options->setNameFilters(f); diff --git a/src/dialogs/qquickabstractfiledialog_p.h b/src/dialogs/qquickabstractfiledialog_p.h index 8f094783..f6796d73 100644 --- a/src/dialogs/qquickabstractfiledialog_p.h +++ b/src/dialogs/qquickabstractfiledialog_p.h @@ -114,6 +114,9 @@ Q_SIGNALS: void sidebarVisibleChanged(); void shortcutsChanged(); +protected Q_SLOTS: + void updateFolder(const QUrl &f); + protected: void updateModes(); void addShortcut(const QString &name, const QString &visibleName, const QString &path); diff --git a/src/dialogs/qquickplatformfiledialog.cpp b/src/dialogs/qquickplatformfiledialog.cpp index 2f200b80..aff0a694 100644 --- a/src/dialogs/qquickplatformfiledialog.cpp +++ b/src/dialogs/qquickplatformfiledialog.cpp @@ -210,7 +210,7 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() if (!m_dlgHelper) return m_dlgHelper; m_dlgHelper->setOptions(m_options); - connect(m_dlgHelper, SIGNAL(directoryEntered(QUrl)), this, SIGNAL(folderChanged())); + connect(m_dlgHelper, SIGNAL(directoryEntered(QUrl)), this, SLOT(updateFolder(QUrl))); connect(m_dlgHelper, SIGNAL(filterSelected(QString)), this, SIGNAL(filterSelected())); connect(m_dlgHelper, SIGNAL(accept()), this, SLOT(accept())); connect(m_dlgHelper, SIGNAL(reject()), this, SLOT(reject())); -- cgit v1.2.1 From 094ad30c94a72784449f43ef06d2172d644ab0fd Mon Sep 17 00:00:00 2001 From: Oleg Yadrov Date: Thu, 27 Oct 2016 14:02:39 -0700 Subject: Calendar: fix date selection if system time zone is set to DST Date() constructor uses local time. E.g. in Brazil Oct-21-2012 is the start of daylight saving time, thus local dates at Oct-21-2012 between 00:00 and 01:00 do not exist there, so new Date(2012,10,21) returns Oct-20-2012 23:00, but new Date(2012,10,21,1) returns Oct-21-2012 00:00. 1 hour is enough to "jump over" the lost hour, but just in case we use 12. Task-number: QTBUG-54559 Change-Id: I35e1b69868d27dd98f78c4d57b3128a51b3e4b5e Reviewed-by: Edward Welbourne Reviewed-by: Mitch Curtis --- src/controls/Calendar.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controls/Calendar.qml b/src/controls/Calendar.qml index b5dadc0b..fe47b8a3 100644 --- a/src/controls/Calendar.qml +++ b/src/controls/Calendar.qml @@ -215,7 +215,9 @@ Control { */ property CalendarModel __model: CalendarModel { locale: calendar.__locale - visibleDate: new Date(visibleYear, visibleMonth, 1) + + // TODO: don't set the hour when QTBUG-56787 is fixed + visibleDate: new Date(visibleYear, visibleMonth, 1, 12) } style: Settings.styleComponent(Settings.style, "CalendarStyle.qml", calendar) -- cgit v1.2.1 From a650a999ecac4fba95a430e5d9d85b4ad812ca50 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 10 Nov 2016 13:44:11 +0100 Subject: test: stablize extras::Tests_PieMenu Task-number: QTBUG-53520 Change-Id: I0a38467a873bac8104b2e1fba7f7018f236673e6 Reviewed-by: Mitch Curtis --- tests/auto/extras/data/tst_piemenu.qml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/auto/extras/data/tst_piemenu.qml b/tests/auto/extras/data/tst_piemenu.qml index d709f513..89b8e96f 100644 --- a/tests/auto/extras/data/tst_piemenu.qml +++ b/tests/auto/extras/data/tst_piemenu.qml @@ -246,6 +246,8 @@ Item { actionSignalSpy.clear(); } } + + pieMenuComponent.destroy() } function test_selectionAngle_data() { @@ -377,6 +379,8 @@ Item { mouseMove(root, data.mouseX, data.mouseY); compare(pieMenu.selectionAngle, data.expectedAngle); compare(pieMenu.currentIndex, data.expectedCurrentIndex); + + pieMenuComponent.destroy() } function test_sectionAngles_data() { @@ -420,6 +424,8 @@ Item { compare(pieMenu.__protectedScope.sectionStartAngle(data.section), data.expectedSectionStartAngle); compare(pieMenu.__protectedScope.sectionCenterAngle(data.section), data.expectedSectionCenterAngle); compare(pieMenu.__protectedScope.sectionEndAngle(data.section), data.expectedSectionEndAngle); + + pieMenuComponent.destroy() } function test_bounds_data() { @@ -497,6 +503,8 @@ Item { // Angles shouldn't change. compare(pieMenu.__style.startAngle, originalStartAngle); compare(pieMenu.__style.endAngle, originalEndAngle); + + pieMenuComponent.destroy() } function test_hideItem_data() { @@ -561,6 +569,8 @@ Item { actionSignalSpy.clear(); } + + pieMenuComponent.destroy() } function test_addItem() { @@ -596,6 +606,8 @@ Item { pieMenu.removeItem(pieMenu.menuItems[pieMenu.menuItems.length - 1]); compare(pieMenu.menuItems.length, originalLength - (i + 1)); } + + pieMenuComponent.destroy() } function debugMousePosition(pieMenu, mouseX, mouseY, positionText) { @@ -678,6 +690,8 @@ Item { compare(pieMenu.currentIndex, expectedCurrentIndex, data[i].name + ": current index should be " + expectedCurrentIndex + " when mouse is at " + mouseX + ", " + mouseY); } + + pieMenuComponent.destroy() } function test_QTRD3027() { @@ -708,6 +722,8 @@ Item { mouseMove(root, 100, 98) compare(pieMenu.currentIndex, -1) compare(selectedAngleChangedSpy.count, 0) + + pieMenuComponent.destroy() } function test_rotatedBoundingItem() { @@ -732,6 +748,8 @@ Item { mouseClick(root, 230, 145); compare(actionSignalSpy.count, 1); compare(actionSignalSpy.signalArguments[0][0], 0); + + pieMenuComponent.destroy() } function test_boundingItem() { @@ -763,6 +781,8 @@ Item { container.width = oldContainerWidth; container.height = oldContainerHeight; + + pieMenuComponent.destroy() } function test_longPressTriggerOnClick() { @@ -793,6 +813,8 @@ Item { compare(pieMenu.visible, false); compare(pieMenu.__mouseThief.receivedPressEvent, false); compare(pieMenu.__protectedScope.pressedIndex, -1); + + pieMenuComponent.destroy() } function test_keepMenuOpenWhenTriggered() { @@ -823,6 +845,8 @@ Item { tryCompare(pieMenu, "visible", true); compare(actionSignalSpy.count, 1); compare(actionSignalSpy.signalArguments[0][0], 2); + + pieMenuComponent.destroy() } function test_pressedIndex() { @@ -846,6 +870,8 @@ Item { compare(actionSignalSpy.count, 1); compare(actionSignalSpy.signalArguments[0][0], 0); compare(pieMenu.__protectedScope.pressedIndex, -1); + + pieMenuComponent.destroy() } } } -- cgit v1.2.1 From fccb5baf490b9a8c561a01f30b4992236e3a2060 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 3 Nov 2016 18:21:46 +0100 Subject: remove dependencies from sync.profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the CI obtains them from the qt5 super repo nowadays. Change-Id: Iaf03da27ec5ab4e901672439801be1929676533a Reviewed-by: Jędrzej Nowacki --- sync.profile | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sync.profile b/sync.profile index 686e079c..dfc1d5d6 100644 --- a/sync.profile +++ b/sync.profile @@ -2,16 +2,3 @@ ); %moduleheaders = ( # restrict the module headers to those found in relative path ); -# Module dependencies. -# Every module that is required to build this module should have one entry. -# Each of the module version specifiers can take one of the following values: -# - A specific Git revision. -# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) -# - an empty string to use the same branch under test (dependencies will become "refs/heads/master" if we are in the master branch) -# -%dependencies = ( - "qtbase" => "", - "qtdeclarative" => "", - "qtxmlpatterns" => "", - "qtgraphicaleffects" => "" -); -- cgit v1.2.1