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.10 2005-10-19 10:21:48 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: main.cpp,v 1.11 2005-10-22 05:35:16 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
4
5
#include <unistd.h>
5
#include <unistd.h>
6
6
7
#include <qapplication.h>
7
#include <qapplication.h>
8
9
#include <qtranslator.h>
10
#include <qtextcodec.h> 
11
8
#include <qthread.h>
12
#include <qthread.h>
9
#include <qtimer.h>
13
#include <qtimer.h>
10
14
11
#include <qmessagebox.h>
15
#include <qmessagebox.h>
12
16
...
...
79
    // thread stuff that we can't do from signal context.
83
    // thread stuff that we can't do from signal context.
80
    // Just set a flag and let the watchdog timer do the work
84
    // Just set a flag and let the watchdog timer do the work
81
    recollNeedsExit = 1;
85
    recollNeedsExit = 1;
82
}
86
}
83
87
84
85
int main( int argc, char ** argv )
88
int main( int argc, char ** argv )
86
{
89
{
87
    QApplication a(argc, argv);
90
    QApplication a(argc, argv);
91
92
    QTranslator translator( 0 );
93
    // QTextCodec::locale() return $LANG
94
    translator.load( QString("recoll_") + QTextCodec::locale(), "." );
95
    a.installTranslator( &translator );
96
    
88
    RecollMain w;
97
    RecollMain w;
89
    w.show();
98
    w.show();
90
    a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
99
    a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
91
    QTimer *timer = new QTimer(&a);
100
    QTimer *timer = new QTimer(&a);
92
    w.connect(timer, SIGNAL(timeout()), &w, SLOT(checkExit()));
101
    w.connect(timer, SIGNAL(timeout()), &w, SLOT(checkExit()));