Make use of Fast concatenation feature in Qt 4.6

This commit is contained in:
Christophe Dumez
2010-03-06 21:11:47 +00:00
parent 6d7fba1a6c
commit a468404ab5
12 changed files with 56 additions and 50 deletions

View File

@@ -329,7 +329,8 @@ public:
#ifndef Q_WS_WIN
unsigned long long available;
struct statfs stats;
const int ret = statfs ((dir_path.path()+"/.").toLocal8Bit().data(), &stats) ;
const QString &statfs_path = dir_path.path()+"/.";
const int ret = statfs (qPrintable(statfs_path), &stats) ;
if(ret == 0) {
available = ((unsigned long long)stats.f_bavail) *
((unsigned long long)stats.f_bsize) ;