diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-02-17 13:21:39 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-02-18 12:40:16 +0100 |
commit | aa2a0638f58b8059a465384d5b15e89a1030e092 (patch) | |
tree | 9b81d1097feacda304faf51bf37d679a4200a6ce /src/plugins/resourceeditor | |
parent | 3780a703cd4a470345fe7ef32969532e0cb639ac (diff) |
ResourceEditor: Remove even more dead code
Change-Id: I5b2f01b5cdf512f2cc125481f0db999d111c3a54
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile.cpp | 62 | ||||
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile_p.h | 9 |
2 files changed, 0 insertions, 71 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 97e09d49222..a7cbea3b396 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -240,68 +240,6 @@ void ResourceFile::refresh() } } -bool ResourceFile::split(const QString &_path, QString *prefix, QString *file) const -{ - prefix->clear(); - file->clear(); - - QString path = _path; - if (!path.startsWith(QLatin1Char(':'))) - return false; - path = path.mid(1); - - for (int i = 0; i < m_prefix_list.size(); ++i) { - Prefix const * const &pref = m_prefix_list.at(i); - if (!path.startsWith(pref->name)) - continue; - - *prefix = pref->name; - if (pref->name == QString(QLatin1Char('/'))) - *file = path.mid(1); - else - *file = path.mid(pref->name.size() + 1); - - const QString filePath = absolutePath(*file); - - for (int j = 0; j < pref->file_list.count(); j++) { - File const * const &f = pref->file_list.at(j); - if (!f->alias.isEmpty()) { - if (absolutePath(f->alias) == filePath) { - *file = f->name; - return true; - } - } else if (f->name == filePath) - return true; - } - } - - return false; -} - -QString ResourceFile::resolvePath(const QString &path) const -{ - QString prefix, file; - if (split(path, &prefix, &file)) - return absolutePath(file); - - return QString(); -} - -bool ResourceFile::isEmpty() const -{ - return m_file_name.isEmpty() && m_prefix_list.isEmpty(); -} - -QStringList ResourceFile::fileList(int pref_idx) const -{ - QStringList result; - Q_ASSERT(pref_idx >= 0 && pref_idx < m_prefix_list.count()); - const FileList &abs_file_list = m_prefix_list.at(pref_idx)->file_list; - foreach (const File *abs_file, abs_file_list) - result.append(relativePath(abs_file->name)); - return result; -} - void ResourceFile::addFile(int prefix_idx, const QString &file, int file_idx) { Prefix * const p = m_prefix_list[prefix_idx]; diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h index 2541fc73cab..e110cdda5a4 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h +++ b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h @@ -139,11 +139,6 @@ public: QString errorMessage() const { return m_error_message; } void refresh(); -private: - QString resolvePath(const QString &path) const; - QStringList fileList(int pref_idx) const; - -public: int prefixCount() const; QString prefix(int idx) const; QString lang(int idx) const; @@ -178,10 +173,6 @@ public: QString absolutePath(const QString &rel_path) const; static QString fixPrefix(const QString &prefix); - bool split(const QString &path, QString *prefix, QString *file) const; - -private: - bool isEmpty() const; private: PrefixList m_prefix_list; |