suppressed a number of gratuitous unistd inclusions + clean up preview progress dialog code

This commit is contained in:
Jean-Francois Dockes 2015-09-24 15:36:02 +02:00
parent 0cc5bb82d5
commit f000aaa792
6 changed files with 471 additions and 489 deletions

View file

@ -14,7 +14,6 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <unistd.h>
#include <algorithm> #include <algorithm>
#include <cstdio> #include <cstdio>

View file

@ -14,11 +14,8 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "autoconfig.h" #include "autoconfig.h"
#include <unistd.h>
#include <cstdlib> #include <cstdlib>
#include <qapplication.h> #include <qapplication.h>

File diff suppressed because it is too large Load diff

View file

@ -16,9 +16,6 @@
*/ */
#include "autoconfig.h" #include "autoconfig.h"
#include <fcntl.h>
#include "safeunistd.h"
#include <utility> #include <utility>
#include MEMORY_INCLUDE #include MEMORY_INCLUDE
@ -138,10 +135,14 @@ void RclMain::init()
// idxstatus file. Make sure it exists before trying to watch it // idxstatus file. Make sure it exists before trying to watch it
// (case where we're started on an older index, or if the status // (case where we're started on an older index, or if the status
// file was deleted since indexing // file was deleted since indexing)
::close(::open(theconfig->getIdxStatusFile().c_str(), O_CREAT, 0600)); QString idxfn =
m_watcher.addPath(QString::fromLocal8Bit( QString::fromLocal8Bit(theconfig->getIdxStatusFile().c_str());
theconfig->getIdxStatusFile().c_str())); QFile qf(idxfn);
qf.open(QIODevice::ReadWrite);
qf.setPermissions(QFile::ReadOwner|QFile::WriteOwner);
qf.close();
m_watcher.addPath(idxfn);
// At least some versions of qt4 don't display the status bar if // At least some versions of qt4 don't display the status bar if
// it's not created here. // it's not created here.
(void)statusBar(); (void)statusBar();
@ -728,7 +729,7 @@ void RclMain::initiateQuery()
qApp->processEvents(); qApp->processEvents();
if (progress.wasCanceled()) { if (progress.wasCanceled()) {
// Just get out of there asap. // Just get out of there asap.
_exit(1); exit(1);
} }
qApp->processEvents(); qApp->processEvents();

View file

@ -16,7 +16,6 @@
*/ */
#include "autoconfig.h" #include "autoconfig.h"
#include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>

View file

@ -17,7 +17,6 @@
#include "autoconfig.h" #include "autoconfig.h"
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
#include <algorithm> #include <algorithm>
#include <list> #include <list>