From 4b8403be4bfb7d6e2acdee880b649adc8f3f4d34 Mon Sep 17 00:00:00 2001 From: nordsoft Date: Wed, 30 Nov 2022 15:22:53 +0400 Subject: [PATCH] Add icons into search path --- mapeditor/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index a37ba74c6..3acf2d678 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -120,6 +120,10 @@ MainWindow::MainWindow(QWidget* parent) : ui(new Ui::MainWindow), controller(this) { + for(auto & string : VCMIDirs::get().dataPaths()) + QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons")); + QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons")); + ui->setupUi(this); loadUserSettings(); //For example window size setTitle();