Skip to content

Commit

Permalink
[themedaemon] load default icon fi icon not found
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Jul 10, 2024
1 parent 4f0a2ec commit 0263898
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Binary file added src/controls/images/no-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(HEADERS
themedaemon/mabstractthemedaemonclient.h)

add_library(nemocoreplugin SHARED ${SRC} ${MLITE})
add_definitions( -DQT_INSTALL_QML="${QT_INSTALL_QML}")

qt6_add_qml_module(nemocoreplugin
URI Nemo
Expand Down
8 changes: 7 additions & 1 deletion src/core/themedaemon/mlocalthemedaemonclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**
** Copyright (C) 2013 Jolla Ltd.
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2022 Chupligin Sergey (NeoChapay) <[email protected]>
** Copyright (C) 2022-2024 Chupligin Sergey (NeoChapay) <[email protected]>
**
** This file is part of the Qt Components project.
**
Expand Down Expand Up @@ -46,6 +46,10 @@
#include <QDirIterator>
#include <QSettings>

#ifndef QT_INSTALL_QML
#error QT_INSTALL_QML is not set!
#endif

MLocalThemeDaemonClient::MLocalThemeDaemonClient(const QString& testPath, QObject* parent)
: MAbstractThemeDaemonClient(parent)
, m_pixmapCache()
Expand Down Expand Up @@ -148,6 +152,8 @@ QPixmap MLocalThemeDaemonClient::requestPixmap(const QString& id, const QSize& r
const QImage image = readImage(parts.at(0));
if (!image.isNull()) {
pixmap = QPixmap::fromImage(image);
} else {
pixmap = QPixmap::fromImage(QImage(QString::fromUtf8(QT_INSTALL_QML) + "/Nemo/Controls/images/no-icon.png"));
}
if (parts.length() > 1)
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
Expand Down

0 comments on commit 0263898

Please sign in to comment.