diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /juk/filehandle.cpp | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/filehandle.cpp')
-rw-r--r-- | juk/filehandle.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/juk/filehandle.cpp b/juk/filehandle.cpp index 583cfc0d..70932063 100644 --- a/juk/filehandle.cpp +++ b/juk/filehandle.cpp @@ -18,7 +18,7 @@ #include <kdebug.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "filehandle.h" #include "filehandleproperties.h" @@ -39,12 +39,12 @@ AddProperty(Path, absFilePath()) AddNumberProperty(Size, fileInfo().size()) AddProperty(Extension, fileInfo().extension(false)) -static QString resolveSymLinks(const QFileInfo &file) // static +static TQString resolveSymLinks(const TQFileInfo &file) // static { char real[PATH_MAX]; - if(file.exists() && realpath(QFile::encodeName(file.absFilePath()).data(), real)) - return QFile::decodeName(real); + if(file.exists() && realpath(TQFile::encodeName(file.absFilePath()).data(), real)) + return TQFile::decodeName(real); else return file.filePath(); } @@ -79,10 +79,10 @@ public: mutable Tag *tag; mutable CoverInfo *coverInfo; - mutable QString absFilePath; - QFileInfo fileInfo; - QDateTime modificationTime; - QDateTime lastModified; + mutable TQString absFilePath; + TQFileInfo fileInfo; + TQDateTime modificationTime; + TQDateTime lastModified; }; //////////////////////////////////////////////////////////////////////////////// @@ -106,22 +106,22 @@ FileHandle::FileHandle(const FileHandle &f) : d->ref(); } -FileHandle::FileHandle(const QFileInfo &info, const QString &path) : +FileHandle::FileHandle(const TQFileInfo &info, const TQString &path) : d(0) { setup(info, path); } -FileHandle::FileHandle(const QString &path) : +FileHandle::FileHandle(const TQString &path) : d(0) { - setup(QFileInfo(path), path); + setup(TQFileInfo(path), path); } -FileHandle::FileHandle(const QString &path, CacheDataStream &s) +FileHandle::FileHandle(const TQString &path, CacheDataStream &s) { d = new FileHandlePrivate; - d->fileInfo = QFileInfo(path); + d->fileInfo = TQFileInfo(path); d->absFilePath = path; read(s); Cache::instance()->insert(*this); @@ -140,10 +140,10 @@ void FileHandle::refresh() d->tag = new Tag(d->absFilePath); } -void FileHandle::setFile(const QString &path) +void FileHandle::setFile(const TQString &path) { if(!d || isNull()) - setup(QFileInfo(path), path); + setup(TQFileInfo(path), path); else { d->absFilePath = resolveSymLinks(path); d->fileInfo.setFile(path); @@ -167,14 +167,14 @@ CoverInfo *FileHandle::coverInfo() const return d->coverInfo; } -QString FileHandle::absFilePath() const +TQString FileHandle::absFilePath() const { if(d->absFilePath.isNull()) d->absFilePath = resolveSymLinks(d->fileInfo.absFilePath()); return d->absFilePath; } -const QFileInfo &FileHandle::fileInfo() const +const TQFileInfo &FileHandle::fileInfo() const { return d->fileInfo; } @@ -191,7 +191,7 @@ bool FileHandle::current() const d->modificationTime >= lastModified()); } -const QDateTime &FileHandle::lastModified() const +const TQDateTime &FileHandle::lastModified() const { if(d->lastModified.isNull()) d->lastModified = d->fileInfo.lastModified(); @@ -237,12 +237,12 @@ bool FileHandle::operator!=(const FileHandle &f) const return d != f.d; } -QStringList FileHandle::properties() // static +TQStringList FileHandle::properties() // static { return FileHandleProperties::properties(); } -QString FileHandle::property(const QString &name) const +TQString FileHandle::property(const TQString &name) const { return FileHandleProperties::property(*this, name.latin1()); } @@ -257,12 +257,12 @@ const FileHandle &FileHandle::null() // static // private methods //////////////////////////////////////////////////////////////////////////////// -void FileHandle::setup(const QFileInfo &info, const QString &path) +void FileHandle::setup(const TQFileInfo &info, const TQString &path) { if(d && !isNull()) return; - QString fileName = path.isNull() ? info.absFilePath() : path; + TQString fileName = path.isNull() ? info.absFilePath() : path; FileHandle cached = Cache::instance()->value(resolveSymLinks(fileName)); @@ -283,7 +283,7 @@ void FileHandle::setup(const QFileInfo &info, const QString &path) // related functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const FileHandle &f) +TQDataStream &operator<<(TQDataStream &s, const FileHandle &f) { s << *(f.tag()) << f.lastModified(); |