qt4 compiles and sort of works

This commit is contained in:
dockes 2006-12-04 09:56:27 +00:00
parent f672e9de99
commit 5c8d9bc272
12 changed files with 33 additions and 30 deletions

1
src/configure vendored
View File

@ -2798,6 +2798,7 @@ fi
cd $QTGUI cd $QTGUI
# We just want a .pro file: no problem with unsubstituted variables at # We just want a .pro file: no problem with unsubstituted variables at
# this point. # this point.
test -f uifrom3 && sh uifrom3
test -f recoll.pro && chmod +w recoll.pro test -f recoll.pro && chmod +w recoll.pro
cp recoll.pro.in recoll.pro cp recoll.pro.in recoll.pro
${QMAKE} recoll.pro ${QMAKE} recoll.pro

View File

@ -206,6 +206,7 @@ fi
cd $QTGUI cd $QTGUI
# We just want a .pro file: no problem with unsubstituted variables at # We just want a .pro file: no problem with unsubstituted variables at
# this point. # this point.
test -f uifrom3 && sh uifrom3
test -f recoll.pro && chmod +w recoll.pro test -f recoll.pro && chmod +w recoll.pro
cp recoll.pro.in recoll.pro cp recoll.pro.in recoll.pro
${QMAKE} recoll.pro ${QMAKE} recoll.pro

View File

@ -1,6 +1,6 @@
#ifndef _ADVSEARCH_W_H_INCLUDED_ #ifndef _ADVSEARCH_W_H_INCLUDED_
#define _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 * 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 * it under the terms of the GNU General Public License as published by
@ -40,9 +40,9 @@ class DummyAdvSearchBase : public AdvSearchBase
#else #else
#include "ui_advsearch.h" #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 #endif

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -118,11 +118,6 @@ bool maybeOpenDb(string &reason, bool force)
static void recollCleanup() static void recollCleanup()
{ {
LOGDEB(("recollCleanup: writing settings\n")); LOGDEB(("recollCleanup: writing settings\n"));
if (mainWindow) {
prefs.mainwidth = mainWindow->width();
prefs.mainheight = mainWindow->height();
prefs.ssearchTyp = mainWindow->sSearch->searchTypCMB->currentItem();
}
rwSettings(true); rwSettings(true);
LOGDEB2(("recollCleanup: stopping idx thread\n")); LOGDEB2(("recollCleanup: stopping idx thread\n"));
stop_idxthread(); stop_idxthread();

View File

@ -1,6 +1,6 @@
#ifndef _PREVIEW_W_H_INCLUDED_ #ifndef _PREVIEW_W_H_INCLUDED_
#define _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 * 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 * it under the terms of the GNU General Public License as published by
@ -54,7 +54,7 @@ class DummyPreviewBase : public PreviewBase
#else #else
class DummyPreviewBase : public QWidget, public Ui::PreviewBase class DummyPreviewBase : public QWidget, public Ui::PreviewBase
{ {
public: DummyPreviewBase(QWidget* parent) {setupUi(parent);} public: DummyPreviewBase(QWidget* parent):QWidget(parent){setupUi(this);}
}; };
#endif #endif
//MOC_SKIP_END //MOC_SKIP_END

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -151,9 +151,12 @@ void RclMain::init()
nextPageAction->setIconSet(createIconSet("nextpage.png")); nextPageAction->setIconSet(createIconSet("nextpage.png"));
prevPageAction->setIconSet(createIconSet("prevpage.png")); prevPageAction->setIconSet(createIconSet("prevpage.png"));
#else #else
toolsSpellAction->setIcon(QIcon(":spell.png")); toolsSpellAction->setIcon(QIcon(":/images/spell.png"));
nextPageAction->setIcon(QIcon(":nextpage.png")); nextPageAction->setIcon(QIcon(":/images/nextpage.png"));
prevPageAction->setIcon(QIcon(":prevpage.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 #endif
} }
@ -162,6 +165,9 @@ void RclMain::init()
// created over the main form). // created over the main form).
bool RclMain::close(bool) bool RclMain::close(bool)
{ {
prefs.mainwidth = width();
prefs.mainheight = height();
prefs.ssearchTyp = sSearch->searchTypCMB->currentItem();
fileExit(); fileExit();
return false; return false;
} }

View File

@ -44,9 +44,9 @@ class DummyRclMainBase : public RclMainBase
}; };
#define RCLMAINPARENT QWidget #define RCLMAINPARENT QWidget
#else #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 #define RCLMAINPARENT Q3MainWindow
}; };
#endif #endif

View File

@ -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 * 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 * 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) {} public: DummySortFormBase(QWidget* parent = 0) : SortFormBase(parent) {}
}; };
#else #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 #endif
//MOC_SKIP_END //MOC_SKIP_END

View File

@ -1,6 +1,6 @@
#ifndef _ASPELL_W_H_INCLUDED_ #ifndef _ASPELL_W_H_INCLUDED_
#define _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 * 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 * 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" #include "ui_spell.h"
class DummySpellBase : public QWidget, public Ui::SpellBase class DummySpellBase : public QWidget, public Ui::SpellBase
{ {
public: DummySpellBase(QWidget* parent) {setupUi(parent);} public: DummySpellBase(QWidget* parent):QWidget(parent){setupUi(this);}
}; };
#endif #endif
//MOC_SKIP_END //MOC_SKIP_END

View File

@ -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 * 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 * it under the terms of the GNU General Public License as published by
@ -38,7 +38,7 @@ class DummySSearchBase : public SSearchBase
#else #else
class DummySSearchBase : public QWidget, public Ui::SSearchBase class DummySSearchBase : public QWidget, public Ui::SSearchBase
{ {
public: DummySSearchBase(QWidget* parent) {setupUi(parent);} public: DummySSearchBase(QWidget* parent) : QWidget(parent) {setupUi(this);}
}; };
#endif #endif
//MOC_SKIP_END //MOC_SKIP_END

View File

@ -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 * 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 * it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
*/ */
#ifndef _UIPREFS_W_H_INCLUDED_ #ifndef _UIPREFS_W_H_INCLUDED_
#define _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 <qvariant.h> #include <qvariant.h>
#include <qdialog.h> #include <qdialog.h>
@ -33,13 +33,13 @@ class QDialog;
#if QT_VERSION < 0x040000 #if QT_VERSION < 0x040000
class DummyUIPrefsDialogBase : public UIPrefsDialogBase class DummyUIPrefsDialogBase : public UIPrefsDialogBase
{ {
public: DummyUIPrefsDialogBase(QWidget* parent = 0) public: DummyUIPrefsDialogBase(QWidget* parent = 0)
: UIPrefsDialogBase(parent) {} : UIPrefsDialogBase(parent) {}
}; };
#else #else
class DummyUIPrefsDialogBase : public QDialog, protected Ui::UIPrefsDialogBase class DummyUIPrefsDialogBase : public QDialog, protected Ui::UIPrefsDialogBase
{ {
public: DummyUIPrefsDialogBase(QDialog *parent) {setupUi(parent);} public: DummyUIPrefsDialogBase(QDialog *parent):QDialog(parent) {setupUi(this);}
}; };
#endif #endif
//MOC_SKIP_END //MOC_SKIP_END

View File

@ -7,7 +7,7 @@ template <class X> class RefCntr {
int *pcount; int *pcount;
public: public:
X * operator->() {return rep;} 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(X *pp) : rep(pp), pcount(new int(1)) {}
RefCntr(const RefCntr &r) :rep(r.rep), pcount(r.pcount) { (*pcount)++;} RefCntr(const RefCntr &r) :rep(r.rep), pcount(r.pcount) { (*pcount)++;}
RefCntr& operator=(const RefCntr& r) { RefCntr& operator=(const RefCntr& r) {