a/src/qtgui/main.cpp b/src/qtgui/main.cpp
...
...
38
#include "rclinit.h"
38
#include "rclinit.h"
39
#include "log.h"
39
#include "log.h"
40
#include "rclmain_w.h"
40
#include "rclmain_w.h"
41
#include "ssearch_w.h"
41
#include "ssearch_w.h"
42
#include "guiutils.h"
42
#include "guiutils.h"
43
#ifdef RCL_USE_ASPELL
44
#include "rclaspell.h"
45
#endif
46
#include "smallut.h"
43
#include "smallut.h"
47
#include "readfile.h"
44
#include "readfile.h"
48
45
49
#include "recollq.h"
46
#include "recollq.h"
50
47
...
...
81
    o_tempfiles.clear();
78
    o_tempfiles.clear();
82
}
79
}
83
80
84
Rcl::Db *rcldb;
81
Rcl::Db *rcldb;
85
82
86
#ifdef RCL_USE_ASPELL
87
Aspell *aspell;
88
#endif
89
83
90
int recollNeedsExit;
84
int recollNeedsExit;
91
RclMain *mainWindow;
85
RclMain *mainWindow;
92
86
93
void startManual(const string& helpindex)
87
void startManual(const string& helpindex)
...
...
156
    deleteZ(rcldb);
150
    deleteZ(rcldb);
157
    deleteZ(theconfig);
151
    deleteZ(theconfig);
158
152
159
    deleteAllTempFiles();
153
    deleteAllTempFiles();
160
    
154
    
161
#ifdef RCL_USE_ASPELL
162
    deleteZ(aspell);
163
#endif
164
165
    LOGDEB2("recollCleanup: done\n" );
155
    LOGDEB2("recollCleanup: done\n" );
166
}
156
}
167
157
168
void applyStyleSheet(const QString& ssfname)
158
void applyStyleSheet(const QString& ssfname)
169
{
159
{
...
...
320
    translator.load( QString("recoll_") + slang, translatdir.c_str() );
310
    translator.load( QString("recoll_") + slang, translatdir.c_str() );
321
    app.installTranslator( &translator );
311
    app.installTranslator( &translator );
322
312
323
    //    fprintf(stderr, "Translations installed\n");
313
    //    fprintf(stderr, "Translations installed\n");
324
314
325
#ifdef RCL_USE_ASPELL
326
    aspell = new Aspell(theconfig);
327
    aspell->init(reason);
328
    if (!aspell || !aspell->ok()) {
329
  LOGDEB("Aspell speller creation failed "  << (reason) << "\n" );
330
  aspell = 0;
331
    }
332
#endif
333
334
    string historyfile = path_cat(theconfig->getConfDir(), "history");
315
    string historyfile = path_cat(theconfig->getConfDir(), "history");
335
    g_dynconf = new RclDynConf(historyfile);
316
    g_dynconf = new RclDynConf(historyfile);
336
    if (!g_dynconf || !g_dynconf->ok()) {
317
    if (!g_dynconf || !g_dynconf->ok()) {
337
    QString msg = app.translate("Main", "\"history\" file is damaged or un(read)writeable, please check or remove it: ") + QString::fromLocal8Bit(historyfile.c_str());
318
    QString msg = app.translate("Main", "\"history\" file is damaged or un(read)writeable, please check or remove it: ") + QString::fromLocal8Bit(historyfile.c_str());
338
    QMessageBox::critical(0, "Recoll",  msg);
319
    QMessageBox::critical(0, "Recoll",  msg);