QXRD  0.11.16
Functions
qxrdfilebrowsermodelupdater.cpp File Reference

(Commit a65ccc9... : jennings : 2016-03-15 14:00:18 -0500)

#include "qxrddebug.h"
#include "qxrdfilebrowsermodelupdater.h"
#include "qxrdapplication.h"
#include <QThread>
#include <QDirIterator>
#include "qxrdfilebrowsermodel.h"
#include "qxrdfilebrowsermodelupdaterthread.h"
#include "qxrdfilebrowsermodelupdaterthread-ptr.h"
Include dependency graph for qxrdfilebrowsermodelupdater.cpp:

Go to the source code of this file.

Functions

static void checkSortInterrupt ()
 
static bool fileNameLessThan (QFileInfo f1, QFileInfo f2)
 
static bool fileNameGreaterThan (QFileInfo f1, QFileInfo f2)
 
static bool fileSizeLessThan (QFileInfo f1, QFileInfo f2)
 
static bool fileSizeGreaterThan (QFileInfo f1, QFileInfo f2)
 
static bool fileDateLessThan (QFileInfo f1, QFileInfo f2)
 
static bool fileDateGreaterThan (QFileInfo f1, QFileInfo f2)
 

Function Documentation

static void checkSortInterrupt ( )
static

Definition at line 108 of file qxrdfilebrowsermodelupdater.cpp.

References QxrdFileBrowserModelUpdaterThread::updater().

Referenced by fileDateGreaterThan(), fileDateLessThan(), fileNameGreaterThan(), fileNameLessThan(), fileSizeGreaterThan(), and fileSizeLessThan().

109 {
110  QThread *curr = QThread::currentThread();
111 
113  qobject_cast<QxrdFileBrowserModelUpdaterThread*>(curr);
114 
115  if (upthrd) {
117  = upthrd->updater();
118 
119  if (updater && updater->updateNeeded()) {
120  throw 0;
121  }
122  }
123 }
QxrdFileBrowserModelUpdaterPtr updater() const
QSharedPointer< QxrdFileBrowserModelUpdater > QxrdFileBrowserModelUpdaterPtr

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileDateGreaterThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 160 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

161 {
163 
164  return f1.lastModified() > f2.lastModified();
165 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileDateLessThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 153 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

154 {
156 
157  return f1.lastModified() < f2.lastModified();
158 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileNameGreaterThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 132 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

133 {
135 
136  return f1.fileName().toLower() > f2.fileName().toLower();
137 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileNameLessThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 125 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

126 {
128 
129  return f1.fileName().toLower() < f2.fileName().toLower();
130 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileSizeGreaterThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 146 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

147 {
149 
150  return f1.size() > f2.size();
151 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function:

static bool fileSizeLessThan ( QFileInfo  f1,
QFileInfo  f2 
)
static

Definition at line 139 of file qxrdfilebrowsermodelupdater.cpp.

References checkSortInterrupt().

Referenced by QxrdFileBrowserModelUpdater::updateContents().

140 {
142 
143  return f1.size() < f2.size();
144 }
static void checkSortInterrupt()

Here is the call graph for this function:

Here is the caller graph for this function: