Commit 0ebc901c authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

better error messages

it's only qWarning()s, but anyway ...
parent d32ad81a
...@@ -447,7 +447,7 @@ public: ...@@ -447,7 +447,7 @@ public:
QString styleSheet(file.readAll()); QString styleSheet(file.readAll());
q->setStyleSheet(styleSheet); q->setStyleSheet(styleSheet);
} else { } else {
qWarning() << QLatin1String("setStyleSheetFile: ") << url << QLatin1String(" not found!"); qWarning() << QString::fromLatin1("setStyleSheetFile: %1: %2").arg(fileName, file.errorString());
} }
} }
...@@ -636,10 +636,10 @@ private: ...@@ -636,10 +636,10 @@ private:
if (file.open(QIODevice::ReadOnly)) { if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path); QPixmap pixmap(path);
if (pixmap.isNull()) if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << "setIconFromFile: failed to load" << path;
pb->setIcon(pixmap); pb->setIcon(pixmap);
} else { } else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
} }
} }
...@@ -701,10 +701,10 @@ private: ...@@ -701,10 +701,10 @@ private:
if (file.open(QIODevice::ReadOnly)) { if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path); QPixmap pixmap(path);
if (pixmap.isNull()) if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << "setIconFromFile: failed to load" << path;
lb->setPixmap(pixmap); lb->setPixmap(pixmap);
} else { } else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
} }
} }
...@@ -773,10 +773,10 @@ private: ...@@ -773,10 +773,10 @@ private:
if (file.open(QIODevice::ReadOnly)) { if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path); QPixmap pixmap(path);
if (pixmap.isNull()) if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << "setIconFromFile: failed to load" << path;
pb->setIcon(pixmap); pb->setIcon(pixmap);
} else { } else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
} }
} }
......
...@@ -98,7 +98,8 @@ LayoutWidget::~LayoutWidget() ...@@ -98,7 +98,8 @@ LayoutWidget::~LayoutWidget()
QPixmap pixmap(url.toLocalFile()); QPixmap pixmap(url.toLocalFile());
button->setIcon(pixmap); button->setIcon(pixmap);
} else { } else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!"); qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(
file.fileName(), file.errorString());
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment