forked from qt-creator/qt-creator
TaskWindow: Don't complain about not finding files of task that have no file
Change-Id: Ied909ef47153186c9d661110bfaa5089c0296a21 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -840,7 +840,8 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|||||||
|
|
||||||
const QString directory = QDir::toNativeSeparators(index.data(TaskModel::File).toString());
|
const QString directory = QDir::toNativeSeparators(index.data(TaskModel::File).toString());
|
||||||
int secondBaseLine = positions.top() + fm.ascent() + height + leading;
|
int secondBaseLine = positions.top() + fm.ascent() + height + leading;
|
||||||
if (index.data(TaskModel::FileNotFound).toBool()) {
|
if (index.data(TaskModel::FileNotFound).toBool()
|
||||||
|
&& !directory.isEmpty()) {
|
||||||
QString fileNotFound = tr("File not found: %1").arg(directory);
|
QString fileNotFound = tr("File not found: %1").arg(directory);
|
||||||
painter->setPen(Qt::red);
|
painter->setPen(Qt::red);
|
||||||
painter->drawText(positions.textAreaLeft(), secondBaseLine, fileNotFound);
|
painter->drawText(positions.textAreaLeft(), secondBaseLine, fileNotFound);
|
||||||
|
Reference in New Issue
Block a user