src: minor improvements for release

* only reduce ideal thread count on windows
* show export compile commands flag in description
* not black in radio button
This commit is contained in:
Eberhard Graether
2018-05-03 22:14:01 +02:00
parent f5a4ad1db0
commit 0ba6f9b7a0
3 changed files with 16 additions and 10 deletions
@@ -12,7 +12,7 @@ QRadioButton::indicator {
}
QRadioButton::indicator:checked {
background: black;
background: #444;
}
#topHalf {
@@ -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 <a href=\"https://sourcetrail.com/documentation/#CreateAProjectFromCompilationDatabase\">"
"documentation</a> 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<br />(-D CMAKE_EXPORT_COMPILE_COMMANDS=1) and Make projects. Have a look at the <a href=\"https://sourcetrail.com/documentation/#CreateAProjectFromCompilationDatabase\">"
"documentation</a>.";
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_VS] = "Create a new Source Group from an existing Visual Studio Solution file. "
"<b>Note: Requires a running Visual Studio instance with the "
"<a href=\"https://sourcetrail.com/documentation/index.html#VisualStudio\">Visual Studio plugin</a> 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");
+9 -4
View File
@@ -93,9 +93,9 @@ std::string utility::executeProcessUntilNoOutput(const std::string& command, con
}
int utility::executeProcessAndGetExitCode(
const std::wstring& commandPath,
const std::vector<std::wstring>& commandArguments,
const FilePath& workingDirectory,
const std::wstring& commandPath,
const std::vector<std::wstring>& 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)