Switch to unified view

a/src/qtgui/main.cpp b/src/qtgui/main.cpp
...
...
50
50
51
#include "recollq.h"
51
#include "recollq.h"
52
52
53
extern RclConfig *theconfig;
53
extern RclConfig *theconfig;
54
54
55
// To avoid writing settings if we stopped before reading them (else
56
// some kinds of errors would reset the qt/recoll settings to
57
// defaults)
58
static bool havereadsettings;
59
60
PTMutexInit thetempfileslock;
55
PTMutexInit thetempfileslock;
61
static vector<TempFile>  o_tempfiles;
56
static vector<TempFile>  o_tempfiles;
62
/* Keep an array of temporary files for deletion at exit. It happens that we
57
/* 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 
58
   erase some of them before exiting (ie: when closing a preview tab), we don't 
64
   reuse the array holes for now */
59
   reuse the array holes for now */
...
...
153
    }
148
    }
154
}
149
}
155
150
156
static void recollCleanup()
151
static void recollCleanup()
157
{
152
{
158
    if (havereadsettings) {
159
  LOGDEB(("recollCleanup: writing settings\n"));
160
  rwSettings(true);
161
    }
162
    LOGDEB2(("recollCleanup: closing database\n"));
153
    LOGDEB2(("recollCleanup: closing database\n"));
163
    deleteZ(rcldb);
154
    deleteZ(rcldb);
164
    deleteZ(theconfig);
155
    deleteZ(theconfig);
165
156
166
    PTMutexLocker locker(thetempfileslock);
157
    PTMutexLocker locker(thetempfileslock);
...
...
347
    }
338
    }
348
    g_advshistory = new AdvSearchHist;
339
    g_advshistory = new AdvSearchHist;
349
340
350
    //    fprintf(stderr, "History done\n");
341
    //    fprintf(stderr, "History done\n");
351
    rwSettings(false);
342
    rwSettings(false);
352
    havereadsettings = true;
353
    //    fprintf(stderr, "Settings done\n");
343
    //    fprintf(stderr, "Settings done\n");
354
344
355
    if (!prefs.qssFile.isEmpty()) {
345
    if (!prefs.qssFile.isEmpty()) {
356
    applyStyleSheet(prefs.qssFile);
346
    applyStyleSheet(prefs.qssFile);
357
    }
347
    }