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:
QString styleSheet(file.readAll());
q->setStyleSheet(styleSheet);
} else {
qWarning() << QLatin1String("setStyleSheetFile: ") << url << QLatin1String(" not found!");
qWarning() << QString::fromLatin1("setStyleSheetFile: %1: %2").arg(fileName, file.errorString());
}
}
......@@ -636,10 +636,10 @@ private:
if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path);
if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << "setIconFromFile: failed to load" << path;
pb->setIcon(pixmap);
} else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
}
}
......@@ -701,10 +701,10 @@ private:
if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path);
if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << "setIconFromFile: failed to load" << path;
lb->setPixmap(pixmap);
} else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
}
}
......@@ -773,10 +773,10 @@ private:
if (file.open(QIODevice::ReadOnly)) {
QPixmap pixmap(path);
if (pixmap.isNull())
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << "setIconFromFile: failed to load" << path;
pb->setIcon(pixmap);
} else {
qWarning() << QLatin1String("setIconFromFile: ") << url << QLatin1String(" not found!");
qWarning() << QString::fromLatin1("setIconFromFile: %1: %2").arg(path, file.errorString());
}
}
......
......@@ -98,7 +98,8 @@ LayoutWidget::~LayoutWidget()
QPixmap pixmap(url.toLocalFile());
button->setIcon(pixmap);
} 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