Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nate Graham
Kid3
Commits
30858289
Commit
30858289
authored
Feb 25, 2012
by
Urs Fleisch
Browse files
Restore file in model when renaming failed.
parent
7dd723d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/model/fileproxymodel.h
View file @
30858289
...
...
@@ -170,6 +170,12 @@ public:
*/
bool
rmdir
(
const
QModelIndex
&
index
)
const
;
/**
* Initialize tagged file for model index.
* @param index model index
*/
void
initTaggedFileData
(
const
QModelIndex
&
index
);
/**
* Get tagged file data of model index.
*
...
...
@@ -277,12 +283,6 @@ private:
*/
void
clearTaggedFileStore
();
/**
* Initialize tagged file for model index.
* @param index model index
*/
void
initTaggedFileData
(
const
QModelIndex
&
index
);
QHash
<
QPersistentModelIndex
,
TaggedFile
*>
m_taggedFiles
;
QSet
<
QPersistentModelIndex
>
m_filteredOut
;
TaggedFileIconProvider
*
m_iconProvider
;
...
...
src/gui/forms/kid3mainwindow.cpp
View file @
30858289
...
...
@@ -1925,6 +1925,7 @@ void Kid3MainWindow::renameFile()
i18n
(
"Error while renaming:
\n
"
)
+
i18n
(
"Rename %1 to %2 failed
\n
"
).
arg
(
fileName
).
arg
(
newFileName
),
QMessageBox
::
Ok
,
Qt
::
NoButton
);
model
->
initTaggedFileData
(
index
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment