Commit 38f7fa74 authored by Daniel Teske's avatar Daniel Teske

ResourceEditor: Remove dead code

Change-Id: I80456fb855d8af46bae79b77f60a61c31d76e219
Reviewed-by: default avatarhjk <>
Reviewed-by: default avatarJarek Kobus <>
parent 34d7ccfa
......@@ -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())
......@@ -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();
......@@ -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())
......@@ -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
......@@ -364,34 +364,6 @@ QStringList ResourceView::fileNamesToAdd()
tr("All files (*)"));
void ResourceView::addFiles(QStringList fileList, const QModelIndex &index)
if (fileList.isEmpty())
QModelIndex idx = index;
if (!m_qrcModel->hasChildren(QModelIndex())) {
idx = addPrefix();
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);
......@@ -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;
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