From 4d3a08bf860baca24211e91a6b8569f01bc94a4f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 1 May 2020 10:17:04 +0200 Subject: [PATCH] Fix build with qt4 --- src/frontends/qt/GuiCounter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt/GuiCounter.cpp b/src/frontends/qt/GuiCounter.cpp index 7470e0d9e0..3103055161 100644 --- a/src/frontends/qt/GuiCounter.cpp +++ b/src/frontends/qt/GuiCounter.cpp @@ -138,8 +138,8 @@ docstring GuiCounter::dialogToParams() const params["counter"] = qstring_to_ucs4(counterCB->currentText()); params["value"] = convert(valueSB->value()); - params.setCmdName(fromqstr(actionCB->currentData().toString())); - params["vtype"] = qstring_to_ucs4(vtypeCB->currentData().toString()); + params.setCmdName(fromqstr(actionCB->itemData(actionCB->currentIndex()).toString())); + params["vtype"] = qstring_to_ucs4(vtypeCB->itemData(vtypeCB->currentIndex()).toString()); params["lyxonly"] = from_ascii(lyxonlyXB->isChecked() ? "true" : "false"); return from_utf8(InsetCounter::params2string(params)); } @@ -147,9 +147,9 @@ docstring GuiCounter::dialogToParams() const bool GuiCounter::checkWidgets(bool readonly) const { - bool const cmdIsValue = actionCB->currentData().toString() == "value"; - bool const cmdIsSet = actionCB->currentData().toString() == "set"; - bool const cmdIsAddTo = actionCB->currentData().toString() == "addto"; + bool const cmdIsValue = actionCB->itemData(actionCB->currentIndex()).toString() == "value"; + bool const cmdIsSet = actionCB->itemData(actionCB->currentIndex()).toString() == "set"; + bool const cmdIsAddTo = actionCB->itemData(actionCB->currentIndex()).toString() == "addto"; counterCB->setEnabled(!readonly); actionCB->setEnabled(!readonly); valueSB->setEnabled(!readonly && (cmdIsSet || cmdIsAddTo)); -- 2.39.2