diff --git a/apps/opencs/view/world/datadisplaydelegate.cpp b/apps/opencs/view/world/datadisplaydelegate.cpp index 713fedb4ba..c642a05e2b 100644 --- a/apps/opencs/view/world/datadisplaydelegate.cpp +++ b/apps/opencs/view/world/datadisplaydelegate.cpp @@ -71,7 +71,7 @@ bool CSVWorld::DataDisplayDelegate::eventFilter(QObject* target, QEvent* event) QColor themeColor = QApplication::palette().text().color(); if (themeColor != mPixmapsColor) { - mPixmapsColor = themeColor; + mPixmapsColor = std::move(themeColor); buildPixmaps(); } diff --git a/apps/opencs/view/world/scriptsubview.cpp b/apps/opencs/view/world/scriptsubview.cpp index 793f2e58c1..aa6890904d 100644 --- a/apps/opencs/view/world/scriptsubview.cpp +++ b/apps/opencs/view/world/scriptsubview.cpp @@ -212,7 +212,7 @@ void CSVWorld::ScriptSubView::useHint(const std::string& hint) if (hint.empty()) return; - unsigned line = 0, column = 0; + int line = 0, column = 0; char c; std::istringstream stream(hint.c_str() + 1); switch (hint[0]) @@ -222,8 +222,8 @@ void CSVWorld::ScriptSubView::useHint(const std::string& hint) { QModelIndex index = mModel->getModelIndex(getUniversalId().getId(), mColumn); QString source = mModel->data(index).toString(); - unsigned stringSize = source.length(); - unsigned pos, dummy; + int stringSize = static_cast(source.length()); + int pos, dummy; if (!(stream >> c >> dummy >> pos)) return; @@ -234,7 +234,7 @@ void CSVWorld::ScriptSubView::useHint(const std::string& hint) pos = stringSize; } - for (unsigned i = 0; i <= pos; ++i) + for (int i = 0; i <= pos; ++i) { if (source[i] == '\n') { diff --git a/components/misc/scalableicon.cpp b/components/misc/scalableicon.cpp index 0b30eaf2ab..b3f4304557 100644 --- a/components/misc/scalableicon.cpp +++ b/components/misc/scalableicon.cpp @@ -36,7 +36,12 @@ namespace Misc return QIcon(); QFile iconFile(fileName); - iconFile.open(QIODevice::ReadOnly); + if (!iconFile.open(QIODevice::ReadOnly)) + { + qDebug() << "Failed to open icon file:" << fileName; + return QIcon(); + } + auto content = iconFile.readAll(); if (!content.startsWith("