logic: reduce access to filesystem while indexing

* use canonical filepath cache in cxx indexer
* made constructors of FilePath explicit
* use FilePath at more places instead of string
* forward declares FilePath wherever possible
This commit is contained in:
malte_langkabel
2017-05-04 10:55:16 +02:00
parent 55d3f9c189
commit 054b8fab17
156 changed files with 656 additions and 444 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ bool QtApplication::event(QEvent *event)
if (path.exists() && (path.extension() == ".srctrlprj" || path.extension() == ".coatiproject"))
{
MessageLoadProject(path.str(), false).dispatch();
MessageLoadProject(path, false).dispatch();
return true;
}
}
@@ -330,7 +330,7 @@ void QtAutocompletionDelegate::calculateCharSizes(QFont font)
) / 500.0f;
m_charHeight2 = metrics2.height();
m_arrow = QtDeviceScaledPixmap(QString::fromStdString(ResourcePaths::getGuiPath() + "search_view/images/arrow.png"));
m_arrow = QtDeviceScaledPixmap(QString::fromStdString(ResourcePaths::getGuiPath().str() + "search_view/images/arrow.png"));
m_arrow.scaleToWidth(m_charWidth2);
m_arrow.colorize(ColorScheme::getInstance()->getColor("search/popup/by_text").c_str());
}
+3 -3
View File
@@ -59,7 +59,7 @@ QtBookmark::QtBookmark()
m_editButton->setToolTip("Edit bookmark");
m_editButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_editButton->setIconSize(QSize(20, 20));
m_editButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_edit_icon.png").c_str()));
m_editButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_edit_icon.png").c_str()));
utility::setWidgetRetainsSpaceWhenHidden(m_editButton);
m_editButton->hide();
buttonsLayout->addWidget(m_editButton);
@@ -69,7 +69,7 @@ QtBookmark::QtBookmark()
m_deleteButton->setToolTip("Delete bookmark");
m_deleteButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_deleteButton->setIconSize(QSize(20, 20));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
utility::setWidgetRetainsSpaceWhenHidden(m_deleteButton);
m_deleteButton->hide();
buttonsLayout->addWidget(m_deleteButton);
@@ -235,7 +235,7 @@ void QtBookmark::elideButtonText()
void QtBookmark::updateArrow()
{
QPixmap pixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/" + m_arrowImageName).c_str());
QPixmap pixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/" + m_arrowImageName).c_str());
m_toggleCommentButton->setIcon(QIcon(utility::colorizePixmap(pixmap, m_hovered ? "#707070" : "black")));
}
@@ -23,7 +23,7 @@ QtBookmarkCategory::QtBookmarkCategory()
m_expandButton->setObjectName("category_expand_button");
m_expandButton->setToolTip("Show/Hide bookmarks in this category");
m_expandButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_expandButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_down.png").c_str()));
m_expandButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_down.png").c_str()));
m_expandButton->setIconSize(QSize(8, 8));
layout->addWidget(m_expandButton);
@@ -40,7 +40,7 @@ QtBookmarkCategory::QtBookmarkCategory()
m_deleteButton->setToolTip("Delete this Bookmark Category and the containing Bookmarks");
m_deleteButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_deleteButton->setIconSize(QSize(20, 20));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
utility::setWidgetRetainsSpaceWhenHidden(m_deleteButton);
m_deleteButton->hide();
layout->addWidget(m_deleteButton);
@@ -83,12 +83,12 @@ void QtBookmarkCategory::updateArrow()
{
if (m_treeItem->isExpanded())
{
QPixmap pixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_down.png").c_str());
QPixmap pixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_down.png").c_str());
m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black")));
}
else
{
QPixmap pixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_right.png").c_str());
QPixmap pixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_right.png").c_str());
m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black")));
}
}
@@ -3,6 +3,7 @@
#include <QScrollBar>
#include <QVBoxLayout>
#include "utility/file/FilePath.h"
#include "utility/file/FileSystem.h"
#include "data/location/SourceLocationFile.h"
@@ -6,6 +6,7 @@
#include <QScrollBar>
#include <QVBoxLayout>
#include "utility/file/FilePath.h"
#include "utility/logging/logging.h"
#include "utility/messaging/type/MessageChangeFileView.h"
#include "utility/ResourcePaths.h"
@@ -6,6 +6,7 @@
#include <QFrame>
#include "utility/file/FilePath.h"
#include "utility/TimePoint.h"
#include "qt/element/QtCodeNavigateable.h"
@@ -37,7 +37,7 @@ void QtCodeFileTitleButton::setFilePath(const FilePath& filePath)
setText(filePath.fileName().c_str());
setToolTip(filePath.str().c_str());
std::string text = ResourcePaths::getGuiPath() + "code_view/images/file.png";
std::string text = ResourcePaths::getGuiPath().str() + "code_view/images/file.png";
setIcon(utility::colorizePixmap(
QPixmap(text.c_str()),
@@ -67,7 +67,7 @@ void QtCodeFileTitleButton::setIsComplete(bool isComplete)
if (!isComplete)
{
setStyleSheet((
"background-image: url(" + ResourcePaths::getGuiPath() + "code_view/images/pattern_" +
"background-image: url(" + ResourcePaths::getGuiPath().str() + "code_view/images/pattern_" +
ColorScheme::getInstance()->getColor("code/file/title/hatching") + ".png);"
).c_str());
}
@@ -90,7 +90,7 @@ void QtCodeFileTitleButton::setProject(const std::string& name)
}
else
{
std::string text = ResourcePaths::getGuiPath() + "code_view/images/edit.png";
std::string text = ResourcePaths::getGuiPath().str() + "code_view/images/edit.png";
setToolTip("edit project");
setIcon(utility::colorizePixmap(
@@ -110,8 +110,7 @@ void QtCodeFileTitleButton::updateTexts()
std::string title = m_filePath.fileName();
std::string toolTip = "file: " + m_filePath.str();
// cannot use m_filePath.exists() here since it is only checked when FilePath is constructed.
if ((!FileSystem::exists(m_filePath.str())) ||
if ((!m_filePath.recheckExists()) ||
(FileSystem::getLastWriteTime(m_filePath) > m_modificationTime))
{
title += "*";
+1 -1
View File
@@ -3,12 +3,12 @@
#include <set>
#include "utility/file/FilePath.h"
#include "utility/TimePoint.h"
#include "utility/types.h"
#include "component/view/helper/CodeSnippetParams.h"
class FilePath;
class QRectF;
class QAbstractScrollArea;
class QWidget;
+4 -4
View File
@@ -525,22 +525,22 @@ void QtCodeNavigator::refreshStyle()
m_fileButton->setFixedHeight(height);
m_prevButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "code_view/images/arrow_left.png",
ResourcePaths::getGuiPath().str() + "code_view/images/arrow_left.png",
"search/button"
));
m_nextButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "code_view/images/arrow_right.png",
ResourcePaths::getGuiPath().str() + "code_view/images/arrow_right.png",
"search/button"
));
m_listButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "code_view/images/list.png",
ResourcePaths::getGuiPath().str() + "code_view/images/list.png",
"search/button"
));
m_fileButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "code_view/images/file.png",
ResourcePaths::getGuiPath().str() + "code_view/images/file.png",
"search/button"
));
@@ -31,8 +31,8 @@ QtListItemWidget::QtListItemWidget(QtDirectoryListBox* list, QListWidgetItem* it
m_data->setObjectName("field");
m_button = new QtIconButton(
(ResourcePaths::getGuiPath() + "window/dots.png").c_str(),
(ResourcePaths::getGuiPath() + "window/dots_hover.png").c_str());
(ResourcePaths::getGuiPath().str() + "window/dots.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/dots_hover.png").c_str());
m_button->setObjectName("dotsButton");
layout->addWidget(m_data);
@@ -132,7 +132,7 @@ QtDirectoryListBox::QtDirectoryListBox(QWidget *parent, const QString& listName,
m_list->setAttribute(Qt::WA_MacShowFocusRect, 0);
m_list->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "window/listbox.css").c_str());
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("window/listbox.css"))).c_str());
layout->addWidget(m_list);
QWidget* buttonContainer = new QWidget(this);
@@ -144,15 +144,15 @@ QtDirectoryListBox::QtDirectoryListBox(QWidget *parent, const QString& listName,
innerLayout->setSpacing(0);
m_addButton = new QtIconButton(
(ResourcePaths::getGuiPath() + "window/plus.png").c_str(),
(ResourcePaths::getGuiPath() + "window/plus_hover.png").c_str());
(ResourcePaths::getGuiPath().str() + "window/plus.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/plus_hover.png").c_str());
m_addButton->setObjectName("plusButton");
m_addButton->setToolTip("add line");
innerLayout->addWidget(m_addButton);
m_removeButton = new QtIconButton(
(ResourcePaths::getGuiPath() + "window/minus.png").c_str(),
(ResourcePaths::getGuiPath() + "window/minus_hover.png").c_str());
(ResourcePaths::getGuiPath().str() + "window/minus.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/minus_hover.png").c_str());
m_removeButton->setObjectName("minusButton");
m_removeButton->setToolTip("remove line");
innerLayout->addWidget(m_removeButton);
@@ -166,7 +166,7 @@ QtDirectoryListBox::QtDirectoryListBox(QWidget *parent, const QString& listName,
innerLayout->addWidget(dropInfoText);
QPushButton* editButton = new QtIconButton(
(ResourcePaths::getGuiPath() + "code_view/images/edit.png").c_str(),
(ResourcePaths::getGuiPath().str() + "code_view/images/edit.png").c_str(),
QString());
editButton->setObjectName("editButton");
editButton->setToolTip("edit plain text");
@@ -242,7 +242,7 @@ std::vector<FilePath> QtDirectoryListBox::getList()
std::vector<FilePath> list;
for (const std::string& str : strList)
{
list.push_back(str);
list.push_back(FilePath(str));
}
return list;
}
+2 -2
View File
@@ -6,8 +6,8 @@
QtHelpButton::QtHelpButton(const QString& helpText, QWidget* parent)
: QtIconButton(
(ResourcePaths::getGuiPath() + "window/help.png").c_str(),
(ResourcePaths::getGuiPath() + "window/help_hover.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/help.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/help_hover.png").c_str(),
parent)
, m_helpText(helpText)
{
+2 -2
View File
@@ -28,8 +28,8 @@ QtLocationPicker::QtLocationPicker(QWidget *parent)
layout->addWidget(m_data);
m_button = new QtIconButton(
(ResourcePaths::getGuiPath() + "window/dots.png").c_str(),
(ResourcePaths::getGuiPath() + "window/dots_hover.png").c_str());
(ResourcePaths::getGuiPath().str() + "window/dots.png").c_str(),
(ResourcePaths::getGuiPath().str() + "window/dots_hover.png").c_str());
m_button->setObjectName("dotsButton");
m_button->setToolTip("pick file");
connect(m_button, SIGNAL(clicked()), this, SLOT(handleButtonPress()));
+1 -1
View File
@@ -11,7 +11,7 @@ QtProgressBar::QtProgressBar(QWidget* parent)
: QWidget(parent)
, m_percent(0)
, m_count(0)
, m_pixmap((ResourcePaths::getGuiPath() + "indexing_dialog/progress_bar_element.png").c_str())
, m_pixmap((ResourcePaths::getGuiPath().str() + "indexing_dialog/progress_bar_element.png").c_str())
{
m_timer = new QTimer(this);
connect(m_timer, SIGNAL(timeout()), this, SLOT(animate()));
+1 -1
View File
@@ -49,7 +49,7 @@ void QtRefreshBar::refreshStyle()
m_refreshButton->setFixedHeight(height);
m_refreshButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "refresh_view/images/refresh.png",
ResourcePaths::getGuiPath().str() + "refresh_view/images/refresh.png",
"search/button"
));
}
+2 -2
View File
@@ -102,12 +102,12 @@ void QtSearchBar::refreshStyle()
m_homeButton->setFixedHeight(m_searchBox->height() + 5);
m_searchButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "search_view/images/search.png",
ResourcePaths::getGuiPath().str() + "search_view/images/search.png",
"search/button"
));
m_homeButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "search_view/images/home.png",
ResourcePaths::getGuiPath().str() + "search_view/images/home.png",
"search/button"
));
}
+2 -2
View File
@@ -13,7 +13,7 @@ QtStatusBar::QtStatusBar()
{
addWidget(new QWidget()); // add some space
QMovie* movie = new QMovie((ResourcePaths::getGuiPath() + "statusbar_view/loader.gif").c_str());
QMovie* movie = new QMovie((ResourcePaths::getGuiPath().str() + "statusbar_view/loader.gif").c_str());
// if movie doesn't loop forever, force it to.
if (movie->loopCount() != -1)
{
@@ -37,7 +37,7 @@ QtStatusBar::QtStatusBar()
m_errorButton.setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
m_errorButton.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }");
m_errorButton.setIcon(utility::colorizePixmap(
QPixmap((ResourcePaths::getGuiPath() + "statusbar_view/dot.png").c_str()),
QPixmap((ResourcePaths::getGuiPath().str() + "statusbar_view/dot.png").c_str()),
"#D00000"
).scaledToHeight(12));
addPermanentWidget(&m_errorButton);
+2 -2
View File
@@ -76,12 +76,12 @@ void QtUndoRedo::refreshStyle()
m_redoButton->setFixedHeight(height);
m_undoButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "undoredo_view/images/arrow_left.png",
ResourcePaths::getGuiPath().str() + "undoredo_view/images/arrow_left.png",
"search/button"
));
m_redoButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "undoredo_view/images/arrow_right.png",
ResourcePaths::getGuiPath().str() + "undoredo_view/images/arrow_right.png",
"search/button"
));
}
+2 -2
View File
@@ -139,12 +139,12 @@ void QtGraphicsView::updateZoom(float delta)
void QtGraphicsView::refreshStyle()
{
m_zoomInButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/zoom_in.png",
ResourcePaths::getGuiPath().str() + "graph_view/images/zoom_in.png",
"search/button"
));
m_zoomOutButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/zoom_out.png",
ResourcePaths::getGuiPath().str() + "graph_view/images/zoom_out.png",
"search/button"
));
}
-2
View File
@@ -6,8 +6,6 @@
#include <QGraphicsView>
#include <QPushButton>
#include "utility/file/FilePath.h"
class QTimer;
class QtGraphNode;
+7 -6
View File
@@ -9,6 +9,7 @@
#include <QPainter>
#include <QWidget>
#include "utility/file/FilePath.h"
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/ResourcePaths.h"
@@ -35,7 +36,7 @@ namespace utility
widget->setSizePolicy(pol);
}
void loadFontsFromDirectory(const std::string& path, const std::string& extension)
void loadFontsFromDirectory(const FilePath& path, const std::string& extension)
{
std::vector<std::string> extensions;
extensions.push_back(extension);
@@ -65,7 +66,7 @@ namespace utility
}
}
std::string getStyleSheet(const std::string& path)
std::string getStyleSheet(const FilePath& path)
{
std::string css = TextAccess::createFromFile(path)->getText();
@@ -84,7 +85,7 @@ namespace utility
std::deque<std::string> seq = utility::split(css.substr(posA + 1, posB - posA - 1), ':');
if (seq.size() != 2)
{
LOG_ERROR("Syntax error in file: " + path);
LOG_ERROR("Syntax error in file: " + path.str());
return "";
}
@@ -143,7 +144,7 @@ namespace utility
}
else if (val == "gui_path")
{
val = ResourcePaths::getGuiPath();
val = ResourcePaths::getGuiPath().str();
size_t index = 0;
while (true)
@@ -159,7 +160,7 @@ namespace utility
}
else
{
LOG_ERROR("Syntax error in file: " + path);
LOG_ERROR("Syntax error in file: " + path.str());
return "";
}
}
@@ -169,7 +170,7 @@ namespace utility
}
else
{
LOG_ERROR("Syntax error in file: " + path);
LOG_ERROR("Syntax error in file: " + path.str());
return "";
}
+3 -2
View File
@@ -8,15 +8,16 @@ class QIcon;
class QPixmap;
class QString;
class QWidget;
class FilePath;
namespace utility
{
void setWidgetBackgroundColor(QWidget* widget, const std::string& color);
void setWidgetRetainsSpaceWhenHidden(QWidget* widget);
void loadFontsFromDirectory(const std::string& path, const std::string& extension = ".otf");
void loadFontsFromDirectory(const FilePath& path, const std::string& extension = ".otf");
std::string getStyleSheet(const std::string& path);
std::string getStyleSheet(const FilePath& path);
QPixmap colorizePixmap(const QPixmap& pixmap, QColor color);
QIcon createButtonIcon(const std::string& iconPath, const std::string& colorId);
+5 -5
View File
@@ -88,7 +88,7 @@ void QtBookmarkView::setCreateButtonState(const CreateButtonState& state)
m_createButtonState = state;
m_createBookmarkButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "bookmark_view/images/edit_bookmark_icon.png",
ResourcePaths::getGuiPath().str() + "bookmark_view/images/edit_bookmark_icon.png",
"search/button"
));
@@ -105,7 +105,7 @@ void QtBookmarkView::setCreateButtonState(const CreateButtonState& state)
m_createBookmarkButton->setEnabled(true);
m_createBookmarkButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_active.png",
ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_active.png",
"search/button"
));
}
@@ -240,7 +240,7 @@ void QtBookmarkView::displayBookmarkEditor(std::shared_ptr<Bookmark> bookmark, c
void QtBookmarkView::setStyleSheet()
{
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "bookmark_view/bookmark_view.css").c_str());
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("bookmark_view/bookmark_view.css"))).c_str());
}
void QtBookmarkView::refreshStyle()
@@ -251,12 +251,12 @@ void QtBookmarkView::refreshStyle()
m_showBookmarksButton->setFixedHeight(height);
m_createBookmarkButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "bookmark_view/images/edit_bookmark_icon.png",
ResourcePaths::getGuiPath().str() + "bookmark_view/images/edit_bookmark_icon.png",
"search/button"
));
m_showBookmarksButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_list_icon.png",
ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_list_icon.png",
"search/button"
));
}
+1 -1
View File
@@ -267,7 +267,7 @@ void QtCodeView::setStyleSheet() const
{
utility::setWidgetBackgroundColor(m_widget, ColorScheme::getInstance()->getColor("code/background"));
std::string styleSheet = utility::getStyleSheet(ResourcePaths::getGuiPath() + "code_view/code_view.css");
std::string styleSheet = utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("code_view/code_view.css")));
m_widget->setStyleSheet(styleSheet.c_str());
}
+1 -1
View File
@@ -50,7 +50,7 @@ QtErrorView::QtErrorView(ViewLayout* viewLayout)
, m_setErrorIdFunctor(std::bind(&QtErrorView::doSetErrorId, this, std::placeholders::_1))
, m_ignoreRowSelection(false)
{
s_errorIcon = QIcon(QString((ResourcePaths::getGuiPath() + "/indexing_dialog/error.png").c_str()));
s_errorIcon = QIcon(QString((ResourcePaths::getGuiPath().str() + "/indexing_dialog/error.png").c_str()));
}
QtErrorView::~QtErrorView()
+5 -5
View File
@@ -441,12 +441,12 @@ void QtGraphView::updateTrailButtons()
}
m_backwardTrailButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/" + backwardImagePath,
ResourcePaths::getGuiPath().str() + "graph_view/images/" + backwardImagePath,
"search/button"
));
m_forwardTrailButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/" + forwardImagePath,
ResourcePaths::getGuiPath().str() + "graph_view/images/" + forwardImagePath,
"search/button"
));
}
@@ -646,19 +646,19 @@ void QtGraphView::doRefreshView()
QtGraphicsView* view = getView();
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "graph_view/graph_view.css");
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("graph_view/graph_view.css")));
view->setStyleSheet(css.c_str());
view->setAppZoomFactor(GraphViewStyle::getZoomFactor());
m_trailWidget->setStyleSheet(css.c_str());
m_expandButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/graph.png",
ResourcePaths::getGuiPath().str() + "graph_view/images/graph.png",
"search/button"
));
m_collapseButton->setIcon(utility::createButtonIcon(
ResourcePaths::getGuiPath() + "graph_view/images/graph_arrow.png",
ResourcePaths::getGuiPath().str() + "graph_view/images/graph_arrow.png",
"search/button"
));
+1 -1
View File
@@ -216,7 +216,7 @@ void QtLogView::setStyleSheet() const
//m_showNonIndexedFatals->setPalette(palette);
widget->setStyleSheet(
utility::getStyleSheet(ResourcePaths::getGuiPath() + "error_view/error_view.css").c_str()
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("error_view/error_view.css"))).c_str()
);
m_table->updateRows();
+1 -1
View File
@@ -41,5 +41,5 @@ void QtRefreshView::doRefreshView()
void QtRefreshView::setStyleSheet()
{
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "refresh_view/refresh_view.css").c_str());
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("refresh_view/refresh_view.css"))).c_str());
}
+1 -1
View File
@@ -93,7 +93,7 @@ void QtSearchView::doSetAutocompletionList(const std::vector<SearchMatch>& autoc
void QtSearchView::setStyleSheet()
{
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "search_view/search_view.css");
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("search_view/search_view.css")));
m_widget->setStyleSheet(css.c_str());
+1 -1
View File
@@ -68,6 +68,6 @@ void QtTabbedView::setStyleSheet()
utility::setWidgetBackgroundColor(QtViewWidgetWrapper::getWidgetOfView(this), ColorScheme::getInstance()->getColor("tab/background"));
m_widget->setStyleSheet(
utility::getStyleSheet(ResourcePaths::getGuiPath() + "tabbed_view/tabbed_view.css").c_str()
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("tabbed_view/tabbed_view.css"))).c_str()
);
}
+1 -1
View File
@@ -37,7 +37,7 @@ void QtUndoRedoView::refreshView()
void QtUndoRedoView::setStyleSheet()
{
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "undoredo_view/undoredo_view.css").c_str());
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("undoredo_view/undoredo_view.css"))).c_str());
}
void QtUndoRedoView::doRefreshView()
@@ -428,7 +428,7 @@ void QtGraphNode::setStyle(const GraphViewStyle::NodeStyle& style)
if (style.hasHatching)
{
QtDeviceScaledPixmap pattern((ResourcePaths::getGuiPath() + "graph_view/images/pattern.png").c_str());
QtDeviceScaledPixmap pattern((ResourcePaths::getGuiPath().str() + "graph_view/images/pattern.png").c_str());
pattern.scaleToHeight(12);
QPixmap pixmap = utility::colorizePixmap(pattern.pixmap(), style.color.hatching.c_str());
@@ -47,7 +47,7 @@ QtGraphNodeAccess::QtGraphNodeAccess(AccessKind accessKind)
if (iconFileName.size() > 0)
{
QtDeviceScaledPixmap pixmap(
QString::fromStdString(ResourcePaths::getGuiPath() + "graph_view/images/" + iconFileName + ".png"));
QString::fromStdString(ResourcePaths::getGuiPath().str() + "graph_view/images/" + iconFileName + ".png"));
pixmap.scaleToHeight(m_accessIconSize);
m_accessIcon = new QGraphicsPixmapItem(pixmap.pixmap(), this);
@@ -1,5 +1,6 @@
#include "qt/view/graphElements/QtGraphNodeData.h"
#include "utility/file/FilePath.h"
#include "utility/messaging/type/MessageActivateNodes.h"
#include "utility/messaging/type/MessageDeactivateEdge.h"
#include "utility/messaging/type/MessageFocusIn.h"
@@ -1,10 +1,10 @@
#ifndef QT_GRAPH_NODE_DATA_H
#define QT_GRAPH_NODE_DATA_H
#include "utility/file/FilePath.h"
#include "qt/view/graphElements/QtGraphNode.h"
class FilePath;
class QtGraphNodeData
: public QtGraphNode
{
@@ -26,7 +26,7 @@ QtGraphNodeExpandToggle::QtGraphNodeExpandToggle(bool expanded, int invisibleSub
m_icon->setTransformationMode(Qt::SmoothTransformation);
m_icon->setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
QtDeviceScaledPixmap pixmap((ResourcePaths::getGuiPath() + "graph_view/images/arrow.png").c_str());
QtDeviceScaledPixmap pixmap((ResourcePaths::getGuiPath().str() + "graph_view/images/arrow.png").c_str());
pixmap.scaleToHeight(iconHeight);
if (invisibleSubNodeCount)
+5 -5
View File
@@ -31,7 +31,7 @@ void QtAbout::setupAbout()
"}"
);
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "about/about.css").c_str());
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("about/about.css"))).c_str());
QVBoxLayout* windowLayout = new QVBoxLayout();
windowLayout->setContentsMargins(10, 10, 10, 0);
@@ -45,7 +45,7 @@ void QtAbout::setupAbout()
QVBoxLayout* column = new QVBoxLayout();
row->addLayout(column);
QtDeviceScaledPixmap sourcetrailLogo((ResourcePaths::getGuiPath() + "about/logo_sourcetrail.png").c_str());
QtDeviceScaledPixmap sourcetrailLogo((ResourcePaths::getGuiPath().str() + "about/logo_sourcetrail.png").c_str());
sourcetrailLogo.scaleToHeight(150);
QLabel* sourcetrailLogoLabel = new QLabel(this);
sourcetrailLogoLabel->setPixmap(sourcetrailLogo.pixmap());
@@ -59,7 +59,7 @@ void QtAbout::setupAbout()
QVBoxLayout* column = new QVBoxLayout();
row->addLayout(column);
QtDeviceScaledPixmap closePixmap((ResourcePaths::getGuiPath() + "about/icon_close.png").c_str());
QtDeviceScaledPixmap closePixmap((ResourcePaths::getGuiPath().str() + "about/icon_close.png").c_str());
closePixmap.scaleToHeight(20);
QPushButton* closeButton = new QPushButton(this);
closeButton->setIcon(QIcon(closePixmap.pixmap()));
@@ -139,14 +139,14 @@ void QtAbout::setupAbout()
QHBoxLayout* rowAcknowledgementsLogos = new QHBoxLayout();
column->addLayout(rowAcknowledgementsLogos);
QtDeviceScaledPixmap fhsLogo((ResourcePaths::getGuiPath() + "about/logo_fhs.png").c_str());
QtDeviceScaledPixmap fhsLogo((ResourcePaths::getGuiPath().str() + "about/logo_fhs.png").c_str());
fhsLogo.scaleToHeight(30);
QLabel* fhsLabel = new QLabel(this);
fhsLabel->setPixmap(fhsLogo.pixmap());
fhsLabel->resize(fhsLogo.width(), fhsLogo.height());
rowAcknowledgementsLogos->addWidget(fhsLabel);
QtDeviceScaledPixmap awsLogo((ResourcePaths::getGuiPath() + "about/logo_aws.png").c_str());
QtDeviceScaledPixmap awsLogo((ResourcePaths::getGuiPath().str() + "about/logo_aws.png").c_str());
awsLogo.scaleToHeight(30);
QLabel* awsLabel = new QLabel(this);
awsLabel->setPixmap(awsLogo.pixmap());
+2 -2
View File
@@ -24,8 +24,8 @@ QtBookmarkBrowser::~QtBookmarkBrowser()
void QtBookmarkBrowser::setupBookmarkBrowser()
{
setStyleSheet((
utility::getStyleSheet(ResourcePaths::getGuiPath() + "window/window.css") +
utility::getStyleSheet(ResourcePaths::getGuiPath() + "bookmark_view/bookmark_view.css")
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("window/window.css"))) +
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("bookmark_view/bookmark_view.css")))
).c_str());
m_headerBackground = new QWidget(m_window);
+2 -2
View File
@@ -113,8 +113,8 @@ void QtBookmarkCreator::setupBookmarkCreator()
void QtBookmarkCreator::refreshStyle()
{
setStyleSheet((
utility::getStyleSheet(ResourcePaths::getGuiPath() + "window/window.css") +
utility::getStyleSheet(ResourcePaths::getGuiPath() + "bookmark_view/bookmark_view.css")
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("window/window.css"))) +
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("bookmark_view/bookmark_view.css")))
).c_str());
}
+4 -4
View File
@@ -340,8 +340,8 @@ QBoxLayout* QtIndexingDialog::createLayout()
);
setStyleSheet((
utility::getStyleSheet(ResourcePaths::getGuiPath() + "window/window.css") +
utility::getStyleSheet(ResourcePaths::getGuiPath() + "indexing_dialog/indexing_dialog.css")
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("window/window.css"))) +
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("indexing_dialog/indexing_dialog.css")))
).c_str());
QVBoxLayout* layout = new QVBoxLayout(this);
@@ -419,7 +419,7 @@ void QtIndexingDialog::addErrorLabel(QBoxLayout* layout)
m_errorLabel->setObjectName("errorCount");
m_errorLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
std::string text = ResourcePaths::getGuiPath() + "indexing_dialog/error.png";
std::string text = ResourcePaths::getGuiPath().str() + "indexing_dialog/error.png";
m_errorLabel->setIcon(QPixmap(text.c_str()));
layout->addWidget(m_errorLabel, 0, Qt::AlignRight);
@@ -448,7 +448,7 @@ void QtIndexingDialog::addButtons(QBoxLayout* layout)
void QtIndexingDialog::addFlag()
{
QtDeviceScaledPixmap flag((ResourcePaths::getGuiPath() + "indexing_dialog/flag.png").c_str());
QtDeviceScaledPixmap flag((ResourcePaths::getGuiPath().str() + "indexing_dialog/flag.png").c_str());
flag.scaleToWidth(120);
QLabel* flagLabel = new QLabel(this);
@@ -72,7 +72,7 @@ void QtKeyboardShortcuts::populateWindow(QWidget* widget)
widget->setLayout(layout);
widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "keyboard_shortcuts/keyboard_shortcuts.css").c_str());
widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("keyboard_shortcuts/keyboard_shortcuts.css"))).c_str());
}
void QtKeyboardShortcuts::windowReady()
+1 -2
View File
@@ -7,7 +7,6 @@
#include "LicenseChecker.h"
#include "qt/utility/utilityQt.h"
#include "utility/file/FilePath.h"
#include "utility/ResourcePaths.h"
QtLicense::QtLicense(QWidget *parent)
@@ -121,7 +120,7 @@ void QtLicense::populateWindow(QWidget* widget)
void QtLicense::windowReady()
{
m_content->setStyleSheet(m_content->styleSheet() + utility::getStyleSheet(ResourcePaths::getGuiPath() + "license/license.css").c_str());
m_content->setStyleSheet(m_content->styleSheet() + utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("license/license.css"))).c_str());
addLogo();
+11 -11
View File
@@ -102,13 +102,13 @@ QtMainWindow::QtMainWindow()
setCentralWidget(nullptr);
setDockNestingEnabled(true);
setWindowIcon(QIcon((ResourcePaths::getGuiPath() + "icon/logo_1024_1024.png").c_str()));
setWindowIcon(QIcon((ResourcePaths::getGuiPath().str() + "icon/logo_1024_1024.png").c_str()));
setWindowFlags(Qt::Widget);
QApplication* app = dynamic_cast<QApplication*>(QCoreApplication::instance());
app->installEventFilter(new MouseReleaseFilter(this));
app->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "main.css").c_str());
app->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("main.css"))).c_str());
m_recentProjectAction = new QAction*[ApplicationSettings::getInstance()->getMaxRecentProjectsCount()];
@@ -187,7 +187,7 @@ void QtMainWindow::hideView(View* view)
void QtMainWindow::loadLayout()
{
QSettings settings(UserPaths::getWindowSettingsPath().c_str(), QSettings::IniFormat);
QSettings settings(UserPaths::getWindowSettingsPath().str().c_str(), QSettings::IniFormat);
settings.beginGroup("MainWindow");
resize(settings.value("size", QSize(600, 400)).toSize());
@@ -203,7 +203,7 @@ void QtMainWindow::loadLayout()
void QtMainWindow::loadDockWidgetLayout()
{
QSettings settings(UserPaths::getWindowSettingsPath().c_str(), QSettings::IniFormat);
QSettings settings(UserPaths::getWindowSettingsPath().str().c_str(), QSettings::IniFormat);
this->restoreState(settings.value("DOCK_LOCATIONS").toByteArray());
for (DockWidget dock : m_dockWidgets)
@@ -215,7 +215,7 @@ void QtMainWindow::loadDockWidgetLayout()
void QtMainWindow::saveLayout()
{
QSettings settings(UserPaths::getWindowSettingsPath().c_str(), QSettings::IniFormat);
QSettings settings(UserPaths::getWindowSettingsPath().str().c_str(), QSettings::IniFormat);
settings.beginGroup("MainWindow");
settings.setValue("maximized", isMaximized());
@@ -362,12 +362,12 @@ void QtMainWindow::enteredLicense()
void QtMainWindow::showDataFolder()
{
QDesktopServices::openUrl(QUrl(("file:///" + UserPaths::getUserDataPath()).c_str(), QUrl::TolerantMode));
QDesktopServices::openUrl(QUrl(("file:///" + UserPaths::getUserDataPath().str()).c_str(), QUrl::TolerantMode));
}
void QtMainWindow::showLogFolder()
{
QDesktopServices::openUrl(QUrl(("file:///" + UserPaths::getLogPath()).c_str(), QUrl::TolerantMode));
QDesktopServices::openUrl(QUrl(("file:///" + UserPaths::getLogPath().str()).c_str(), QUrl::TolerantMode));
}
void QtMainWindow::showStartScreen()
@@ -416,7 +416,7 @@ void QtMainWindow::newProject()
void QtMainWindow::newProjectFromSolution(const std::string& ideId, const std::string& solutionPath)
{
QtProjectWizzard* wizzard = createWindow<QtProjectWizzard>();
wizzard->newProjectFromSolution(ideId, solutionPath);
wizzard->newProjectFromSolution(ideId, FilePath(solutionPath));
}
void QtMainWindow::newProjectFromCDB(const std::string& filePath, const std::vector<std::string>& headerPaths)
@@ -438,7 +438,7 @@ void QtMainWindow::openProject()
if (!fileName.isEmpty())
{
MessageLoadProject(fileName.toStdString(), false).dispatch();
MessageLoadProject(FilePath(fileName.toStdString()), false).dispatch();
m_windowStack.clearWindows();
}
}
@@ -528,7 +528,7 @@ void QtMainWindow::resetZoom()
void QtMainWindow::resetWindowLayout()
{
FileSystem::remove(UserPaths::getWindowSettingsPath());
FileSystem::copyFile(ResourcePaths::getFallbackPath() + "window_settings.ini", UserPaths::getWindowSettingsPath());
FileSystem::copyFile(ResourcePaths::getFallbackPath().concat(FilePath("window_settings.ini")), UserPaths::getWindowSettingsPath());
loadDockWidgetLayout();
}
@@ -537,7 +537,7 @@ void QtMainWindow::openRecentProject()
QAction *action = qobject_cast<QAction *>(sender());
if (action)
{
MessageLoadProject(action->data().toString().toStdString(), false).dispatch();
MessageLoadProject(FilePath(action->data().toString().toStdString()), false).dispatch();
m_windowStack.clearWindows();
}
}
@@ -4,6 +4,8 @@
#include <QListWidget>
#include <QPushButton>
#include "utility/file/FilePath.h"
QtSelectPathsDialog::QtSelectPathsDialog(const QString& title, const QString& description, QWidget* parent)
: QtTextEditDialog(title, description, parent)
{
@@ -17,7 +19,7 @@ std::vector<FilePath> QtSelectPathsDialog::getPathsList() const
{
if (m_list->item(i)->checkState() == Qt::Checked)
{
checkedPaths.push_back(m_list->item(i)->text().toStdString());
checkedPaths.push_back(FilePath(m_list->item(i)->text().toStdString()));
}
}
+1 -1
View File
@@ -2,8 +2,8 @@
#define QT_SELECT_PATHS_DIALOG_H
#include "qt/window/QtTextEditDialog.h"
#include "utility/file/FilePath.h"
class FilePath;
class QListWidget;
class QtSelectPathsDialog
+2 -2
View File
@@ -25,11 +25,11 @@ QtSplashScreen::QtSplashScreen(const QPixmap &pixmap, Qt::WindowFlags f)
: QSplashScreen(pixmap, f)
, m_state(0)
{
QtDeviceScaledPixmap foreground((ResourcePaths::getGuiPath() + "splash_white.png").c_str());
QtDeviceScaledPixmap foreground((ResourcePaths::getGuiPath().str() + "splash_white.png").c_str());
foreground.scaleToHeight(pixmap.size().height() * 0.8);
m_foreground = foreground.pixmap();
QtDeviceScaledPixmap background((ResourcePaths::getGuiPath() + "splash_blue.png").c_str());
QtDeviceScaledPixmap background((ResourcePaths::getGuiPath().str() + "splash_blue.png").c_str());
background.scaleToHeight(pixmap.size().height() * 0.9);
m_background = background.pixmap();
}
+7 -7
View File
@@ -49,7 +49,7 @@ void QtRecentProjectButton::handleButtonClick()
{
if (m_projectExists)
{
MessageLoadProject(m_projectFilePath.str(), false).dispatch();
MessageLoadProject(m_projectFilePath, false).dispatch();
}
else
{
@@ -139,12 +139,12 @@ size_t i = 0;
}
i++;
}
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "startscreen/startscreen.css").c_str());
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("startscreen/startscreen.css"))).c_str());
}
void QtStartScreen::setupStartScreen(bool unlocked)
{
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "startscreen/startscreen.css").c_str());
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("startscreen/startscreen.css"))).c_str());
addLogo();
QHBoxLayout* layout = new QHBoxLayout();
@@ -261,10 +261,10 @@ void QtStartScreen::setupStartScreen(bool unlocked)
col->addSpacing(20);
m_cppIcon = new QIcon((ResourcePaths::getGuiPath() + "icon/cpp_icon.png").c_str());
m_cIcon = new QIcon((ResourcePaths::getGuiPath() + "icon/c_icon.png").c_str());
m_javaIcon = new QIcon((ResourcePaths::getGuiPath() + "icon/java_icon.png").c_str());
m_projectIcon = new QIcon((ResourcePaths::getGuiPath() + "icon/empty_icon.png").c_str());
m_cppIcon = new QIcon((ResourcePaths::getGuiPath().str() + "icon/cpp_icon.png").c_str());
m_cIcon = new QIcon((ResourcePaths::getGuiPath().str() + "icon/c_icon.png").c_str());
m_javaIcon = new QIcon((ResourcePaths::getGuiPath().str() + "icon/java_icon.png").c_str());
m_projectIcon = new QIcon((ResourcePaths::getGuiPath().str() + "icon/empty_icon.png").c_str());
for (int i = 0
; i < ApplicationSettings::getInstance()->getMaxRecentProjectsCount()
; i++)
+3 -3
View File
@@ -77,7 +77,7 @@ QSize QtWindow::sizeHint() const
void QtWindow::setup()
{
m_content->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "window/window.css").c_str());
m_content->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("window/window.css"))).c_str());
QVBoxLayout* layout = new QVBoxLayout();
layout->setContentsMargins(25, 30, 25, 0);
@@ -140,7 +140,7 @@ void QtWindow::setSizeGripStyle(bool isBlack)
"QSizeGrip {"
" max-height: 16px;"
" max-width: 16px;"
" border-image: url(" + ResourcePaths::getGuiPath() + "window/" + path + ");"
" border-image: url(" + ResourcePaths::getGuiPath().str() + "window/" + path + ");"
"}"
));
}
@@ -426,7 +426,7 @@ void QtWindow::setupDone()
void QtWindow::addLogo()
{
QtDeviceScaledPixmap sourcetrailLogo((ResourcePaths::getGuiPath() + "window/logo.png").c_str());
QtDeviceScaledPixmap sourcetrailLogo((ResourcePaths::getGuiPath().str() + "window/logo.png").c_str());
sourcetrailLogo.scaleToWidth(240);
@@ -467,7 +467,7 @@ void QtProjectWizzard::sourcePathsJava()
void QtProjectWizzard::sourcePathsJavaMaven()
{
std::dynamic_pointer_cast<SourceGroupSettingsJava>(m_sourceGroupSettings)->setMavenDependenciesDirectory(
"./sourcetrail_dependencies/" + utility::replace(m_projectSettings->getProjectName(), " ", "_") + "/maven"
FilePath("./sourcetrail_dependencies/" + utility::replace(m_projectSettings->getProjectName(), " ", "_") + "/maven")
);
QtProjectWizzardWindow* window = createWindowWithSummary(
@@ -85,7 +85,7 @@ void QtProjectWizzardContentData::save()
if (m_projectName)
{
m_projectSettings->setProjectName(m_projectName->text().toStdString());
m_projectSettings->setProjectFileLocation(m_projectFileLocation->getText().toStdString());
m_projectSettings->setProjectFileLocation(FilePath(m_projectFileLocation->getText().toStdString()));
}
if (m_standard)
@@ -239,7 +239,7 @@ void QtProjectWizzardContentDataCDB::save()
{
QtProjectWizzardContentData::save();
FilePath path = m_buildFilePicker->getText().toStdString();
FilePath path(m_buildFilePicker->getText().toStdString());
FilePath absPath = m_projectSettings->makePathAbsolute(m_projectSettings->expandPath(path)); // maybe we can use SourceGroupSettings for this... that's where the the cdb path is stored.
if (!absPath.exists() || absPath.extension() != ".json")
{
@@ -260,7 +260,7 @@ bool QtProjectWizzardContentDataCDB::check()
return false;
}
FilePath path = m_buildFilePicker->getText().toStdString();
FilePath path(m_buildFilePicker->getText().toStdString());
FilePath absPath = m_projectSettings->makePathAbsolute(m_projectSettings->expandPath(path));
if (!absPath.exists() || absPath.extension() != ".json")
{
@@ -115,7 +115,7 @@ void QtProjectWizzardContentPathSourceMaven::save()
std::shared_ptr<SourceGroupSettingsJava> javaSettings = std::dynamic_pointer_cast<SourceGroupSettingsJava>(m_settings);
if (javaSettings)
{
javaSettings->setMavenProjectFilePath(m_picker->getText().toStdString());
javaSettings->setMavenProjectFilePath(FilePath(m_picker->getText().toStdString()));
javaSettings->setShouldIndexMavenTests(m_shouldIndexTests->isChecked());
}
}
@@ -202,6 +202,6 @@ void QtProjectWizzardContentPathDependenciesMaven::save()
std::shared_ptr<SourceGroupSettingsJava> javaSettings = std::dynamic_pointer_cast<SourceGroupSettingsJava>(m_settings);
if (javaSettings)
{
javaSettings->setMavenDependenciesDirectory(m_picker->getText().toStdString());
javaSettings->setMavenDependenciesDirectory(FilePath(m_picker->getText().toStdString()));
}
}
@@ -271,7 +271,7 @@ void QtProjectWizzardContentPreferences::load()
if (m_mavenPath)
{
m_mavenPath->setText(QString::fromStdString(appSettings->getMavenPath()));
m_mavenPath->setText(QString::fromStdString(appSettings->getMavenPath().str()));
}
}
@@ -316,7 +316,7 @@ void QtProjectWizzardContentPreferences::save()
if (m_mavenPath)
{
appSettings->setMavenPath(m_mavenPath->getText().toStdString());
appSettings->setMavenPath(FilePath(m_mavenPath->getText().toStdString()));
}
}
@@ -111,7 +111,7 @@ void QtProjectWizzardContentSelect::populate(QGridLayout* layout, int& row)
{
QToolButton* b = createProjectButton(
utility::insertLineBreaksAtBlankSpaces(sourceGroupTypeToProjectSetupString(projectIt.type), 15).c_str(),
(ResourcePaths::getGuiPath() + "icon/" + m_projectTypeIconName[projectIt.type] + ".png").c_str()
(ResourcePaths::getGuiPath().str() + "icon/" + m_projectTypeIconName[projectIt.type] + ".png").c_str()
);
b->setProperty("source_group_type", int(projectIt.type));
projectButtons->addButton(b);