diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-02-14 15:08:29 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-02-17 11:14:11 +0100 |
commit | 38f7fa7446e1ed2f5c5afb91be3b32503fe2f63e (patch) | |
tree | 9b9acfbb86ee33cf4961e1e5f0cbb7bbded69dc0 /src/plugins/resourceeditor | |
parent | 34d7ccfaa35901f3bdf071904b91046045e3451b (diff) |
ResourceEditor: Remove dead code
Change-Id: I80456fb855d8af46bae79b77f60a61c31d76e219
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src/plugins/resourceeditor')
6 files changed, 0 insertions, 49 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp index cd505d24b09..15ba24731e7 100644 --- a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp +++ b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp @@ -339,12 +339,6 @@ bool QrcEditor::resourceDragEnabled() const return m_treeview->resourceDragEnabled(); } -void QrcEditor::addFile(const QString &prefix, const QString &file) -{ - // TODO: make this function UNDO / REDO aware - m_treeview->addFile(prefix, file); -} - void QrcEditor::editCurrentItem() { if (m_treeview->selectionModel()->currentIndex().isValid()) diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.h b/src/plugins/resourceeditor/qrceditor/qrceditor.h index 557f5701987..a8a6d737801 100644 --- a/src/plugins/resourceeditor/qrceditor/qrceditor.h +++ b/src/plugins/resourceeditor/qrceditor/qrceditor.h @@ -60,8 +60,6 @@ public: void setResourceDragEnabled(bool e); bool resourceDragEnabled() const; - void addFile(const QString &prefix, const QString &file); - const QUndoStack *commandHistory() const { return &m_history; } void refresh(); diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 7924543006f..994e22f718d 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -864,14 +864,6 @@ QString ResourceModel::file(const QModelIndex &index) const return m_resource_file.file(index.parent().row(), index.row()); } -QModelIndex ResourceModel::getIndex(const QString &prefixed_file) -{ - QString prefix, file; - if (!m_resource_file.split(prefixed_file, &prefix, &file)) - return QModelIndex(); - return getIndex(prefix, file); -} - QModelIndex ResourceModel::getIndex(const QString &prefix, const QString &file) { if (prefix.isEmpty()) diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h index e90f35cb040..1262246aba1 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h +++ b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h @@ -244,7 +244,6 @@ public: virtual void changeAlias(const QModelIndex &idx, const QString &alias); virtual QModelIndex deleteItem(const QModelIndex &idx); QModelIndex getIndex(const QString &prefix, const QString &file); - QModelIndex getIndex(const QString &prefixed_file); QModelIndex prefixIndex(const QModelIndex &sel_idx) const; QString absolutePath(const QString &path) const diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.cpp b/src/plugins/resourceeditor/qrceditor/resourceview.cpp index 8b868f4f17e..26a32593418 100644 --- a/src/plugins/resourceeditor/qrceditor/resourceview.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourceview.cpp @@ -364,34 +364,6 @@ QStringList ResourceView::fileNamesToAdd() tr("All files (*)")); } -void ResourceView::addFiles(QStringList fileList, const QModelIndex &index) -{ - if (fileList.isEmpty()) - return; - QModelIndex idx = index; - if (!m_qrcModel->hasChildren(QModelIndex())) { - idx = addPrefix(); - expand(idx); - } - - idx = m_qrcModel->addFiles(idx, fileList); - - if (idx.isValid()) { - const QModelIndex preindex = m_qrcModel->prefixIndex(index); - setExpanded(preindex, true); - selectionModel()->setCurrentIndex(idx, QItemSelectionModel::ClearAndSelect); - QString prefix, file; - m_qrcModel->getItem(preindex, prefix, file); -// XXX emit filesAdded(prefix, fileList); - } -} - -void ResourceView::addFile(const QString &prefix, const QString &file) -{ - const QModelIndex preindex = m_qrcModel->getIndex(prefix, QString()); - addFiles(QStringList(file), preindex); -} - bool ResourceView::load(const QString &fileName) { const QFileInfo fi(fileName); diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.h b/src/plugins/resourceeditor/qrceditor/resourceview.h index 4ef0fdc5b4e..29458ed9f6c 100644 --- a/src/plugins/resourceeditor/qrceditor/resourceview.h +++ b/src/plugins/resourceeditor/qrceditor/resourceview.h @@ -90,10 +90,6 @@ public: bool isDirty() const; void setDirty(bool dirty); - void addFiles(QStringList fileList, const QModelIndex &index); - - void addFile(const QString &prefix, const QString &file); - bool isPrefix(const QModelIndex &index) const; QString currentAlias() const; |