|
a/src/qtgui/main.cpp |
|
b/src/qtgui/main.cpp |
|
... |
|
... |
54 |
void snapshotConfig()
|
54 |
void snapshotConfig()
|
55 |
{
|
55 |
{
|
56 |
PTMutexLocker locker(thestableconfiglock);
|
56 |
PTMutexLocker locker(thestableconfiglock);
|
57 |
thestableconfig = new RclConfig(*theconfig);
|
57 |
thestableconfig = new RclConfig(*theconfig);
|
58 |
}
|
58 |
}
|
|
|
59 |
|
|
|
60 |
PTMutexInit thetempfileslock;
|
|
|
61 |
static vector<TempFile> o_tempfiles;
|
|
|
62 |
/* Keep an array of temporary files for deletion at exit. It happens that we
|
|
|
63 |
erase some of them before exiting (ie: when closing a preview tab), we don't
|
|
|
64 |
reuse the array holes for now */
|
|
|
65 |
void rememberTempFile(TempFile temp)
|
|
|
66 |
{
|
|
|
67 |
PTMutexLocker locker(thetempfileslock);
|
|
|
68 |
o_tempfiles.push_back(temp);
|
59 |
|
69 |
}
|
|
|
70 |
|
|
|
71 |
void forgetTempFile(string &fn)
|
|
|
72 |
{
|
|
|
73 |
if (fn.empty())
|
|
|
74 |
return;
|
|
|
75 |
PTMutexLocker locker(thetempfileslock);
|
|
|
76 |
for (vector<TempFile>::iterator it = o_tempfiles.begin();
|
|
|
77 |
it != o_tempfiles.end(); it++) {
|
|
|
78 |
if ((*it).isNotNull() && !fn.compare((*it)->filename())) {
|
|
|
79 |
it->release();
|
|
|
80 |
}
|
|
|
81 |
}
|
|
|
82 |
fn.erase();
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
|
60 |
Rcl::Db *rcldb;
|
86 |
Rcl::Db *rcldb;
|
|
|
87 |
|
61 |
#ifdef RCL_USE_ASPELL
|
88 |
#ifdef RCL_USE_ASPELL
|
62 |
Aspell *aspell;
|
89 |
Aspell *aspell;
|
63 |
#endif
|
90 |
#endif
|
64 |
|
91 |
|
65 |
int recollNeedsExit;
|
92 |
int recollNeedsExit;
|
|
... |
|
... |
117 |
rwSettings(true);
|
144 |
rwSettings(true);
|
118 |
LOGDEB2(("recollCleanup: closing database\n"));
|
145 |
LOGDEB2(("recollCleanup: closing database\n"));
|
119 |
deleteZ(rcldb);
|
146 |
deleteZ(rcldb);
|
120 |
deleteZ(theconfig);
|
147 |
deleteZ(theconfig);
|
121 |
// deleteZ(thestableconfig);
|
148 |
// deleteZ(thestableconfig);
|
|
|
149 |
|
|
|
150 |
PTMutexLocker locker(thetempfileslock);
|
|
|
151 |
o_tempfiles.clear();
|
|
|
152 |
|
122 |
#ifdef RCL_USE_ASPELL
|
153 |
#ifdef RCL_USE_ASPELL
|
123 |
deleteZ(aspell);
|
154 |
deleteZ(aspell);
|
124 |
#endif
|
155 |
#endif
|
|
|
156 |
|
125 |
LOGDEB2(("recollCleanup: done\n"));
|
157 |
LOGDEB2(("recollCleanup: done\n"));
|
126 |
}
|
158 |
}
|
127 |
|
159 |
|
128 |
static void sigcleanup(int)
|
160 |
static void sigcleanup(int)
|
129 |
{
|
161 |
{
|
|
... |
|
... |
320 |
mainWindow->
|
352 |
mainWindow->
|
321 |
sSearch->setSearchString(QString::fromLocal8Bit(question.c_str()));
|
353 |
sSearch->setSearchString(QString::fromLocal8Bit(question.c_str()));
|
322 |
}
|
354 |
}
|
323 |
return app.exec();
|
355 |
return app.exec();
|
324 |
}
|
356 |
}
|
325 |
|
|
|