diff options
author | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-04-09 13:30:30 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-04-14 09:05:21 +0000 |
commit | 952af535d2042893bd01d5bf34de17e68b11d37b (patch) | |
tree | 8c2329cb7454ec35b605f5a7e3b15042dcb27605 /src/plugins/resourceeditor/qrceditor/resourcefile.cpp | |
parent | 4a77a3145376a1c1a3a74df05c39f9240d91875f (diff) |
ResourceEditor: Show correct error message on opening a invalid qrc file
Change-Id: I46310f9305b94bc0e4ac9a1708daa079b3245788
Task-number: QTCREATORBUG-14064
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/resourceeditor/qrceditor/resourcefile.cpp')
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 1f32ca276e..ce6bd87a5d 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -547,8 +547,8 @@ void ResourceFile::clearPrefixList() ** ResourceModel */ -ResourceModel::ResourceModel(const ResourceFile &resource_file, QObject *parent) - : QAbstractItemModel(parent), m_resource_file(resource_file), m_dirty(false) +ResourceModel::ResourceModel(QObject *parent) + : QAbstractItemModel(parent), m_dirty(false) { m_prefixIcon = Core::FileIconProvider::overlayIcon(QStyle::SP_DirIcon, QIcon(QLatin1String(":/resourceeditor/images/qt_qrc.png")), QSize(16, 16)); @@ -648,6 +648,11 @@ void ResourceModel::refresh() m_resource_file.refresh(); } +QString ResourceModel::errorMessage() const +{ + return m_resource_file.errorMessage(); +} + Qt::ItemFlags ResourceModel::flags(const QModelIndex &index) const { Qt::ItemFlags f = QAbstractItemModel::flags(index); |