From dbd3f570baee126690dacd47b3a083da13fb62bd Mon Sep 17 00:00:00 2001 From: dockes Date: Tue, 4 Apr 2006 07:55:30 +0000 Subject: [PATCH] Get things to compile with QT_NO_STL --- src/qtgui/main.cpp | 18 +++++++++--------- src/qtgui/preview/preview.ui.h | 2 +- src/qtgui/rclmain.cpp | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index 50c1f50b..377aee5c 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.38 2006-03-29 17:31:55 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: main.cpp,v 1.39 2006-04-04 07:55:29 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -157,7 +157,7 @@ int main( int argc, char ** argv ) rclconfig = recollinit(recollCleanup, sigcleanup, reason); if (!rclconfig || !rclconfig->ok()) { QString msg = app.translate("Main", "Configuration problem: "); - msg += reason; + msg += QString::fromUtf8(reason.c_str()); QMessageBox::critical(0, "Recoll", msg); exit(1); } @@ -219,13 +219,13 @@ int main( int argc, char ** argv ) information #endif (0, "Recoll", - app.translate("Main", "Could not open database in ")+ - QString(dbdir) + - app.translate("Main", - ".\n" - "Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed."), - "Ok", - "Cancel", 0, 0, 1 )) { + app.translate("Main", "Could not open database in ") + + QString::fromLocal8Bit(dbdir.c_str()) + + app.translate("Main", + ".\n" + "Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed."), + "Ok", + "Cancel", 0, 0, 1 )) { case 0: // Ok break; case 1: // Cancel diff --git a/src/qtgui/preview/preview.ui.h b/src/qtgui/preview/preview.ui.h index b9812880..3365fe1a 100644 --- a/src/qtgui/preview/preview.ui.h +++ b/src/qtgui/preview/preview.ui.h @@ -439,7 +439,7 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc) char csz[20]; sprintf(csz, "%lu", (unsigned long)sz); QString msg = QString("Loading: %1 (size %2 bytes)") - .arg(fn) + .arg(QString::fromLocal8Bit(fn.c_str())) .arg(csz); // Create progress dialog and aux objects diff --git a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp index 8e01e269..ed1efe69 100644 --- a/src/qtgui/rclmain.cpp +++ b/src/qtgui/rclmain.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.17 2006-04-01 21:02:12 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.18 2006-04-04 07:55:29 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -480,7 +480,7 @@ void RclMain::showDocHistory() DocSequence *docsource; if (sortwidth > 0) { - DocSequenceHistory myseq(rcldb, m_history, tr("Document history")); + DocSequenceHistory myseq(rcldb, m_history, string(tr("Document history").utf8())); docsource = new DocSeqSorted(myseq, sortwidth, sortspecs, string(tr("Document history (sorted)").utf8())); } else {