From 7598e0b79100cad1c633a3b51e4a74cb44c19b09 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 31 May 2005 22:06:07 +0000 Subject: [PATCH] Fix QString -> std::string compilation problem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9988 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/QBibtexDialog.C | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 9e8b55b79e..5222d0288b 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2005-05-31 Angus Leeming + + * QBibtexDialog.C (addDatabase): fix QString ->std::string + compilation problem. + 2005-05-31 Angus Leeming * validators.C (validate): allow ':' characters in file names. diff --git a/src/frontends/qt2/QBibtexDialog.C b/src/frontends/qt2/QBibtexDialog.C index 4f93cf7685..cbd6061aa0 100644 --- a/src/frontends/qt2/QBibtexDialog.C +++ b/src/frontends/qt2/QBibtexDialog.C @@ -150,9 +150,9 @@ void QBibtexDialog::addPressed() void QBibtexDialog::addDatabase() { int const sel = add_->bibLB->currentItem(); - QString const file = trim(add_->bibED->text()); + string const file = trim(fromqstr(add_->bibED->text())); - if (sel < 0 && file.isNull()) + if (sel < 0 && file.empty()) return; // Add the selected browser_bib keys to browser_database @@ -165,8 +165,8 @@ void QBibtexDialog::addDatabase() } } - if (!file.isEmpty()) { - QString const f = toqstr(ChangeExtension(fromqstr(file), "")); + if (!file.empty()) { + QString const f = toqstr(ChangeExtension(file, "")); if ((databaseLB->findItem(f)) == 0) databaseLB->insertItem(f); }