aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-09-30 13:42:00 +0200
committerEike Ziller <eike.ziller@qt.io>2019-09-30 13:42:00 +0200
commit021baeca92b62f9845240e512e92332a3bcd954e (patch)
tree6e20b280576284cadc0f7e2e437952daed435e2e
parent161539e21ccca5909fda958b796c602b775226d0 (diff)
parent0c85de69dbe46a46af7f3dbe607b57a6d0db5eb3 (diff)
Merge remote-tracking branch 'origin/4.10' into 4.11
-rw-r--r--.gitmodules5
m---------3rdparty/extra-cmake-modules0
m---------3rdparty/kuserfeedback0
-rw-r--r--common/scopedsettingsgroupsetter.h6
-rw-r--r--common/utils.h8
-rw-r--r--datasources/examplesdatasource.cpp3
-rw-r--r--datasources/qmldesignerusagetimesource.cpp2
-rw-r--r--datasources/qtclicensesource.cpp3
-rw-r--r--services/datasubmitter.cpp3
-rw-r--r--ui/encouragementwidget.cpp6
-rw-r--r--ui/encouragementwidget.h7
-rw-r--r--ui/outputpane.cpp6
-rw-r--r--ui/outputpane.h6
-rw-r--r--ui/usagestatisticpage.cpp3
-rw-r--r--ui/usagestatisticwidget.cpp3
-rw-r--r--usagestatistic.pro86
16 files changed, 37 insertions, 110 deletions
diff --git a/.gitmodules b/.gitmodules
index 5815ead..0a464e5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,3 @@
[submodule "3rdparty/kuserfeedback"]
path = 3rdparty/kuserfeedback
- url = https://git.qt.io/telemetry/kuserfeedback.git
-[submodule "3rdparty/extra-cmake-modules"]
- path = 3rdparty/extra-cmake-modules
- url = https://github.com/KDE/extra-cmake-modules.git
+ url = https://git.qt.io/aportale/kuserfeedback.git
diff --git a/3rdparty/extra-cmake-modules b/3rdparty/extra-cmake-modules
deleted file mode 160000
-Subproject 6faff48245c213a472da2e28b2c9ece31177c68
diff --git a/3rdparty/kuserfeedback b/3rdparty/kuserfeedback
-Subproject 463cd3dadde31cb007d3385df5b1e2d76fb3dc9
+Subproject 7963324f3d269befa1574c16b13944ba99114d2
diff --git a/common/scopedsettingsgroupsetter.h b/common/scopedsettingsgroupsetter.h
index c66f318..adcaa61 100644
--- a/common/scopedsettingsgroupsetter.h
+++ b/common/scopedsettingsgroupsetter.h
@@ -43,12 +43,6 @@ class ScopedSettingsGroupSetter
public:
ScopedSettingsGroupSetter(QSettings &settings, const std::initializer_list<QString> &prefixes);
- ScopedSettingsGroupSetter(const ScopedSettingsGroupSetter &) = delete;
- ScopedSettingsGroupSetter(ScopedSettingsGroupSetter &&) = delete;
-
- ScopedSettingsGroupSetter &operator =(const ScopedSettingsGroupSetter &) = delete;
- ScopedSettingsGroupSetter &operator =(ScopedSettingsGroupSetter &&) = delete;
-
~ScopedSettingsGroupSetter();
static ScopedSettingsGroupSetter forDataSource(const KUserFeedback::AbstractDataSource &ds,
diff --git a/common/utils.h b/common/utils.h
index a2eb689..6bf5fd4 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -26,7 +26,9 @@
#include <QtCore/QString>
-namespace UsageStatistic::Internal::Utils {
+namespace UsageStatistic {
+namespace Internal {
+namespace Utils {
//! Secret key for authentication defined during building
constexpr auto secret() { return USP_AUTH_KEY; }
@@ -34,4 +36,6 @@ constexpr auto secret() { return USP_AUTH_KEY; }
//! Base server URL defined during building
constexpr auto serverUrl() { return USP_SERVER_URL; }
-} // namespace UsageStatistic::Internal::Utils
+} // namespace Utils
+} // namespace Internal
+} // namespace UsageStatistic
diff --git a/datasources/examplesdatasource.cpp b/datasources/examplesdatasource.cpp
index 7d5e909..8dc9b2d 100644
--- a/datasources/examplesdatasource.cpp
+++ b/datasources/examplesdatasource.cpp
@@ -105,7 +105,8 @@ void ExamplesDataSource::updateOpenedExamples()
for (auto project : ProjectExplorer::SessionManager::projects()) {
if (project) {
auto projectPath = QDir::fromNativeSeparators(project->projectFilePath().toString());
- if (auto match = re.match(projectPath); match.hasMatch()) {
+ const auto match = re.match(projectPath);
+ if (match.hasMatch()) {
m_examplePaths << match.captured(examplePathGroupName());
}
}
diff --git a/datasources/qmldesignerusagetimesource.cpp b/datasources/qmldesignerusagetimesource.cpp
index 6f983e7..6bb4a32 100644
--- a/datasources/qmldesignerusagetimesource.cpp
+++ b/datasources/qmldesignerusagetimesource.cpp
@@ -49,7 +49,7 @@ QmlDesignerUsageTimeSource::QmlDesignerUsageTimeSource()
: TimeUsageSourceBase(QStringLiteral("qmlDesignerUsageTime"))
{
connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged,
- this, [this](auto &&modeId){
+ this, [this](Core::Id modeId){
updateTrackingState(QString::fromUtf8(modeId.name().toLower())); });
connect(Core::EditorManager::instance(), &Core::EditorManager::currentEditorChanged,
diff --git a/datasources/qtclicensesource.cpp b/datasources/qtclicensesource.cpp
index 3bf7907..bee2c8c 100644
--- a/datasources/qtclicensesource.cpp
+++ b/datasources/qtclicensesource.cpp
@@ -81,7 +81,8 @@ static bool hasEvaluationLicense(ExtensionSystem::IPlugin *plugin)
static QString licenseString()
{
const auto plugins = ExtensionSystem::PluginManager::plugins();
- if (auto it = std::find_if(plugins.begin(), plugins.end(), &isLicenseChecker); it != plugins.end()) {
+ const auto it = std::find_if(plugins.begin(), plugins.end(), &isLicenseChecker);
+ if (it != plugins.end()) {
return hasEvaluationLicense((*it)->plugin()) ? evaluationStr: commercialStr;
}
diff --git a/services/datasubmitter.cpp b/services/datasubmitter.cpp
index ecdab32..ea8d2c4 100644
--- a/services/datasubmitter.cpp
+++ b/services/datasubmitter.cpp
@@ -49,7 +49,8 @@ QNetworkRequest DataSubmitter::dataRequest() const
{
QNetworkRequest request(serverUrl());
- if (auto versionString = makeVersionString(); !versionString.isEmpty()) {
+ const auto versionString = makeVersionString();
+ if (!versionString.isEmpty()) {
request.setHeader(QNetworkRequest::UserAgentHeader, versionString);
}
diff --git a/ui/encouragementwidget.cpp b/ui/encouragementwidget.cpp
index b1a84bc..457422e 100644
--- a/ui/encouragementwidget.cpp
+++ b/ui/encouragementwidget.cpp
@@ -31,7 +31,8 @@
#include "usagestatisticconstants.h"
-namespace UsageStatistic::Internal {
+namespace UsageStatistic {
+namespace Internal {
using namespace KUserFeedback;
@@ -96,4 +97,5 @@ void EncouragementWidget::onProviderChanged(const std::shared_ptr<Provider> &p)
EncouragementWidget::~EncouragementWidget() = default;
-} // namespace UsageStatistic::Internal
+} // namespace Internal
+} // namespace UsageStatistic
diff --git a/ui/encouragementwidget.h b/ui/encouragementwidget.h
index 6d299d0..6386a54 100644
--- a/ui/encouragementwidget.h
+++ b/ui/encouragementwidget.h
@@ -31,7 +31,8 @@ class Provider;
class FeedbackConfigUiController;
}
-namespace UsageStatistic::Internal {
+namespace UsageStatistic {
+namespace Internal {
namespace Ui { class EncouragementWidget; }
@@ -64,5 +65,5 @@ private:
std::unique_ptr<KUserFeedback::FeedbackConfigUiController> m_controller;
};
-} // namespace UsageStatistic::Internal
-
+} // namespace Internal
+} // namespace UsageStatistic
diff --git a/ui/outputpane.cpp b/ui/outputpane.cpp
index a635815..3529ca3 100644
--- a/ui/outputpane.cpp
+++ b/ui/outputpane.cpp
@@ -30,7 +30,8 @@
#include "encouragementwidget.h"
-namespace UsageStatistic::Internal {
+namespace UsageStatistic {
+namespace Internal {
OutputPane::OutputPane() = default;
@@ -116,4 +117,5 @@ void OutputPane::setProvider(std::shared_ptr<KUserFeedback::Provider> provider)
Q_EMIT providerChanged(m_provider);
}
-} // namespace UsageStatistic::Internal
+} // namespace Internal
+} // namespace UsageStatistic
diff --git a/ui/outputpane.h b/ui/outputpane.h
index 3965db6..039b3f2 100644
--- a/ui/outputpane.h
+++ b/ui/outputpane.h
@@ -37,7 +37,8 @@ QT_END_NAMESPACE
namespace KUserFeedback { class Provider; }
-namespace UsageStatistic::Internal {
+namespace UsageStatistic {
+namespace Internal {
class EncouragementWidget;
@@ -88,6 +89,7 @@ private: // Data
QPointer<QWidget> m_outputPaneWidget;
};
-} // namespace UsageStatistic::Internal
+} // namespace Internal
+} // namespace UsageStatistic
Q_DECLARE_METATYPE(std::shared_ptr<KUserFeedback::Provider>)
diff --git a/ui/usagestatisticpage.cpp b/ui/usagestatisticpage.cpp
index 10de382..a81fc87 100644
--- a/ui/usagestatisticpage.cpp
+++ b/ui/usagestatisticpage.cpp
@@ -55,7 +55,8 @@ static void applyDataSourcesActiveStatuses(const QHash<QString, bool> &statuses,
{
for (auto &&ds : provider.dataSources()) {
if (ds) {
- if (auto it = statuses.find(ds->id()); it != std::end(statuses)) {
+ const auto it = statuses.find(ds->id());
+ if (it != std::end(statuses)) {
ds->setActive(*it);
}
}
diff --git a/ui/usagestatisticwidget.cpp b/ui/usagestatisticwidget.cpp
index 5d9f692..6c65821 100644
--- a/ui/usagestatisticwidget.cpp
+++ b/ui/usagestatisticwidget.cpp
@@ -100,7 +100,8 @@ static auto dataSourceToItem(const AbstractDataSource &ds,
auto item = std::make_unique<QListWidgetItem>(ds.name());
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
- if (auto it = activeStatusesById.find(ds.id()); it != std::end(activeStatusesById)) {
+ const auto it = activeStatusesById.find(ds.id());
+ if (it != std::end(activeStatusesById)) {
item->setCheckState(*it ? Qt::Checked : Qt::Unchecked);
} else {
item->setCheckState(Qt::Checked);
diff --git a/usagestatistic.pro b/usagestatistic.pro
index e027b41..f9fd69d 100644
--- a/usagestatistic.pro
+++ b/usagestatistic.pro
@@ -1,8 +1,6 @@
DEFINES += USAGESTATISTIC_LIBRARY
-KUSERFEEDBACK_INSTALL_PATH = "$${OUT_PWD}/kuserfeedback"
-
-INCLUDEPATH *= "$$shell_path($${KUSERFEEDBACK_INSTALL_PATH}/include)" "$${PWD}"
+INCLUDEPATH *= "$${PWD}"
CONFIG += c++1z
QMAKE_CXXFLAGS *= -Wall
@@ -89,89 +87,11 @@ QTC_PLUGIN_RECOMMENDS += \
###### End _dependencies.pri contents ######
-!build_pass|win32 {
- EXTRA_CMAKE_MODULES_BUILD_PATH = "$${OUT_PWD}/extra-cmake-modules/build"
- EXTRA_CMAKE_MODULES_SOURCE_PATH = "$${PWD}/3rdparty/extra-cmake-modules"
- EXTRA_CMAKE_MODULES_INSTALL_PATH = "$${OUT_PWD}/extra-cmake-modules"
-
- # Configure extra-cmake-modules
-
- # Create build directory, in case if CMake won't be able do that
- system("$$sprintf($$QMAKE_MKDIR_CMD, $$shell_path($${EXTRA_CMAKE_MODULES_BUILD_PATH}))")
-
- EXTRA_CMAKE_MODULES_CMAKE_CMD = \
- "$$QMAKE_CD $$system_quote($$shell_path($${EXTRA_CMAKE_MODULES_BUILD_PATH})) && \
- cmake -DCMAKE_INSTALL_PREFIX:PATH=$$system_quote($$shell_path($${EXTRA_CMAKE_MODULES_INSTALL_PATH})) \
- $$system_quote($$shell_path($${EXTRA_CMAKE_MODULES_SOURCE_PATH}))"
- message("$${EXTRA_CMAKE_MODULES_CMAKE_CMD}")
- system("$${EXTRA_CMAKE_MODULES_CMAKE_CMD}")
-
- # "Build" extra-cmake-modules first time. This step is required to configure KUserFeedback
- EXTRA_CMAKE_MODULES_BUILD_CMD = "cmake --build $$system_quote($$shell_path($${EXTRA_CMAKE_MODULES_BUILD_PATH})) --target install"
- message("$${EXTRA_CMAKE_MODULES_BUILD_CMD}")
- system("$${EXTRA_CMAKE_MODULES_BUILD_CMD}")
-
- # Configure KUserFeedback
- KUSERFEEDBACK_BUILD_PATH = "$${OUT_PWD}/kuserfeedback/build"
- KUSERFEEDBACK_SOURCE_PATH = "$${PWD}/3rdparty/kuserfeedback"
-
- CMAKE_PREFIX_PATHS = "$$shell_path($$[QT_INSTALL_LIBS]/cmake);$$shell_path($${EXTRA_CMAKE_MODULES_INSTALL_PATH}/share/ECM/cmake)"
-
- BUILD_TYPE = Debug
- CONFIG(release, debug|release): BUILD_TYPE = Release
-
- KUSERFEEDBACK_DEFINES = \
- -DCMAKE_BUILD_TYPE=$${BUILD_TYPE}
-
- macos: KUSERFEEDBACK_DEFINES *= -DCMAKE_OSX_DEPLOYMENT_TARGET=$${QMAKE_MACOSX_DEPLOYMENT_TARGET}
-
- KUSERFEEDBACK_COMPONENTS = \
- -DBUILD_SHARED_LIBS=OFF \
- -DENABLE_SURVEY_TARGET_EXPRESSIONS=OFF \
- -DENABLE_PHP=OFF \
- -DENABLE_PHP_UNIT=OFF \
- -DENABLE_TESTING=OFF \
- -DENABLE_DOCS=OFF \
- -DENABLE_CONSOLE=OFF \
- -DENABLE_CLI=OFF \
- -DBUILD_SHARED_LIBS=OFF
-
- # Create build directory, in case if CMake won't be able do that
- system("$$sprintf($$QMAKE_MKDIR_CMD, $$shell_path($${KUSERFEEDBACK_BUILD_PATH}))")
-
- KUSERFEEDBACK_CMAKE_CMD = \
- "$$QMAKE_CD $$system_quote($$shell_path($${KUSERFEEDBACK_BUILD_PATH})) && \
- cmake $${KUSERFEEDBACK_COMPONENTS} \
- $${KUSERFEEDBACK_DEFINES} \
- -DCMAKE_INSTALL_PREFIX:PATH=$$system_quote($$shell_path($${KUSERFEEDBACK_INSTALL_PATH})) \
- -DCMAKE_PREFIX_PATH=$$system_quote($${CMAKE_PREFIX_PATHS}) \
- -DKDE_INSTALL_LIBDIR=lib \
- $$system_quote($$shell_path($${KUSERFEEDBACK_SOURCE_PATH}))"
- message("$${KUSERFEEDBACK_CMAKE_CMD}")
- system("$${KUSERFEEDBACK_CMAKE_CMD}")
-
- buildextracmakemodules.commands = "$${EXTRA_CMAKE_MODULES_BUILD_CMD}"
-
- buildkuserfeedback.commands = "cmake --build $$system_quote($$shell_path($${KUSERFEEDBACK_BUILD_PATH})) --target install"
- buildkuserfeedback.depends = buildextracmakemodules
-
- # Force build order. Without this flag Make tries building targets
- # in a random order when -jN specified.
- # All targets themselves (but not the plugin itself) will be built in parallel
- notParallel.target = .NOTPARALLEL
-
- QMAKE_EXTRA_TARGETS += buildextracmakemodules buildkuserfeedback notParallel
- PRE_TARGETDEPS += buildkuserfeedback
-}
+# KUserFeedback
+include(3rdparty/kuserfeedback/kuserfeedback.pri)
include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri)
-# Put it here to use qtLibraryTargetName function without extra hacks
-LIBS *= -L"$$shell_path($${KUSERFEEDBACK_INSTALL_PATH}/lib)" \
- -l$$qtLibraryTargetName(KUserFeedbackCore) \
- -l$$qtLibraryTargetName(KUserFeedbackWidgets) \
- -l$$qtLibraryTargetName(KUserFeedbackCommon)
-
FORMS += \
ui/usagestatisticwidget.ui \
ui/encouragementwidget.ui