diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-03 02:49:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-03 02:49:54 +0000 |
commit | 6ffad5a006df848f5e9a80ca31e5faec8ed65e62 (patch) | |
tree | 3757770dc3586efff30fdfe30f7e36b64ab883f1 /krusader/Panel/krviewitem.cpp | |
parent | 1359f43e963c10d08c6c78f4806da291ca216bfe (diff) | |
download | krusader-6ffad5a006df848f5e9a80ca31e5faec8ed65e62.tar.gz krusader-6ffad5a006df848f5e9a80ca31e5faec8ed65e62.zip |
TQt4 port krusader
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krusader@1239136 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krusader/Panel/krviewitem.cpp')
-rw-r--r-- | krusader/Panel/krviewitem.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/krusader/Panel/krviewitem.cpp b/krusader/Panel/krviewitem.cpp index 28500d4..fe82c0c 100644 --- a/krusader/Panel/krviewitem.cpp +++ b/krusader/Panel/krviewitem.cpp @@ -8,21 +8,21 @@ #define PROPS static_cast<const KrViewProperties*>(_viewProperties) -QString atomicExtensions[] = { +TQString atomicExtensions[] = { ".tar.gz", ".tar.bz2", - ".moc.cpp" + ".tqmoc.cpp" }; KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties): _vf(vf), dummyVfile(false), _viewProperties(properties), _hasExtension(false), _hidden(false), _extension("") { if (vf) { // check if the file has an extension - const QString& vfName = vf->vfile_getName(); - int loc = vfName.findRev('.'); + const TQString& vfName = vf->vfile_getName(); + int loc = vfName.tqfindRev('.'); if (loc>0) { // avoid mishandling of .bashrc and friend // check if it has one of the predefined 'atomic extensions' - for (QStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) { + for (TQStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) { if (vfName.endsWith(*i)){ loc = vfName.length() - (*i).length(); break; @@ -38,34 +38,34 @@ KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties): } } -const QString& KrViewItem::name(bool withExtension) const { +const TQString& KrViewItem::name(bool withExtension) const { if (!withExtension && _hasExtension) return _name; else return _vf->vfile_getName(); } -QString KrViewItem::description() const { +TQString KrViewItem::description() const { if (dummyVfile) return i18n("Climb up the directory tree"); // else is implied - QString text = _vf->vfile_getName(); - QString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false); - QString myLinkDest = _vf->vfile_getSymDest(); + TQString text = _vf->vfile_getName(); + TQString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false); + TQString myLinkDest = _vf->vfile_getSymDest(); KIO::filesize_t mySize = _vf->vfile_getSize(); - QString text2 = text.copy(); + TQString text2 = text.copy(); mode_t m_fileMode = _vf->vfile_getMode(); if (_vf->vfile_isSymLink() ){ - QString tmp; + TQString tmp; if ( comment.isEmpty() ) tmp = i18n ( "Symbolic Link" ) ; else if( _vf->vfile_getMime() == "Broken Link !" ) tmp = i18n("(broken link !)"); - else tmp = i18n("%1 (Link)").arg(comment); + else tmp = i18n("%1 (Link)").tqarg(comment); text += "->"; text += myLinkDest; text += " "; text += tmp; } else if ( S_ISREG( m_fileMode ) ){ - text = QString("%1 (%2)").arg(text2).arg( PROPS->humanReadableSize ? + text = TQString("%1 (%2)").tqarg(text2).tqarg( PROPS->humanReadableSize ? KRpermHandler::parseSize(_vf->vfile_getSize()) : KIO::convertSize( mySize ) ); text += " "; text += comment; @@ -79,27 +79,27 @@ QString KrViewItem::description() const { return text; } -QString KrViewItem::dateTime() const { +TQString KrViewItem::dateTime() const { // convert the time_t to struct tm time_t time = _vf->vfile_getTime_t(); struct tm* t=localtime((time_t *)&time); - QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min)); + TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min)); return KGlobal::locale()->formatDateTime(tmp); } -QPixmap KrViewItem::icon() { +TQPixmap KrViewItem::icon() { #if 0 - QPixmap *p; + TQPixmap *p; // This is bad - very bad. the function must return a valid reference, - // This is an interface flow - shie please fix it with a function that return QPixmap* + // This is an interface flow - shie please fix it with a function that return TQPixmap* // this way we can return 0 - and do our error checking... // shie answers: why? what's the difference? if we return an empty pixmap, others can use it as it // is, without worrying or needing to do error checking. empty pixmap displays nothing #endif if (dummyVfile || !_viewProperties->displayIcons) - return QPixmap(); + return TQPixmap(); else return KrView::getIcon(_vf); } |