now again does not work anymore WHY??? + trace filename; refs #130

This commit is contained in:
Marc Wäckerlin
2012-05-10 13:59:12 +00:00
parent b61222e7cd
commit e8741e9e0b
3 changed files with 11 additions and 5 deletions

View File

@@ -31,6 +31,8 @@ class Storage: public QObject {
operator bool() {
return valid();
}
/*! @return name of the storage, e.g. filename */
virtual QString name() = 0;
/*! @return true if storage object already exists */
virtual bool readable() = 0;
/*! @return true if storage object exists or could be created */
@@ -53,6 +55,9 @@ class FileStorage: public Storage {
assert(connect(&_watcher, SIGNAL(fileChanged(const QString&)),
SIGNAL(changed())));
}
QString name() {
return _file.fileName();
}
bool readable() {
return QFileInfo(_file).exists();
}