debug messages
This commit is contained in:
parent
04c17215bd
commit
7b29adfd8c
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.50 2006-09-22 07:37:38 dockes Exp $ (C) 2005 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: main.cpp,v 1.51 2006-09-28 11:55:30 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
|
||||||
@ -109,17 +109,21 @@ bool maybeOpenDb(string &reason, bool force)
|
|||||||
|
|
||||||
static void recollCleanup()
|
static void recollCleanup()
|
||||||
{
|
{
|
||||||
|
LOGDEB(("recollCleanup: writing settings\n"));
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
prefs.mainwidth = mainWindow->width();
|
prefs.mainwidth = mainWindow->width();
|
||||||
prefs.mainheight = mainWindow->height();
|
prefs.mainheight = mainWindow->height();
|
||||||
prefs.ssearchTyp = mainWindow->sSearch->searchTypCMB->currentItem();
|
prefs.ssearchTyp = mainWindow->sSearch->searchTypCMB->currentItem();
|
||||||
}
|
}
|
||||||
rwSettings(true);
|
rwSettings(true);
|
||||||
|
LOGDEB2(("recollCleanup: stopping idx thread\n"));
|
||||||
stop_idxthread();
|
stop_idxthread();
|
||||||
|
LOGDEB2(("recollCleanup: closing database\n"));
|
||||||
delete rcldb;
|
delete rcldb;
|
||||||
rcldb = 0;
|
rcldb = 0;
|
||||||
delete rclconfig;
|
delete rclconfig;
|
||||||
rclconfig = 0;
|
rclconfig = 0;
|
||||||
|
LOGDEB2(("recollCleanup: done\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sigcleanup(int)
|
static void sigcleanup(int)
|
||||||
@ -166,6 +170,7 @@ int main(int argc, char **argv)
|
|||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// fprintf(stderr, "Application created\n");
|
||||||
string a_config;
|
string a_config;
|
||||||
thisprog = argv[0];
|
thisprog = argv[0];
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
@ -197,6 +202,7 @@ int main(int argc, char **argv)
|
|||||||
translatdir.c_str() );
|
translatdir.c_str() );
|
||||||
app.installTranslator( &translator );
|
app.installTranslator( &translator );
|
||||||
|
|
||||||
|
// fprintf(stderr, "Translations installed\n");
|
||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
rclconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
|
rclconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
|
||||||
@ -206,6 +212,7 @@ int main(int argc, char **argv)
|
|||||||
QMessageBox::critical(0, "Recoll", msg);
|
QMessageBox::critical(0, "Recoll", msg);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
// fprintf(stderr, "recollinit done\n");
|
||||||
|
|
||||||
string historyfile = path_cat(rclconfig->getConfDir(), "history");
|
string historyfile = path_cat(rclconfig->getConfDir(), "history");
|
||||||
g_dynconf = new RclHistory(historyfile);
|
g_dynconf = new RclHistory(historyfile);
|
||||||
@ -215,7 +222,9 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fprintf(stderr, "History done\n");
|
||||||
rwSettings(false);
|
rwSettings(false);
|
||||||
|
// fprintf(stderr, "Settings done\n");
|
||||||
|
|
||||||
|
|
||||||
// Create main window and set its size to previous session's
|
// Create main window and set its size to previous session's
|
||||||
@ -242,6 +251,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
QSize s(prefs.mainwidth, prefs.mainheight);
|
QSize s(prefs.mainwidth, prefs.mainheight);
|
||||||
mainWindow->resize(s);
|
mainWindow->resize(s);
|
||||||
|
// fprintf(stderr, "Main win created\n");
|
||||||
|
|
||||||
|
|
||||||
mainWindow->sSearch->searchTypCMB->setCurrentItem(prefs.ssearchTyp);
|
mainWindow->sSearch->searchTypCMB->setCurrentItem(prefs.ssearchTyp);
|
||||||
@ -287,6 +297,7 @@ int main(int argc, char **argv)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// fprintf(stderr, "Db opened\n");
|
||||||
|
|
||||||
mainWindow->show();
|
mainWindow->show();
|
||||||
if (prefs.startWithAdvSearchOpen)
|
if (prefs.startWithAdvSearchOpen)
|
||||||
@ -296,6 +307,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
start_idxthread(*rclconfig);
|
start_idxthread(*rclconfig);
|
||||||
|
|
||||||
|
// fprintf(stderr, "Go\n");
|
||||||
// Let's go
|
// Let's go
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user