From 0ba6f9b7a025aad325a3106c4abc2f48e226e531 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Thu, 3 May 2018 22:14:01 +0200 Subject: [PATCH] src: minor improvements for release * only reduce ideal thread count on windows * show export compile commands flag in description * not black in radio button --- .../data/gui/indexing_dialog/indexing_dialog.css | 2 +- .../QtProjectWizzardContentSelect.cpp | 11 ++++++----- src/lib_gui/utility/utilityApp.cpp | 13 +++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bin/app/data/gui/indexing_dialog/indexing_dialog.css b/bin/app/data/gui/indexing_dialog/indexing_dialog.css index aabffd53..ba7b5871 100644 --- a/bin/app/data/gui/indexing_dialog/indexing_dialog.css +++ b/bin/app/data/gui/indexing_dialog/indexing_dialog.css @@ -12,7 +12,7 @@ QRadioButton::indicator { } QRadioButton::indicator:checked { - background: black; + background: #444; } #topHalf { diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp index 654049d6..f76fbc6e 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentSelect.cpp @@ -49,15 +49,15 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row) // define descriptions for each kind of Source Group m_sourceGroupTypeDescriptions[SOURCE_GROUP_C_EMPTY] = "Create a new Sourcetrail Source Group by defining which C files will be indexed."; m_sourceGroupTypeDescriptions[SOURCE_GROUP_CPP_EMPTY] = "Create a new Sourcetrail Source Group by defining which C++ files will be indexed."; - m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_CDB] = "Create a Source Group from an existing Compilation Database (compile_commands.json). They can be created from Make and " - "CMake projects. Have a look at the " - "documentation to find out more."; + m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_CDB] = "Create a Source Group from an existing Compilation Database (compile_commands.json). " + "They can be exported from CMake
(-D CMAKE_EXPORT_COMPILE_COMMANDS=1) and Make projects. Have a look at the " + "documentation."; m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_VS] = "Create a new Source Group from an existing Visual Studio Solution file. " "Note: Requires a running Visual Studio instance with the " "Visual Studio plugin installed."; m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_EMPTY] = "Create a new Sourcetrail Source Group by defining which Java files will be indexed."; - m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_MAVEN] = "Create a new Source Group from an existing Maven project."; - m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_GRADLE] = "Create a new Source Group from an existing Gradle project."; + m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_MAVEN] = "Create a new Source Group from an existing Maven project."; + m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_GRADLE] = "Create a new Source Group from an existing Gradle project."; QVBoxLayout* vlayout = new QVBoxLayout(); vlayout->setContentsMargins(0, 30, 0, 0); @@ -156,6 +156,7 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row) m_description->setWordWrap(true); m_description->setOpenExternalLinks(true); m_description->setObjectName("sourceGroupDescription"); + m_description->setTextInteractionFlags(Qt::TextSelectableByMouse); layout->addWidget(m_description, 1, QtProjectWizzardWindow::BACK_COL); m_title = new QLabel("Source Group Types"); diff --git a/src/lib_gui/utility/utilityApp.cpp b/src/lib_gui/utility/utilityApp.cpp index a5612b35..7f2030ad 100644 --- a/src/lib_gui/utility/utilityApp.cpp +++ b/src/lib_gui/utility/utilityApp.cpp @@ -93,9 +93,9 @@ std::string utility::executeProcessUntilNoOutput(const std::string& command, con } int utility::executeProcessAndGetExitCode( - const std::wstring& commandPath, - const std::vector& commandArguments, - const FilePath& workingDirectory, + const std::wstring& commandPath, + const std::vector& commandArguments, + const FilePath& workingDirectory, const int timeout ){ QProcess process; @@ -156,7 +156,12 @@ OsType utility::getOsType() int utility::getIdealThreadCount() { - return std::max(1, QThread::idealThreadCount() - 1); + int threadCount = QThread::idealThreadCount(); + if (getOsType() == OS_WINDOWS) + { + threadCount -= 1; + } + return std::max(1, threadCount); } bool utility::saveLicense(const License* license)