|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
13 |
* along with this program; if not, write to the
|
13 |
* along with this program; if not, write to the
|
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#include "autoconfig.h"
|
17 |
#include "autoconfig.h"
|
18 |
|
|
|
19 |
#include <fcntl.h>
|
|
|
20 |
#include "safeunistd.h"
|
|
|
21 |
|
18 |
|
22 |
#include <utility>
|
19 |
#include <utility>
|
23 |
#include MEMORY_INCLUDE
|
20 |
#include MEMORY_INCLUDE
|
24 |
|
21 |
|
25 |
#include <qapplication.h>
|
22 |
#include <qapplication.h>
|
|
... |
|
... |
136 |
|
133 |
|
137 |
periodictimer = new QTimer(this);
|
134 |
periodictimer = new QTimer(this);
|
138 |
|
135 |
|
139 |
// idxstatus file. Make sure it exists before trying to watch it
|
136 |
// idxstatus file. Make sure it exists before trying to watch it
|
140 |
// (case where we're started on an older index, or if the status
|
137 |
// (case where we're started on an older index, or if the status
|
141 |
// file was deleted since indexing
|
138 |
// file was deleted since indexing)
|
142 |
::close(::open(theconfig->getIdxStatusFile().c_str(), O_CREAT, 0600));
|
139 |
QString idxfn =
|
143 |
m_watcher.addPath(QString::fromLocal8Bit(
|
140 |
QString::fromLocal8Bit(theconfig->getIdxStatusFile().c_str());
|
144 |
theconfig->getIdxStatusFile().c_str()));
|
141 |
QFile qf(idxfn);
|
|
|
142 |
qf.open(QIODevice::ReadWrite);
|
|
|
143 |
qf.setPermissions(QFile::ReadOwner|QFile::WriteOwner);
|
|
|
144 |
qf.close();
|
|
|
145 |
m_watcher.addPath(idxfn);
|
145 |
// At least some versions of qt4 don't display the status bar if
|
146 |
// At least some versions of qt4 don't display the status bar if
|
146 |
// it's not created here.
|
147 |
// it's not created here.
|
147 |
(void)statusBar();
|
148 |
(void)statusBar();
|
148 |
|
149 |
|
149 |
(void)new HelpClient(this);
|
150 |
(void)new HelpClient(this);
|
|
... |
|
... |
726 |
if (i == 20)
|
727 |
if (i == 20)
|
727 |
progress.show();
|
728 |
progress.show();
|
728 |
qApp->processEvents();
|
729 |
qApp->processEvents();
|
729 |
if (progress.wasCanceled()) {
|
730 |
if (progress.wasCanceled()) {
|
730 |
// Just get out of there asap.
|
731 |
// Just get out of there asap.
|
731 |
_exit(1);
|
732 |
exit(1);
|
732 |
}
|
733 |
}
|
733 |
|
734 |
|
734 |
qApp->processEvents();
|
735 |
qApp->processEvents();
|
735 |
}
|
736 |
}
|
736 |
|
737 |
|