diff --git a/CMakeLists.txt b/CMakeLists.txt index fd24771b..b60eaaa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,10 +170,12 @@ find_package(Boost 1.67 COMPONENTS system program_options filesystem date_time R # Qt --------------------------------------------------------------------------- -find_package(Qt5 COMPONENTS Widgets PrintSupport Network Svg REQUIRED) +set (QT_MIN_VERSION "5.12.0") +set (QT_MIN_VERSION_HEX 0x051200) +find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS Widgets PrintSupport Network Svg REQUIRED) if (WIN32) - find_package(Qt5 COMPONENTS WinExtras REQUIRED) + find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS WinExtras REQUIRED) endif() if(Qt5Widgets_FOUND) @@ -183,6 +185,18 @@ if(Qt5Widgets_FOUND) if (Qt5_POSITION_INDEPENDENT_CODE) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() + + # The following define makes your compiler emit warnings if you use + # any feature of Qt which as been marked as deprecated (the exact warnings + # depend on your compiler). Please consult the documentation of the + # deprecated API in order to know how to port your code away from it. + add_definitions (-DQT_DEPRECATED_WARNINGS) + + # You can also make your code fail to compile if you use deprecated APIs. + # In order to do so, uncomment the following line. + # You can also select to disable deprecated APIs only up to a certain version of Qt. + #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=${QT_MIN_VERSION_HEX} # disables all the APIs deprecated at or before the specified Qt version + add_definitions (-DQT_DISABLE_DEPRECATED_BEFORE=${QT_MIN_VERSION_HEX}) endif() diff --git a/src/lib/utility/file/FilePath.cpp b/src/lib/utility/file/FilePath.cpp index 955159d3..a32bfbba 100644 --- a/src/lib/utility/file/FilePath.cpp +++ b/src/lib/utility/file/FilePath.cpp @@ -426,16 +426,6 @@ std::wstring FilePath::wstr() const return m_path->generic_wstring(); } -std::string FilePath::getBackslashedString() const -{ - return utility::replace(str(), "/", "\\"); -} - -std::wstring FilePath::getBackslashedWString() const -{ - return utility::replace(wstr(), L"/", L"\\"); -} - std::wstring FilePath::fileName() const { return m_path->filename().generic_wstring(); diff --git a/src/lib/utility/file/FilePath.h b/src/lib/utility/file/FilePath.h index ddf60e08..b427a17f 100644 --- a/src/lib/utility/file/FilePath.h +++ b/src/lib/utility/file/FilePath.h @@ -52,8 +52,6 @@ public: std::string str() const; std::wstring wstr() const; - std::string getBackslashedString() const; - std::wstring getBackslashedWString() const; std::wstring fileName() const; std::wstring extension() const; diff --git a/src/lib/utility/utilityLibrary.h b/src/lib/utility/utilityLibrary.h index fb9fd9c6..f345b590 100644 --- a/src/lib/utility/utilityLibrary.h +++ b/src/lib/utility/utilityLibrary.h @@ -1,6 +1,7 @@ #ifndef UTILITY_LIBRARY_H #define UTILITY_LIBRARY_H +#include #include #include #include @@ -23,8 +24,8 @@ std::function loadFunctionFromLibrary( const FilePath& libraryPath, const std::string& functionName, std::string& errorString) { #ifdef _WIN32 - const std::string libraryPathString = libraryPath.getBackslashedString(); - HINSTANCE handle = LoadLibrary(libraryPathString.c_str()); + QString libraryPathString = QDir::toNativeSeparators(QString::fromStdWString(libraryPath.wstr())); + HINSTANCE handle = LoadLibrary(libraryPathString.toStdString().c_str()); if (handle == nullptr) { DWORD errorCode = GetLastError(); @@ -53,8 +54,8 @@ std::function loadFunctionFromLibrary( LocalFree(messageBuffer); - errorString = "Could not load library \"" + libraryPathString + "\" because of " + - errorReasonString; + errorString = "Could not load library \"" + libraryPathString.toStdString() + + "\" because of " + errorReasonString; return std::function(); } @@ -63,7 +64,7 @@ std::function loadFunctionFromLibrary( if (!functionId) { errorString = "Could not locate the function \"" + functionName + "\" in library\"" + - libraryPathString + "\""; + libraryPathString.toStdString() + "\""; return std::function(); } #else diff --git a/src/lib_gui/qt/element/QtStatusBar.cpp b/src/lib_gui/qt/element/QtStatusBar.cpp index d2d0bbb6..327ca58e 100644 --- a/src/lib_gui/qt/element/QtStatusBar.cpp +++ b/src/lib_gui/qt/element/QtStatusBar.cpp @@ -134,7 +134,7 @@ void QtStatusBar::setErrorCount(ErrorCountInfo errorCount) : QLatin1String(""))); m_errorButton.setMinimumWidth( - m_errorButton.fontMetrics().width(QString(m_errorButton.text().size(), 'a'))); + m_errorButton.fontMetrics().boundingRect(QString(m_errorButton.text().size(), 'a')).width()); if (errorCount.fatal > 0) { diff --git a/src/lib_gui/qt/element/code/QtCodeArea.cpp b/src/lib_gui/qt/element/code/QtCodeArea.cpp index b2216a79..6cac8533 100644 --- a/src/lib_gui/qt/element/code/QtCodeArea.cpp +++ b/src/lib_gui/qt/element/code/QtCodeArea.cpp @@ -294,7 +294,7 @@ int QtCodeArea::lineNumberAreaWidth() const { if (m_showLineNumbers) { - return fontMetrics().width(QLatin1Char('9')) * m_digits + 30; + return fontMetrics().boundingRect(QLatin1Char('9')).width() * m_digits + 30; } return 0; diff --git a/src/lib_gui/qt/element/code/QtCodeField.cpp b/src/lib_gui/qt/element/code/QtCodeField.cpp index 9a5b3fbf..f5437d82 100644 --- a/src/lib_gui/qt/element/code/QtCodeField.cpp +++ b/src/lib_gui/qt/element/code/QtCodeField.cpp @@ -97,7 +97,7 @@ QtCodeField::QtCodeField( QFont font(appSettings->getFontName().c_str()); font.setPixelSize(appSettings->getFontSize()); setFont(font); - setTabStopWidth(appSettings->getCodeTabWidth() * fontMetrics().width('9')); + setTabStopDistance(appSettings->getCodeTabWidth() * fontMetrics().boundingRect('9').width()); m_openInTabAction = new QAction( QStringLiteral("Open in New Tab (Ctrl + Shift + Left Click)"), this); @@ -123,15 +123,15 @@ QSize QtCodeField::sizeHint() const QRectF rect = blockBoundingGeometry(block); height += rect.height(); - int blockWidth = fm.boundingRect( - 0, - 0, - 1000000, - 1000000, - Qt::AlignLeft | Qt::AlignTop | Qt::TextExpandTabs, - block.text(), - tabStopWidth()) - .width(); + const int blockWidth = fm.boundingRect( + 0, + 0, + 1000000, + 1000000, + Qt::AlignLeft | Qt::AlignTop | Qt::TextExpandTabs, + block.text(), + static_cast(tabStopDistance())) + .width(); width = std::max(blockWidth, width); } diff --git a/src/lib_gui/qt/element/code/QtCodeFile.cpp b/src/lib_gui/qt/element/code/QtCodeFile.cpp index 7a9c8c84..1538007a 100644 --- a/src/lib_gui/qt/element/code/QtCodeFile.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFile.cpp @@ -17,7 +17,7 @@ QtCodeFile::QtCodeFile(const FilePath& filePath, QtCodeNavigator* navigator, boo setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); QVBoxLayout* layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); layout->setAlignment(Qt::AlignTop); setLayout(layout); diff --git a/src/lib_gui/qt/element/code/QtCodeFileSingle.cpp b/src/lib_gui/qt/element/code/QtCodeFileSingle.cpp index 64173f7b..bec39344 100644 --- a/src/lib_gui/qt/element/code/QtCodeFileSingle.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFileSingle.cpp @@ -36,7 +36,7 @@ QtCodeFileSingle::QtCodeFileSingle(QtCodeNavigator* navigator, QWidget* parent) m_areaWrapper->setSizePolicy( m_areaWrapper->sizePolicy().horizontalPolicy(), QSizePolicy::Expanding); m_areaWrapper->setLayout(new QVBoxLayout()); - m_areaWrapper->layout()->setMargin(0); + m_areaWrapper->layout()->setContentsMargins(0, 0, 0, 0); m_areaWrapper->layout()->setSpacing(0); layout()->addWidget(m_areaWrapper); } diff --git a/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp b/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp index 5f17489c..8a0aa078 100644 --- a/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp +++ b/src/lib_gui/qt/element/code/QtCodeFileTitleBar.cpp @@ -25,7 +25,7 @@ QtCodeFileTitleBar::QtCodeFileTitleBar(QWidget* parent, bool isHovering, bool is } QHBoxLayout* titleLayout = new QHBoxLayout(); - titleLayout->setMargin(0); + titleLayout->setContentsMargins(0, 0, 0, 0); titleLayout->setSpacing(0); titleLayout->setAlignment(Qt::AlignLeft); setLayout(titleLayout); diff --git a/src/lib_gui/qt/element/code/QtCodeNavigator.cpp b/src/lib_gui/qt/element/code/QtCodeNavigator.cpp index 6723728b..5e83e2ab 100644 --- a/src/lib_gui/qt/element/code/QtCodeNavigator.cpp +++ b/src/lib_gui/qt/element/code/QtCodeNavigator.cpp @@ -219,8 +219,8 @@ void QtCodeNavigator::updateReferenceCount( } m_refLabel->setMinimumWidth( - m_refLabel->fontMetrics().width( - QString(QString::number(referenceCount).size() * 2, 'a') + "/ references") + + m_refLabel->fontMetrics().boundingRect( + QString(QString::number(referenceCount).size() * 2, 'a') + "/ references").width() + 30); m_prevReferenceButton->setEnabled(referenceCount > 1); @@ -239,8 +239,8 @@ void QtCodeNavigator::updateReferenceCount( } m_localRefLabel->setMinimumWidth( - m_localRefLabel->fontMetrics().width( - QString(QString::number(localReferenceCount).size() * 2, 'a') + "/ local references") + + m_localRefLabel->fontMetrics().boundingRect( + QString(QString::number(localReferenceCount).size() * 2, 'a') + "/ local references").width() + 30); m_nextLocalReferenceButton->setVisible(localReferenceCount > 1); diff --git a/src/lib_gui/qt/element/code/QtCodeSnippet.cpp b/src/lib_gui/qt/element/code/QtCodeSnippet.cpp index 8e3204b7..6d6f9f78 100644 --- a/src/lib_gui/qt/element/code/QtCodeSnippet.cpp +++ b/src/lib_gui/qt/element/code/QtCodeSnippet.cpp @@ -24,7 +24,7 @@ QtCodeSnippet::QtCodeSnippet(const CodeSnippetParams& params, QtCodeNavigator* n setObjectName(QStringLiteral("code_snippet")); QVBoxLayout* layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); layout->setAlignment(Qt::AlignTop); setLayout(layout); @@ -268,7 +268,7 @@ void QtCodeSnippet::clickedFooter() QtHoverButton* QtCodeSnippet::createScopeLine(QBoxLayout* layout) { QHBoxLayout* lineLayout = new QHBoxLayout(); - lineLayout->setMargin(0); + lineLayout->setContentsMargins(0, 0, 0, 0); lineLayout->setSpacing(0); lineLayout->setAlignment(Qt::AlignLeft); layout->addLayout(lineLayout); diff --git a/src/lib_gui/qt/element/dialog/QtNewsWidget.cpp b/src/lib_gui/qt/element/dialog/QtNewsWidget.cpp index 554963ab..5535e733 100644 --- a/src/lib_gui/qt/element/dialog/QtNewsWidget.cpp +++ b/src/lib_gui/qt/element/dialog/QtNewsWidget.cpp @@ -22,7 +22,7 @@ QtNewsWidget::QtNewsWidget(QWidget* parent): QWidget(parent) m_text = new QtTextEdit(); m_text->setObjectName(QStringLiteral("textField")); m_text->setReadOnly(true); - m_text->setTabStopWidth(8 * m_text->fontMetrics().width('9')); + m_text->setTabStopDistance(8 * m_text->fontMetrics().boundingRect('9').width()); m_text->setViewportMargins(6, 4, 16, 4); m_text->setOpenExternalLinks(true); layout->addWidget(m_text); diff --git a/src/lib_gui/qt/element/history/QtHistoryList.cpp b/src/lib_gui/qt/element/history/QtHistoryList.cpp index 9dfdc27f..e79e0376 100644 --- a/src/lib_gui/qt/element/history/QtHistoryList.cpp +++ b/src/lib_gui/qt/element/history/QtHistoryList.cpp @@ -80,7 +80,8 @@ QtHistoryItem::QtHistoryItem(const SearchMatch& match, size_t index, bool isCurr QSize QtHistoryItem::getSizeHint() const { return QSize( - m_name->fontMetrics().width(m_name->text()) + 40, m_name->fontMetrics().height() + 8); + m_name->fontMetrics().boundingRect(m_name->text()).width() + 40, + m_name->fontMetrics().height() + 8); } const SearchMatch& QtHistoryItem::getMatch() const diff --git a/src/lib_gui/qt/element/search/QtAutocompletionList.cpp b/src/lib_gui/qt/element/search/QtAutocompletionList.cpp index 059be344..5e0ad75e 100644 --- a/src/lib_gui/qt/element/search/QtAutocompletionList.cpp +++ b/src/lib_gui/qt/element/search/QtAutocompletionList.cpp @@ -336,7 +336,7 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font) m_font1 = font; QFontMetrics metrics1(font); - m_charWidth1 = metrics1.width(QStringLiteral( + m_charWidth1 = metrics1.boundingRect(QStringLiteral( "---------------------------------------------------------------------------" "-------------------------" "---------------------------------------------------------------------------" @@ -346,7 +346,8 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font) "---------------------------------------------------------------------------" "-------------------------" "---------------------------------------------------------------------------" - "-------------------------")) / + "-------------------------")) + .width() / 500.0f; m_charHeight1 = static_cast(metrics1.height()); @@ -354,7 +355,7 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font) m_font2 = font; QFontMetrics metrics2(font); - m_charWidth2 = metrics2.width(QStringLiteral( + m_charWidth2 = metrics2.boundingRect(QStringLiteral( "---------------------------------------------------------------------------" "-------------------------" "---------------------------------------------------------------------------" @@ -364,7 +365,8 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font) "---------------------------------------------------------------------------" "-------------------------" "---------------------------------------------------------------------------" - "-------------------------")) / + "-------------------------")) + .width() / 500.0f; m_charHeight2 = static_cast(metrics2.height()); diff --git a/src/lib_gui/qt/element/search/QtSmartSearchBox.cpp b/src/lib_gui/qt/element/search/QtSmartSearchBox.cpp index e4bbc83c..acc9ac99 100644 --- a/src/lib_gui/qt/element/search/QtSmartSearchBox.cpp +++ b/src/lib_gui/qt/element/search/QtSmartSearchBox.cpp @@ -901,7 +901,7 @@ void QtSmartSearchBox::layoutElements() if (!hasSelected && i == m_cursorIndex) { editX = x - 5; - x += fontMetrics().width(text()); + x += fontMetrics().horizontalAdvance(text()); } if (i < m_elements.size()) @@ -923,7 +923,7 @@ void QtSmartSearchBox::layoutElements() } } - int cursorX = fontMetrics().width(text().left(cursorPosition())); + int cursorX = fontMetrics().horizontalAdvance(text().left(cursorPosition())); int offsetX = m_oldLayoutOffset; if (x < width()) diff --git a/src/lib_gui/qt/graphics/QtGraphicsView.cpp b/src/lib_gui/qt/graphics/QtGraphicsView.cpp index da9a7e01..18659f9c 100644 --- a/src/lib_gui/qt/graphics/QtGraphicsView.cpp +++ b/src/lib_gui/qt/graphics/QtGraphicsView.cpp @@ -473,9 +473,9 @@ void QtGraphicsView::wheelEvent(QWheelEvent* event) if (zoomDefault != (shiftPressed | ctrlPressed)) { - if (event->delta() != 0.0f) + if (event->angleDelta().y() != 0.0f) { - updateZoom(static_cast(event->delta())); + updateZoom(static_cast(event->angleDelta().y())); } } else diff --git a/src/lib_gui/qt/graphics/base/QtCountCircleItem.cpp b/src/lib_gui/qt/graphics/base/QtCountCircleItem.cpp index ac3d329d..89250a1f 100644 --- a/src/lib_gui/qt/graphics/base/QtCountCircleItem.cpp +++ b/src/lib_gui/qt/graphics/base/QtCountCircleItem.cpp @@ -24,7 +24,7 @@ QtCountCircleItem::~QtCountCircleItem() {} void QtCountCircleItem::setPosition(const Vec2f& pos) { - qreal width = QFontMetrics(m_number->font()).width(m_number->text()); + qreal width = QFontMetrics(m_number->font()).boundingRect(m_number->text()).width(); qreal height = QFontMetrics(m_number->font()).height(); this->setRadius(height / 2 + 1); diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp index cfbe4ecb..e49fc8dd 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNode.cpp @@ -693,7 +693,7 @@ void QtGraphNode::setStyle(const GraphViewStyle::NodeStyle& style) static_cast(style.textOffset.y)); const float charWidth = - QFontMetrics(font).width(QStringLiteral("QtGraphNode::QtGraphNode::QtGraphNode")) / 37.0f; + QFontMetrics(font).boundingRect(QStringLiteral("QtGraphNode::QtGraphNode::QtGraphNode")).width() / 37.0f; const float charHeight = static_cast(QFontMetrics(font).height()); m_matchRect->setRect( static_cast( diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp index 3dc9a8a0..b153078e 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNodeExpandToggle.cpp @@ -69,7 +69,7 @@ void QtGraphNodeExpandToggle::updateStyle() setStyle(style); float textX = static_cast( - (m_rect->rect().width() / 2) - (QFontMetrics(m_text->font()).width(m_text->text()) / 2)); + (m_rect->rect().width() / 2) - (QFontMetrics(m_text->font()).boundingRect(m_text->text()).width() / 2)); const float textY = static_cast( m_rect->rect().height() / 2 - QFontMetrics(m_text->font()).height() / 1.8f); diff --git a/src/lib_gui/qt/graphics/graph/QtGraphNodeQualifier.cpp b/src/lib_gui/qt/graphics/graph/QtGraphNodeQualifier.cpp index b2e78614..363394a5 100644 --- a/src/lib_gui/qt/graphics/graph/QtGraphNodeQualifier.cpp +++ b/src/lib_gui/qt/graphics/graph/QtGraphNodeQualifier.cpp @@ -38,7 +38,7 @@ bool QtGraphNodeQualifier::isQualifierNode() const bool QtGraphNodeQualifier::setPosition(const Vec2i& pos) { - const int width = QFontMetrics(m_name->font()).width(m_name->text()) + 10; + const int width = QFontMetrics(m_name->font()).boundingRect(m_name->text()).width() + 10; const int height = QFontMetrics(m_name->font()).height() + 2; const int arrowWidth = static_cast(height * 0.85); @@ -109,7 +109,7 @@ void QtGraphNodeQualifier::updateStyle() void QtGraphNodeQualifier::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { - const int width = QFontMetrics(m_name->font()).width(m_name->text()) + 10; + const int width = QFontMetrics(m_name->font()).boundingRect(m_name->text()).width() + 10; const int height = QFontMetrics(m_name->font()).height() + 2; const int arrowWidth = static_cast(height * 0.85); const float smallFactor = 0.5f; diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp index ce02c9f6..66a7834a 100644 --- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp +++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp @@ -425,16 +425,13 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row) // maven path m_mavenPath = new QtLocationPicker(this); - if (QSysInfo::windowsVersion() != QSysInfo::WV_None) - { - m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn.cmd)")); - m_mavenPath->setPlaceholderText(QStringLiteral("/bin/mvn.cmd")); - } - else - { - m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn)")); - m_mavenPath->setPlaceholderText(QStringLiteral("/mvn")); - } + #ifdef WIN32 + m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn.cmd)")); + m_mavenPath->setPlaceholderText(QStringLiteral("/bin/mvn.cmd")); + #else + m_mavenPath->setFileFilter(QStringLiteral("Maven command (mvn)")); + m_mavenPath->setPlaceholderText(QStringLiteral("/mvn")); + #endif addLabelAndWidget(QStringLiteral("Maven Path"), m_mavenPath, layout, row); diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp index 1dc9f5ff..02b6eb0e 100644 --- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp +++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentSelect.cpp @@ -25,8 +25,8 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row) std::string pythonIndexerVersion = " "; { std::string str = utility::executeProcess( - "\"" + ResourcePaths::getPythonPath().str() + - "SourcetrailPythonIndexer\" --version", + ResourcePaths::getPythonPath().wstr().append(L"SourcetrailPythonIndexer"), + std::vector{L"--version"}, FilePath(), 5000) .second; diff --git a/src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathPythonEnvironment.cpp b/src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathPythonEnvironment.cpp index faa5f2db..deed2011 100644 --- a/src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathPythonEnvironment.cpp +++ b/src/lib_gui/qt/project_wizard/content/path/QtProjectWizardContentPathPythonEnvironment.cpp @@ -63,12 +63,13 @@ void QtProjectWizardContentPathPythonEnvironment::onTextChanged(const QString& t m_resultLabel->setText("Checking validity of Python environment..."); std::thread([=]() { std::pair out = utility::executeProcess( - "\"" + ResourcePaths::getPythonPath().str() + - "SourcetrailPythonIndexer\" check-environment " + "--environment-path \"" + - utility::getExpandedAndAbsolutePath( + ResourcePaths::getPythonPath().wstr().append(L"SourcetrailPythonIndexer"), + std::vector{ + L"check-environment", + L"--environment-path " + utility::getExpandedAndAbsolutePath( FilePath(text.toStdWString()), m_settings->getProjectDirectoryPath()) - .str() + - "\"", + .wstr() + }, FilePath(), 5000); m_onQtThread([=]() { diff --git a/src/lib_gui/qt/utility/QtContextMenu.cpp b/src/lib_gui/qt/utility/QtContextMenu.cpp index 0754a0eb..b3738f09 100644 --- a/src/lib_gui/qt/utility/QtContextMenu.cpp +++ b/src/lib_gui/qt/utility/QtContextMenu.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "MessageHistoryRedo.h" @@ -118,10 +119,8 @@ void QtContextMenu::redoActionTriggered() void QtContextMenu::copyFullPathActionTriggered() { - const std::wstring pathString = (QSysInfo::windowsVersion() != QSysInfo::WV_None) - ? s_filePath.getBackslashedWString() - : s_filePath.wstr(); - QApplication::clipboard()->setText(QString::fromStdWString(pathString)); + QApplication::clipboard()->setText( + QDir::toNativeSeparators(QString::fromStdWString(s_filePath.wstr()))); } void QtContextMenu::openContainingFolderActionTriggered() diff --git a/src/lib_gui/qt/utility/QtFlowLayout.cpp b/src/lib_gui/qt/utility/QtFlowLayout.cpp index 7f3a9c51..aa909147 100644 --- a/src/lib_gui/qt/utility/QtFlowLayout.cpp +++ b/src/lib_gui/qt/utility/QtFlowLayout.cpp @@ -76,7 +76,7 @@ QLayoutItem* QtFlowLayout::takeAt(int index) Qt::Orientations QtFlowLayout::expandingDirections() const { - return 0; + return Qt::Orientation::Horizontal | Qt::Orientation::Vertical; } bool QtFlowLayout::hasHeightForWidth() const @@ -110,7 +110,10 @@ QSize QtFlowLayout::minimumSize() const size = size.expandedTo(item->minimumSize()); } - size += QSize(2 * margin(), 2 * margin()); + int left, top, right, bottom; + getContentsMargins(&left, &top, &right, &bottom); + + size += QSize(left + right, top + bottom); return size; } diff --git a/src/lib_gui/qt/view/QtGraphViewStyleImpl.cpp b/src/lib_gui/qt/view/QtGraphViewStyleImpl.cpp index 4bb1746b..3a8906d7 100644 --- a/src/lib_gui/qt/view/QtGraphViewStyleImpl.cpp +++ b/src/lib_gui/qt/view/QtGraphViewStyleImpl.cpp @@ -9,7 +9,7 @@ float QtGraphViewStyleImpl::getCharWidth(const std::string& fontName, size_t fontSize) { return QFontMetrics(getFontForStyleType(fontName, fontSize)) - .width(QStringLiteral("QtGraphNode::QtGraphNode::QtGraphNode")) / + .boundingRect(QStringLiteral("QtGraphNode::QtGraphNode::QtGraphNode")).width() / 37.0f; } diff --git a/src/lib_gui/qt/window/QtBookmarkBrowser.cpp b/src/lib_gui/qt/window/QtBookmarkBrowser.cpp index 0b2d16dc..a055ab6a 100644 --- a/src/lib_gui/qt/window/QtBookmarkBrowser.cpp +++ b/src/lib_gui/qt/window/QtBookmarkBrowser.cpp @@ -65,7 +65,7 @@ void QtBookmarkBrowser::setupBookmarkBrowser() connect( m_filterComboBox, - QOverload::of(&QComboBox::currentIndexChanged), + QOverload::of(&QComboBox::currentIndexChanged), this, &QtBookmarkBrowser::filterOrOrderChanged); @@ -91,7 +91,7 @@ void QtBookmarkBrowser::setupBookmarkBrowser() connect( m_orderComboBox, - QOverload::of(&QComboBox::currentIndexChanged), + QOverload::of(&QComboBox::currentIndexChanged), this, &QtBookmarkBrowser::filterOrOrderChanged); } @@ -188,7 +188,7 @@ void QtBookmarkBrowser::handleNext() close(); } -void QtBookmarkBrowser::filterOrOrderChanged(const QString& text) +void QtBookmarkBrowser::filterOrOrderChanged(int index) { Bookmark::BookmarkFilter filter = getSelectedFilter(); Bookmark::BookmarkOrder order = getSelectedOrder(); diff --git a/src/lib_gui/qt/window/QtBookmarkBrowser.h b/src/lib_gui/qt/window/QtBookmarkBrowser.h index c3355ce4..f519d3e3 100644 --- a/src/lib_gui/qt/window/QtBookmarkBrowser.h +++ b/src/lib_gui/qt/window/QtBookmarkBrowser.h @@ -30,7 +30,7 @@ protected: virtual void handleNext() override; private slots: - void filterOrOrderChanged(const QString& text); + void filterOrOrderChanged(int index); void treeItemClicked(QTreeWidgetItem* item, int column); private: diff --git a/src/lib_gui/qt/window/QtMainWindow.cpp b/src/lib_gui/qt/window/QtMainWindow.cpp index 71ca6d37..51de5475 100644 --- a/src/lib_gui/qt/window/QtMainWindow.cpp +++ b/src/lib_gui/qt/window/QtMainWindow.cpp @@ -1134,7 +1134,7 @@ void QtMainWindow::setShowDockWidgetTitleBars(bool showTitleBars) { if (showTitleBars) { - dock.widget->setFeatures(QDockWidget::AllDockWidgetFeatures); + dock.widget->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); dock.widget->setTitleBarWidget(nullptr); } else diff --git a/src/lib_gui/qt/window/QtSelectPathsDialog.cpp b/src/lib_gui/qt/window/QtSelectPathsDialog.cpp index 5ed29a79..2e878411 100644 --- a/src/lib_gui/qt/window/QtSelectPathsDialog.cpp +++ b/src/lib_gui/qt/window/QtSelectPathsDialog.cpp @@ -57,14 +57,14 @@ void QtSelectPathsDialog::setPathsList( if (!s.exists()) { - item->setTextColor(Qt::red); + item->setForeground(Qt::red); item->setToolTip(QStringLiteral("Path does not exist")); item->setFlags(item->flags() & ~Qt::ItemIsEnabled); item->setCheckState(Qt::Unchecked); } else { - item->setTextColor(Qt::black); + item->setForeground(Qt::black); } } } diff --git a/src/lib_gui/qt/window/QtStartScreen.cpp b/src/lib_gui/qt/window/QtStartScreen.cpp index f80d15a1..a9b5a79f 100644 --- a/src/lib_gui/qt/window/QtStartScreen.cpp +++ b/src/lib_gui/qt/window/QtStartScreen.cpp @@ -139,7 +139,7 @@ void QtStartScreen::updateButtons() button->setIcon(m_projectIcon); break; } - button->setFixedWidth(button->fontMetrics().width(button->text()) + 45); + button->setFixedWidth(button->fontMetrics().boundingRect(button->text()).width() + 45); connect( button, &QtRecentProjectButton::clicked, @@ -274,7 +274,7 @@ void QtStartScreen::setupStartScreen() button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac button->setIcon(m_projectIcon); button->setIconSize(QSize(30, 30)); - button->setMinimumSize(button->fontMetrics().width(button->text()) + 45, 40); + button->setMinimumSize(button->fontMetrics().boundingRect(button->text()).width() + 45, 40); button->setObjectName(QStringLiteral("recentButtonMissing")); button->minimumSizeHint(); // force font loading m_recentProjectsButtons.push_back(button); diff --git a/src/lib_gui/qt/window/QtTextEditDialog.cpp b/src/lib_gui/qt/window/QtTextEditDialog.cpp index 6f666df3..343a3ea6 100644 --- a/src/lib_gui/qt/window/QtTextEditDialog.cpp +++ b/src/lib_gui/qt/window/QtTextEditDialog.cpp @@ -50,7 +50,7 @@ void QtTextEditDialog::populateWindow(QWidget* widget) m_text = new QPlainTextEdit(); m_text->setObjectName(QStringLiteral("textField")); m_text->setLineWrapMode(QPlainTextEdit::NoWrap); - m_text->setTabStopWidth(8 * m_text->fontMetrics().width('9')); + m_text->setTabStopDistance(8 * m_text->fontMetrics().boundingRect('9').width()); layout->addWidget(m_text); widget->setLayout(layout); diff --git a/src/lib_gui/qt/window/QtWindowBase.cpp b/src/lib_gui/qt/window/QtWindowBase.cpp index f89b26ea..9732d422 100644 --- a/src/lib_gui/qt/window/QtWindowBase.cpp +++ b/src/lib_gui/qt/window/QtWindowBase.cpp @@ -12,8 +12,8 @@ QtWindowBase::QtWindowBase(bool isSubWindow, QWidget* parent) , m_isSubWindow(isSubWindow) , m_window(nullptr) , m_content(nullptr) - , m_sizeGrip(nullptr) , m_mousePressedInWindow(false) + , m_sizeGrip(nullptr) { if (isSubWindow) { diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp index 0ad9eb75..89459917 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp @@ -20,11 +20,10 @@ std::vector CxxVs15HeaderPathDetector::doGetPaths() const .expandEnvironmentVariables(); if (!expandedPaths.empty()) { - const std::string command = "\"" + expandedPaths[0].str() + - "\" -latest -property installationPath"; - const std::string command2 = - "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe\""; - const std::string output = utility::executeProcess(command, FilePath(), 10000).second; + const std::string output = + utility::executeProcess( + expandedPaths[0].wstr(), std::vector {L"-latest", L"-property installationPath"}, FilePath(), 10000) + .second; const FilePath vsInstallPath(output); if (vsInstallPath.exists()) diff --git a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp index bc851205..7f1d36c1 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp @@ -12,7 +12,10 @@ namespace utility std::vector getCxxHeaderPaths(const std::string& compilerName) { std::string command = compilerName + " -x c++ -v -E /dev/null"; - std::string clangOutput = utility::executeProcess(command.c_str()).second; + std::string clangOutput = utility::executeProcess( + utility::decodeFromUtf8(compilerName), + std::vector {L"-x c++", L"-v", L"-E /dev/null"}) + .second; std::string standardHeaders = utility::substrBetween( clangOutput, "#include <...> search starts here:\n", "\nEnd of search list"); std::vector paths; diff --git a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorLinux.cpp b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorLinux.cpp index 0c18e6f9..500dd89f 100644 --- a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorLinux.cpp +++ b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorLinux.cpp @@ -54,8 +54,7 @@ std::vector JavaPathDetectorLinux::doGetPaths() const FilePath JavaPathDetectorLinux::getJavaInPath() const { - std::string command = "which java"; - std::string output = utility::executeProcess(command.c_str()).second; + std::string output = utility::executeProcess(L"which", std::vector{L"java"}).second; if (!output.empty()) { @@ -73,8 +72,7 @@ FilePath JavaPathDetectorLinux::getJavaInPath() const FilePath JavaPathDetectorLinux::readLink(const FilePath& path) const { - std::string command = "readlink -f " + path.str(); - FilePath javaPath(utility::executeProcess(command.c_str()).second); + FilePath javaPath(utility::executeProcess(L"readlink", std::vector{L"-f " + path.wstr()}).second); if (!javaPath.empty()) { return javaPath; @@ -115,8 +113,7 @@ FilePath JavaPathDetectorLinux::getJavaInJavaHome() const bool JavaPathDetectorLinux::checkVersion(const FilePath& path) const { - std::string command = path.str() + " -version"; - std::string output = utility::executeProcess(command.c_str()).second; + std::string output = utility::executeProcess(path.wstr(), std::vector{L"-version"}).second; return output.find(m_javaVersion) != std::string::npos; } diff --git a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp index eb6b4e46..33c19d40 100644 --- a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp +++ b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp @@ -14,8 +14,7 @@ std::vector JavaPathDetectorMac::doGetPaths() const std::vector paths; FilePath javaPath; - std::string command = "/usr/libexec/java_home"; - std::string output = utility::executeProcess(command.c_str()).second; + std::string output = utility::executeProcess(L"/usr/libexec/java_home", std::vector{}).second; if (!output.empty()) { diff --git a/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorUnix.cpp b/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorUnix.cpp index ea428c72..ca8af480 100644 --- a/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorUnix.cpp +++ b/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorUnix.cpp @@ -7,8 +7,7 @@ MavenPathDetectorUnix::MavenPathDetectorUnix(): PathDetector("Maven for Unix") { std::vector MavenPathDetectorUnix::doGetPaths() const { - std::string command = "which mvn"; - FilePath mavenPath(utility::executeProcess(command.c_str()).second); + FilePath mavenPath(utility::executeProcess(L"which", std::vector{L"mvn"}).second); std::vector paths; if (mavenPath.exists()) diff --git a/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorWindows.cpp b/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorWindows.cpp index 6d98538f..ac8bf996 100644 --- a/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorWindows.cpp +++ b/src/lib_gui/utility/path_detector/maven_executable/MavenPathDetectorWindows.cpp @@ -7,8 +7,7 @@ MavenPathDetectorWindows::MavenPathDetectorWindows(): PathDetector("Maven for Wi std::vector MavenPathDetectorWindows::doGetPaths() const { - std::string command = "cmd /c where mvn.cmd && exit"; - FilePath mavenPath(utility::executeProcess(command.c_str()).second); + FilePath mavenPath(utility::executeProcess(L"cmd", std::vector{L"/c where mvn.cmd && exit"}).second); std::vector paths; if (mavenPath.exists()) diff --git a/src/lib_gui/utility/utilityApp.cpp b/src/lib_gui/utility/utilityApp.cpp index af515f00..e6c2a2e4 100644 --- a/src/lib_gui/utility/utilityApp.cpp +++ b/src/lib_gui/utility/utilityApp.cpp @@ -57,7 +57,10 @@ std::set s_runningProcesses; } // namespace utility std::pair utility::executeProcess( - const std::string& command, const FilePath& workingDirectory, const int timeout) + const std::wstring& commandPath, + const std::vector& commandArguments, + const FilePath& workingDirectory, + const int timeout) { QProcess process; process.setProcessChannelMode(QProcess::MergedChannels); @@ -67,6 +70,12 @@ std::pair utility::executeProcess( process.setWorkingDirectory(QString::fromStdWString(workingDirectory.wstr())); } + QString command = QString::fromStdWString(commandPath); + for (const std::wstring& commandArgument: commandArguments) + { + command += QString::fromStdWString(L" " + commandArgument); + } + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QStringList envlist = env.toStringList(); envlist.replaceInStrings( @@ -76,7 +85,7 @@ std::pair utility::executeProcess( { std::lock_guard lock(s_runningProcessesMutex); - process.start(command.c_str()); + process.start(command); s_runningProcesses.insert(&process); } @@ -96,7 +105,10 @@ std::pair utility::executeProcess( } std::string utility::executeProcessUntilNoOutput( - const std::string& command, const FilePath& workingDirectory, const int waitTime) + const std::wstring& commandPath, + const std::vector& commandArguments, + const FilePath& workingDirectory, + const int waitTime) { QProcess process; process.setProcessChannelMode(QProcess::MergedChannels); @@ -106,6 +118,12 @@ std::string utility::executeProcessUntilNoOutput( process.setWorkingDirectory(QString::fromStdWString(workingDirectory.wstr())); } + QString command = QString::fromStdWString(commandPath); + for (const std::wstring& commandArgument: commandArguments) + { + command += QString::fromStdWString(L" " + commandArgument); + } + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QStringList envlist = env.toStringList(); envlist.replaceInStrings( @@ -115,7 +133,7 @@ std::string utility::executeProcessUntilNoOutput( { std::lock_guard lock(s_runningProcessesMutex); - process.start(command.c_str()); + process.start(command); s_runningProcesses.insert(&process); } @@ -161,9 +179,7 @@ int utility::executeProcessAndGetExitCode( QProcess process; QObject::connect( - &process, - &QProcess::errorOccurred, - [&finished, errorMessage, commandPath](QProcess::ProcessError error) { + &process, &QProcess::errorOccurred, [&finished, errorMessage](QProcess::ProcessError error) { finished = true; if (errorMessage != nullptr) { @@ -205,7 +221,7 @@ int utility::executeProcessAndGetExitCode( QString command = QString::fromStdWString(commandPath); for (const std::wstring& commandArgument: commandArguments) { - command += " " + QString::fromStdWString(commandArgument); + command += QString::fromStdWString(L" " + commandArgument); } QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); @@ -276,23 +292,6 @@ int utility::getIdealThreadCount() return std::max(1, threadCount); } -OsType utility::getOsType() -{ - if (QSysInfo::windowsVersion() != QSysInfo::WV_None) - { - return OS_WINDOWS; - } - else if (QSysInfo::macVersion() != QSysInfo::MV_None) - { - return OS_MAC; - } - else - { - return OS_LINUX; - } - return OS_UNKNOWN; -} - std::string utility::getOsTypeString() { // WARNING: Don't change these string. The server API relies on them. @@ -308,15 +307,4 @@ std::string utility::getOsTypeString() break; } return "unknown"; -} - -ApplicationArchitectureType utility::getApplicationArchitectureType() -{ -#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) || \ - defined(WIN64) - return APPLICATION_ARCHITECTURE_X86_64; -#else - return APPLICATION_ARCHITECTURE_X86_32; -#endif - return APPLICATION_ARCHITECTURE_UNKNOWN; -} +} \ No newline at end of file diff --git a/src/lib_gui/utility/utilityApp.h b/src/lib_gui/utility/utilityApp.h index 52060a34..9835b814 100644 --- a/src/lib_gui/utility/utilityApp.h +++ b/src/lib_gui/utility/utilityApp.h @@ -10,11 +10,15 @@ namespace utility { std::pair executeProcess( - const std::string& command, + const std::wstring& commandPath, + const std::vector& commandArguments, const FilePath& workingDirectory = FilePath(), const int timeout = 30000); std::string executeProcessUntilNoOutput( - const std::string& command, const FilePath& workingDirectory, int waitTime = 10000); + const std::wstring& commandPath, + const std::vector& commandArguments, + const FilePath& workingDirectory, + int waitTime = 10000); int executeProcessAndGetExitCode( const std::wstring& commandPath, const std::vector& commandArguments, @@ -26,9 +30,31 @@ int executeProcessAndGetExitCode( void killRunningProcesses(); int getIdealThreadCount(); -OsType getOsType(); +constexpr OsType getOsType() +{ +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) + return OS_WINDOWS; +#elif defined(__APPLE__) + return OS_MAC; +#elif defined(__linux) || defined(__linux__) || defined(linux) + return OS_LINUX; +#else + return OS_UNKNOWN; +#endif +} + std::string getOsTypeString(); -ApplicationArchitectureType getApplicationArchitectureType(); + +constexpr ApplicationArchitectureType getApplicationArchitectureType() +{ +#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) || \ + defined(WIN64) + return APPLICATION_ARCHITECTURE_X86_64; +#else + return APPLICATION_ARCHITECTURE_X86_32; +#endif + return APPLICATION_ARCHITECTURE_UNKNOWN; +} } // namespace utility #endif // UTILITY_APP_H diff --git a/src/lib_java/utility/utilityMaven.cpp b/src/lib_java/utility/utilityMaven.cpp index 3652cf01..0403db80 100644 --- a/src/lib_java/utility/utilityMaven.cpp +++ b/src/lib_java/utility/utilityMaven.cpp @@ -82,20 +82,14 @@ std::wstring getErrorMessageFromMavenOutput(std::shared_ptr ma return errorMessage; } -std::string getMavenArgsString(const FilePath& settingsFilePath) +std::vector getMavenArgs(const FilePath& settingsFilePath) { - std::vector args; + std::vector args; if (!settingsFilePath.empty() && settingsFilePath.exists()) { - args.push_back("--settings \"" + settingsFilePath.str() + "\""); + args.push_back(L"--settings \"" + settingsFilePath.wstr() + L"\""); } - std::string ret = ""; - for (const std::string& arg: args) - { - ret += arg + " "; - } - - return ret; + return args; } } // namespace @@ -107,9 +101,13 @@ std::wstring mavenGenerateSources( { utility::setJavaHomeVariableIfNotExists(); + auto args = getMavenArgs(settingsFilePath); + args.push_back(L"generate-sources"); + std::shared_ptr outputAccess = TextAccess::createFromString( utility::executeProcessUntilNoOutput( - "\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) + "generate-sources", + mavenPath.wstr(), + args, projectDirectoryPath, 60000)); @@ -130,11 +128,15 @@ bool mavenCopyDependencies( { utility::setJavaHomeVariableIfNotExists(); + auto args = getMavenArgs(settingsFilePath); + args.push_back(L"dependency:copy-dependencies"); + args.push_back(L"-DoutputDirectory=" + outputDirectoryPath.wstr()); + std::shared_ptr outputAccess = TextAccess::createFromString( - utility::executeProcessUntilNoOutput( - "\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) + - "dependency:copy-dependencies -DoutputDirectory=" + outputDirectoryPath.str(), - projectDirectoryPath, + utility::executeProcessUntilNoOutput( + mavenPath.wstr(), + args, + projectDirectoryPath, 60000)); const std::wstring errorMessage = getErrorMessageFromMavenOutput(outputAccess); @@ -159,11 +161,15 @@ std::vector mavenGetAllDirectoriesFromEffectivePom( FilePath outputPath = outputDirectoryPath.getConcatenated(FilePath("/effective-pom.xml")); + auto args = getMavenArgs(settingsFilePath); + args.push_back(L"help:effective-pom"); + args.push_back(L"-Doutput=" + outputPath.wstr()); + std::shared_ptr outputAccess = TextAccess::createFromString( - utility::executeProcessUntilNoOutput( - "\"" + mavenPath.str() + "\" " + getMavenArgsString(settingsFilePath) + - "help:effective-pom -Doutput=\"" + outputPath.str(), - projectDirectoryPath, + utility::executeProcessUntilNoOutput( + mavenPath.wstr(), + args, + projectDirectoryPath, 60000)); const std::wstring errorMessage = getErrorMessageFromMavenOutput(outputAccess);