initial indexation with gui would not work

This commit is contained in:
dockes 2007-01-08 15:21:32 +00:00
parent 5e5f09c663
commit 2da7d627af
2 changed files with 16 additions and 13 deletions

View File

@ -1 +1 @@
1.7.1 1.7.2

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: main.cpp,v 1.57 2006-12-16 15:39:54 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: main.cpp,v 1.58 2007-01-08 15:21:32 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -279,14 +279,6 @@ int main(int argc, char **argv)
rcldb = new Rcl::Db; rcldb = new Rcl::Db;
// Connect exit handlers etc..
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
app.connect(&app, SIGNAL(aboutToQuit()), mainWindow, SLOT(close()));
QTimer *timer = new QTimer(&app);
mainWindow->connect(timer, SIGNAL(timeout()),
mainWindow, SLOT(periodic100()));
timer->start(100);
if (!maybeOpenDb(reason)) { if (!maybeOpenDb(reason)) {
startindexing = 1; startindexing = 1;
@ -302,22 +294,33 @@ int main(int argc, char **argv)
app.translate("Main", app.translate("Main",
".\n" ".\n"
"Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed."), "Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed."),
"Ok", "Ok", "Cancel", 0, 0)) {
"Cancel", 0, 0, 1 )) {
case 0: // Ok case 0: // Ok
break; break;
case 1: // Cancel case 1: // Cancel
exit(0); exit(0);
} }
} }
// fprintf(stderr, "Db opened\n");
mainWindow->show(); mainWindow->show();
if (prefs.startWithAdvSearchOpen) if (prefs.startWithAdvSearchOpen)
mainWindow->showAdvSearchDialog(); mainWindow->showAdvSearchDialog();
if (prefs.startWithSortToolOpen) if (prefs.startWithSortToolOpen)
mainWindow->showSortDialog(); mainWindow->showSortDialog();
// Connect exit handlers etc.. Beware, apparently this must come
// after mainWindow->show() , else the QMessageBox above never
// returns.
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
QTimer *timer = new QTimer(&app);
mainWindow->connect(timer, SIGNAL(timeout()),
mainWindow, SLOT(periodic100()));
timer->start(100);
app.connect(&app, SIGNAL(aboutToQuit()), mainWindow, SLOT(close()));
start_idxthread(*rclconfig); start_idxthread(*rclconfig);
// fprintf(stderr, "Go\n"); // fprintf(stderr, "Go\n");