diff --git a/src/configure b/src/configure index 9ca48b2e..c2b89e9e 100755 --- a/src/configure +++ b/src/configure @@ -2798,6 +2798,7 @@ fi cd $QTGUI # We just want a .pro file: no problem with unsubstituted variables at # this point. +test -f uifrom3 && sh uifrom3 test -f recoll.pro && chmod +w recoll.pro cp recoll.pro.in recoll.pro ${QMAKE} recoll.pro diff --git a/src/configure.ac b/src/configure.ac index 8cd7e270..5280344a 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -206,6 +206,7 @@ fi cd $QTGUI # We just want a .pro file: no problem with unsubstituted variables at # this point. +test -f uifrom3 && sh uifrom3 test -f recoll.pro && chmod +w recoll.pro cp recoll.pro.in recoll.pro ${QMAKE} recoll.pro diff --git a/src/qtgui/advsearch_w.h b/src/qtgui/advsearch_w.h index 57452241..ae0e757d 100644 --- a/src/qtgui/advsearch_w.h +++ b/src/qtgui/advsearch_w.h @@ -1,6 +1,6 @@ #ifndef _ADVSEARCH_W_H_INCLUDED_ #define _ADVSEARCH_W_H_INCLUDED_ -/* @(#$Id: advsearch_w.h,v 1.9 2006-12-04 08:17:24 dockes Exp $ (C) 2005 J.F.Dockes */ +/* @(#$Id: advsearch_w.h,v 1.10 2006-12-04 09:56:26 dockes Exp $ (C) 2005 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,9 +40,9 @@ class DummyAdvSearchBase : public AdvSearchBase #else #include "ui_advsearch.h" -class DummyAdvSearchBase : public QWidget, public Ui::AdvSearchBase +class DummyAdvSearchBase : public QDialog, public Ui::AdvSearchBase { - public: DummyAdvSearchBase(QDialog *parent) {setupUi(parent);} +public: DummyAdvSearchBase(QWidget *parent):QDialog(parent) {setupUi(this);} }; #endif diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index 18966a0e..8aadb45a 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: main.cpp,v 1.54 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: main.cpp,v 1.55 2006-12-04 09:56:26 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -118,11 +118,6 @@ bool maybeOpenDb(string &reason, bool force) static void recollCleanup() { LOGDEB(("recollCleanup: writing settings\n")); - if (mainWindow) { - prefs.mainwidth = mainWindow->width(); - prefs.mainheight = mainWindow->height(); - prefs.ssearchTyp = mainWindow->sSearch->searchTypCMB->currentItem(); - } rwSettings(true); LOGDEB2(("recollCleanup: stopping idx thread\n")); stop_idxthread(); diff --git a/src/qtgui/preview_w.h b/src/qtgui/preview_w.h index 9cb1f956..93872584 100644 --- a/src/qtgui/preview_w.h +++ b/src/qtgui/preview_w.h @@ -1,6 +1,6 @@ #ifndef _PREVIEW_W_H_INCLUDED_ #define _PREVIEW_W_H_INCLUDED_ -/* @(#$Id: preview_w.h,v 1.6 2006-12-04 08:17:24 dockes Exp $ (C) 2006 J.F.Dockes */ +/* @(#$Id: preview_w.h,v 1.7 2006-12-04 09:56:26 dockes Exp $ (C) 2006 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ class DummyPreviewBase : public PreviewBase #else class DummyPreviewBase : public QWidget, public Ui::PreviewBase { - public: DummyPreviewBase(QWidget* parent) {setupUi(parent);} +public: DummyPreviewBase(QWidget* parent):QWidget(parent){setupUi(this);} }; #endif //MOC_SKIP_END diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp index 28bebf5e..617f7856 100644 --- a/src/qtgui/rclmain_w.cpp +++ b/src/qtgui/rclmain_w.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.10 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.11 2006-12-04 09:56:26 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -151,9 +151,12 @@ void RclMain::init() nextPageAction->setIconSet(createIconSet("nextpage.png")); prevPageAction->setIconSet(createIconSet("prevpage.png")); #else - toolsSpellAction->setIcon(QIcon(":spell.png")); - nextPageAction->setIcon(QIcon(":nextpage.png")); - prevPageAction->setIcon(QIcon(":prevpage.png")); + toolsSpellAction->setIcon(QIcon(":/images/spell.png")); + nextPageAction->setIcon(QIcon(":/images/nextpage.png")); + prevPageAction->setIcon(QIcon(":/images/prevpage.png")); + toolsDoc_HistoryAction->setIcon(QIcon(":/images/history.png")); + toolsAdvanced_SearchAction->setIcon(QIcon(":/images/asearch.png")); + toolsSort_parametersAction->setIcon(QIcon(":/images/sortparms.png")); #endif } @@ -162,6 +165,9 @@ void RclMain::init() // created over the main form). bool RclMain::close(bool) { + prefs.mainwidth = width(); + prefs.mainheight = height(); + prefs.ssearchTyp = sSearch->searchTypCMB->currentItem(); fileExit(); return false; } diff --git a/src/qtgui/rclmain_w.h b/src/qtgui/rclmain_w.h index ed5422b3..875b378e 100644 --- a/src/qtgui/rclmain_w.h +++ b/src/qtgui/rclmain_w.h @@ -44,9 +44,9 @@ class DummyRclMainBase : public RclMainBase }; #define RCLMAINPARENT QWidget #else -class DummyRclMainBase : public QMainWindow, public Ui::RclMainBase +class DummyRclMainBase : public Q3MainWindow, public Ui::RclMainBase { -public: DummyRclMainBase(Q3MainWindow*parent) {setupUi(parent);} +public: DummyRclMainBase(QWidget *parent) :Q3MainWindow(parent){setupUi(this);} #define RCLMAINPARENT Q3MainWindow }; #endif diff --git a/src/qtgui/sort_w.h b/src/qtgui/sort_w.h index 1e690412..0bd0a811 100644 --- a/src/qtgui/sort_w.h +++ b/src/qtgui/sort_w.h @@ -1,4 +1,4 @@ -/* @(#$Id: sort_w.h,v 1.3 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes */ +/* @(#$Id: sort_w.h,v 1.4 2006-12-04 09:56:26 dockes Exp $ (C) 2005 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,9 +36,9 @@ class DummySortFormBase : public SortFormBase public: DummySortFormBase(QWidget* parent = 0) : SortFormBase(parent) {} }; #else -class DummySortFormBase : public QWidget, public Ui::SortFormBase +class DummySortFormBase : public QDialog, public Ui::SortFormBase { -public: DummySortFormBase(QDialog* parent) {setupUi(parent);} +public: DummySortFormBase(QWidget* parent):QDialog(parent){setupUi(this);} }; #endif //MOC_SKIP_END diff --git a/src/qtgui/spell_w.h b/src/qtgui/spell_w.h index 76507e5f..5f3a895d 100644 --- a/src/qtgui/spell_w.h +++ b/src/qtgui/spell_w.h @@ -1,6 +1,6 @@ #ifndef _ASPELL_W_H_INCLUDED_ #define _ASPELL_W_H_INCLUDED_ -/* @(#$Id: spell_w.h,v 1.4 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */ +/* @(#$Id: spell_w.h,v 1.5 2006-12-04 09:56:26 dockes Exp $ (C) 2006 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ class DummySpellBase : public SpellBase #include "ui_spell.h" class DummySpellBase : public QWidget, public Ui::SpellBase { - public: DummySpellBase(QWidget* parent) {setupUi(parent);} +public: DummySpellBase(QWidget* parent):QWidget(parent){setupUi(this);} }; #endif //MOC_SKIP_END diff --git a/src/qtgui/ssearch_w.h b/src/qtgui/ssearch_w.h index dc31c7f6..e9f22daa 100644 --- a/src/qtgui/ssearch_w.h +++ b/src/qtgui/ssearch_w.h @@ -1,4 +1,4 @@ -/* @(#$Id: ssearch_w.h,v 1.4 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */ +/* @(#$Id: ssearch_w.h,v 1.5 2006-12-04 09:56:27 dockes Exp $ (C) 2006 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ class DummySSearchBase : public SSearchBase #else class DummySSearchBase : public QWidget, public Ui::SSearchBase { - public: DummySSearchBase(QWidget* parent) {setupUi(parent);} +public: DummySSearchBase(QWidget* parent) : QWidget(parent) {setupUi(this);} }; #endif //MOC_SKIP_END diff --git a/src/qtgui/uiprefs_w.h b/src/qtgui/uiprefs_w.h index 829339a0..71eadd58 100644 --- a/src/qtgui/uiprefs_w.h +++ b/src/qtgui/uiprefs_w.h @@ -1,4 +1,4 @@ -/* @(#$Id: uiprefs_w.h,v 1.4 2006-12-04 08:17:24 dockes Exp $ (C) 2006 J.F.Dockes */ +/* @(#$Id: uiprefs_w.h,v 1.5 2006-12-04 09:56:27 dockes Exp $ (C) 2006 J.F.Dockes */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ */ #ifndef _UIPREFS_W_H_INCLUDED_ #define _UIPREFS_W_H_INCLUDED_ -/* @(#$Id: uiprefs_w.h,v 1.4 2006-12-04 08:17:24 dockes Exp $ (C) 2005 J.F.Dockes */ +/* @(#$Id: uiprefs_w.h,v 1.5 2006-12-04 09:56:27 dockes Exp $ (C) 2005 J.F.Dockes */ #include #include @@ -33,13 +33,13 @@ class QDialog; #if QT_VERSION < 0x040000 class DummyUIPrefsDialogBase : public UIPrefsDialogBase { - public: DummyUIPrefsDialogBase(QWidget* parent = 0) - : UIPrefsDialogBase(parent) {} +public: DummyUIPrefsDialogBase(QWidget* parent = 0) + : UIPrefsDialogBase(parent) {} }; #else class DummyUIPrefsDialogBase : public QDialog, protected Ui::UIPrefsDialogBase { - public: DummyUIPrefsDialogBase(QDialog *parent) {setupUi(parent);} + public: DummyUIPrefsDialogBase(QDialog *parent):QDialog(parent) {setupUi(this);} }; #endif //MOC_SKIP_END diff --git a/src/utils/refcntr.h b/src/utils/refcntr.h index 9889969b..8aba72ed 100644 --- a/src/utils/refcntr.h +++ b/src/utils/refcntr.h @@ -7,7 +7,7 @@ template class RefCntr { int *pcount; public: X * operator->() {return rep;} - RefCntr() : rep(0), pcount(0) {} + RefCntr() : rep(0), pcount(new int(1)) {} RefCntr(X *pp) : rep(pp), pcount(new int(1)) {} RefCntr(const RefCntr &r) :rep(r.rep), pcount(r.pcount) { (*pcount)++;} RefCntr& operator=(const RefCntr& r) {