Commit 009a4356 authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl

ThumbnailConverter: document preconditions

parent d7324c64
......@@ -58,6 +58,8 @@ int KPAThumbnailTool::convertV5ToV4Cache(const QString &indexFilename, QTextStre
bool KPAThumbnailTool::convertV5ToV4Cache(QIODevice &fromFile, QIODevice &toFile, QTextStream &err)
{
Q_ASSERT(fromFile.isReadable());
Q_ASSERT(toFile.isWritable());
QDataStream fromStream { &fromFile };
int version;
fromStream >> version;
......
......@@ -46,8 +46,8 @@ int convertV5ToV4Cache(const QString &indexFilename, QTextStream &err);
* but just reads the file and converts the header accordingly.
*
* This way, code in ThumbnailCache is not bloated by a niche-usecase.
* @param fromFile the QIODevice containing the old index data
* @param toFile a QIODevice to write to
* @param fromFile the (already opened) QIODevice containing the old index data
* @param toFile an open QIODevice to write to
* @param err a stream for error messages.
* @return \c true on success, \c false if the input file is not valid.
*/
......
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