FileName::FileName(FileName const & rhs, string const & suffix) : d(new Private)
{
- if (!rhs.d->fi.isDir())
- d->fi.setFile(rhs.d->fi.filePath() + toqstr(suffix));
- else
- d->fi.setFile(QDir(rhs.d->fi.absoluteFilePath()), toqstr(suffix));
+ set(rhs, suffix);
}
}
+void FileName::set(FileName const & rhs, string const & suffix)
+{
+ if (!rhs.d->fi.isDir())
+ d->fi.setFile(rhs.d->fi.filePath() + toqstr(suffix));
+ else
+ d->fi.setFile(QDir(rhs.d->fi.absoluteFilePath()), toqstr(suffix));
+}
+
+
void FileName::erase()
{
d->fi = QFileInfo();
* Encoding is always UTF-8.
*/
virtual void set(std::string const & filename);
+ virtual void set(FileName const & fn, std::string const & suffix);
virtual void erase();
/// Is this filename empty?
bool empty() const;