~carlos-mazieri/ubuntu-filemanager-app/model

« back to all changes in this revision

Viewing changes to folderlistmodel/dirmodel.cpp

  • Committer: carlos.mazieri at gmail
  • Date: 2013-10-12 18:50:20 UTC
  • mfrom: (19.2.18 plugin)
  • Revision ID: carlos.mazieri@gmail.com-20131012185020-obn15qff17mr5uis
mergeĀ fromĀ plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
    ioWorkerThread()->addRequest(dlw);
357
357
 
358
358
    mCurrentDir = pathName;
359
 
    emit pathChanged(pathName);
 
359
    emit pathChanged(pathName); 
360
360
}
361
361
 
362
362
 
1116
1116
{
1117
1117
    if (     mEnableExternalFSWatcher
1118
1118
          && IS_FILE_MANAGER_IDLE()
1119
 
             && mLastModifiedCurrentPath < pathModifiedDate() )
 
1119
             && mLastModifiedCurrentPath < curPathModifiedDate() )
1120
1120
    {
1121
1121
#if DEBUG_EXT_FS_WATCHER
1122
1122
        qDebug() << "[exfsWatcher]" << QDateTime::currentDateTime().toString("hh:mm:ss.zzz")
1138
1138
        connect(fsWatcher,    SIGNAL(finished()),
1139
1139
                this,         SLOT(onExternalFsWatcherFinihed()));
1140
1140
 
1141
 
        ioWorkerThread()->addRequest(fsWatcher);
 
1141
        ioWorkerThread()->addRequest(fsWatcher);       
1142
1142
    }
1143
1143
#if DEBUG_EXT_FS_WATCHER
1144
1144
    else
1224
1224
 */
1225
1225
void DirModel::onExternalFsWatcherFinihed()
1226
1226
{
1227
 
    mLastModifiedCurrentPath = pathModifiedDate();
 
1227
    mLastModifiedCurrentPath = curPathModifiedDate();
1228
1228
#if DEBUG_EXT_FS_WATCHER
1229
1229
    qDebug() << "[exfsWatcher]" << QDateTime::currentDateTime().toString("hh:mm:ss.zzz")
1230
1230
             << Q_FUNC_INFO
1301
1301
 
1302
1302
 
1303
1303
 
1304
 
QDateTime DirModel::pathCreatedDate() const
 
1304
QDateTime DirModel::curPathCreatedDate() const
1305
1305
{
1306
1306
   QDateTime d;
1307
1307
   QFileInfo f(mCurrentDir);
1313
1313
}
1314
1314
 
1315
1315
 
1316
 
QDateTime DirModel::pathModifiedDate() const
 
1316
QDateTime DirModel::curPathModifiedDate() const
1317
1317
{
1318
1318
    QDateTime d;
1319
1319
    QFileInfo f(mCurrentDir);
1325
1325
}
1326
1326
 
1327
1327
 
1328
 
QDateTime DirModel::pathAccessedDate() const
 
1328
QDateTime DirModel::curPathAccessedDate() const
1329
1329
{
1330
1330
    QDateTime d;
1331
1331
    QFileInfo f(mCurrentDir);
1337
1337
}
1338
1338
 
1339
1339
 
1340
 
bool  DirModel::pathIsWritable() const
 
1340
bool  DirModel::curPathIsWritable() const
1341
1341
{
1342
1342
    QFileInfo f(mCurrentDir);
1343
1343
    return f.exists() && f.isWritable();
1344
1344
}
1345
1345
 
1346
 
QString DirModel::pathCreatedDateLocaleShort() const
1347
 
{
1348
 
    QString date;
1349
 
    QDateTime d(pathCreatedDate());
1350
 
    if (!d.isNull())
1351
 
    {
1352
 
        date = d.toString(Qt::SystemLocaleShortDate);
1353
 
    }
1354
 
    return date;
1355
 
}
1356
 
 
1357
 
 
1358
 
QString DirModel::pathModifiedDateLocaleShort() const
1359
 
{
1360
 
    QString date;
1361
 
    QDateTime d(pathModifiedDate());
1362
 
    if (!d.isNull())
1363
 
    {
1364
 
        date = d.toString(Qt::SystemLocaleShortDate);
1365
 
    }
1366
 
    return date;
1367
 
}
1368
 
 
1369
 
 
1370
 
QString DirModel::pathAccessedDateLocaleShort() const
1371
 
{
1372
 
    QString date;
1373
 
    QDateTime d(pathAccessedDate());
 
1346
QString DirModel::curPathCreatedDateLocaleShort() const
 
1347
{
 
1348
    QString date;
 
1349
    QDateTime d(curPathCreatedDate());
 
1350
    if (!d.isNull())
 
1351
    {
 
1352
        date = d.toString(Qt::SystemLocaleShortDate);
 
1353
    }
 
1354
    return date;
 
1355
}
 
1356
 
 
1357
 
 
1358
QString DirModel::curPathModifiedDateLocaleShort() const
 
1359
{
 
1360
    QString date;
 
1361
    QDateTime d(curPathModifiedDate());
 
1362
    if (!d.isNull())
 
1363
    {
 
1364
        date = d.toString(Qt::SystemLocaleShortDate);
 
1365
    }
 
1366
    return date;
 
1367
}
 
1368
 
 
1369
 
 
1370
QString DirModel::curPathAccessedDateLocaleShort() const
 
1371
{
 
1372
    QString date;
 
1373
    QDateTime d(curPathAccessedDate());
1374
1374
    if (!d.isNull())
1375
1375
    {
1376
1376
        date = d.toString(Qt::SystemLocaleShortDate);