Switch to unified view

a/src/qtgui/main.cpp b/src/qtgui/main.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: main.cpp,v 1.58 2007-01-08 15:21:32 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: main.cpp,v 1.59 2007-05-21 13:30:21 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
55
#include "ssearch_w.h"
55
#include "ssearch_w.h"
56
#include "guiutils.h"
56
#include "guiutils.h"
57
#ifdef RCL_USE_ASPELL
57
#ifdef RCL_USE_ASPELL
58
#include "rclaspell.h"
58
#include "rclaspell.h"
59
#endif
59
#endif
60
#include "smallut.h"
60
61
61
#ifdef WITH_KDE
62
#ifdef WITH_KDE
62
static const char description[] =
63
static const char description[] =
63
    I18N_NOOP("A KDE fulltext search application");
64
    I18N_NOOP("A KDE fulltext search application");
64
65
...
...
115
    LOGDEB(("recollCleanup: writing settings\n"));
116
    LOGDEB(("recollCleanup: writing settings\n"));
116
    rwSettings(true);
117
    rwSettings(true);
117
    LOGDEB2(("recollCleanup: stopping idx thread\n"));
118
    LOGDEB2(("recollCleanup: stopping idx thread\n"));
118
    stop_idxthread();
119
    stop_idxthread();
119
    LOGDEB2(("recollCleanup: closing database\n"));
120
    LOGDEB2(("recollCleanup: closing database\n"));
120
    delete rcldb;
121
    deleteZ(rcldb);
121
    rcldb = 0;
122
    delete rclconfig;
122
    deleteZ(rclconfig);
123
    rclconfig = 0;
124
#ifdef RCL_USE_ASPELL
123
#ifdef RCL_USE_ASPELL
125
    delete aspell;
124
    deleteZ(aspell);
126
    aspell = 0;
127
#endif
125
#endif
128
    LOGDEB2(("recollCleanup: done\n"));
126
    LOGDEB2(("recollCleanup: done\n"));
129
}
127
}
130
128
131
static void sigcleanup(int)
129
static void sigcleanup(int)
132
{
130
{
133
    // fprintf(stderr, "sigcleanup\n");
131
    fprintf(stderr, "sigcleanup called\n");
134
    // Cant call exit from here, because the atexit cleanup does some
132
    // Cant call exit from here, because the atexit cleanup does some
135
    // thread stuff that we can't do from signal context.
133
    // thread stuff that we can't do from signal context.
136
    // Just set a flag and let the watchdog timer do the work
134
    // Just set a flag and let the watchdog timer do the work
137
    recollNeedsExit = 1;
135
    recollNeedsExit = 1;
138
}
136
}