Commit 4325ba5d authored by Robby Stephenson's avatar Robby Stephenson
Browse files

Use a temporary directory for images if the file has not been saved

CCBUG: 299130
parent 708f73a3
......@@ -53,6 +53,13 @@ ImageDirectory::~ImageDirectory() {
}
QString ImageDirectory::path() {
if(m_path.isEmpty()) {
// an empty path means the file hasn't been saved yet
if(!m_dir) {
m_dir = new KTempDir(); // default is to auto-delete, aka autoRemove()
}
setPath(m_dir->name());
}
return m_path;
}
......
Supports Markdown
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