From e59b356badfbaa285ea63f3ef50eecb76bf5b67b Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 1 Dec 2017 15:33:02 +0100 Subject: [PATCH] confgui try program: delete, did not work since qt3, not worth saving --- src/qtgui/confgui/main.cpp | 130 ----------------------------------- src/qtgui/confgui/trconf.pro | 32 --------- 2 files changed, 162 deletions(-) delete mode 100644 src/qtgui/confgui/main.cpp delete mode 100644 src/qtgui/confgui/trconf.pro diff --git a/src/qtgui/confgui/main.cpp b/src/qtgui/confgui/main.cpp deleted file mode 100644 index 8731bcde..00000000 --- a/src/qtgui/confgui/main.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "autoconfig.h" - -#include -#include - -using namespace std; - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pathut.h" -#include "confguiindex.h" -#include "log.h" -#include "rclconfig.h" -#include "execmd.h" -#include "conflinkrcl.h" - -using namespace confgui; - -static const char *thisprog; -static int op_flags; -#define OPT_MOINS 0x1 -#define OPT_h 0x4 -#define OPT_c 0x20 -static const char usage [] = -"\n" -"trconf\n" - " -h : Print help and exit\n" - ; -//" -c : specify config directory, overriding $RECOLL_CONFDIR\n" -//; -static void -Usage(void) -{ - FILE *fp = (op_flags & OPT_h) ? stdout : stderr; - fprintf(fp, "%s: Usage: %s", thisprog, usage); - exit((op_flags & OPT_h)==0); -} - - -static RclConfig *config; - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - // fprintf(stderr, "Application created\n"); - thisprog = argv[0]; - argc--; argv++; - - while (argc > 0 && **argv == '-') { - (*argv)++; - if (!(**argv)) - Usage(); - while (**argv) - switch (*(*argv)++) { - case 'h': op_flags |= OPT_h; Usage();break; - } - // b1: - argc--; argv++; - } - - string a_config = "tstconfdir"; - config = new RclConfig(&a_config); - if (config == 0 || !config->ok()) { - cerr << "Cant read configuration in: " << a_config << endl; - exit(1); - } - cerr << "Working with configuration file in: " << config->getConfDir() - << endl; - - // Translation file for Qt - QTranslator qt( 0 ); - qt.load( QString( "qt_" ) + QTextCodec::locale(), "." ); - app.installTranslator( &qt ); - - // Translations for Recoll - string translatdir = path_cat(config->getDatadir(), "translations"); - QTranslator translator( 0 ); - // QTextCodec::locale() returns $LANG - translator.load( QString("recoll_") + QTextCodec::locale(), - translatdir.c_str() ); - app.installTranslator( &translator ); - // fprintf(stderr, "Translations installed\n"); - - ConfIndexW w(0, config); - QSize size(0, 0); - size = size.expandedTo(w.minimumSizeHint()); - w.resize(size); - //w.setSizeGripEnabled(true); - w.show(); - - // 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())); - // fprintf(stderr, "Go\n"); - // Let's go - return app.exec(); -} - diff --git a/src/qtgui/confgui/trconf.pro b/src/qtgui/confgui/trconf.pro deleted file mode 100644 index 6be1750e..00000000 --- a/src/qtgui/confgui/trconf.pro +++ /dev/null @@ -1,32 +0,0 @@ -TEMPLATE = app -LANGUAGE = C++ - -CONFIG += qt warn_on thread release debug - -HEADERS += confgui.h confguiindex.h - -SOURCES += main.cpp confgui.cpp confguiindex.cpp - -#FORMS = - -unix { - UI_DIR = .ui - MOC_DIR = .moc - OBJECTS_DIR = .obj - - DEFINES += RECOLL_DATADIR='\\"/usr/local/share/recoll\\"' - LIBS += ../../lib/librcl.a -lxapian -liconv -lz - - INCLUDEPATH += ../../common ../../utils ../../rcldb -#../index ../internfile ../query ../unac \ -# ../aspell ../rcldb - POST_TARGETDEPS = ../../lib/librcl.a -} - -UNAME = $$system(uname -s) -contains( UNAME, [lL]inux ) { - LIBS -= -liconv -} - -#The following line was inserted by qt3to4 -QT += qt3support