Oops: currentData() is Qt 5 only.

This commit is contained in:
Juergen Spitzmueller 2017-06-10 18:17:43 +02:00
parent 5685080356
commit f34f0c1db4

View File

@ -188,7 +188,7 @@ void GuiCitation::closeEvent(QCloseEvent * e)
void GuiCitation::applyView()
{
int const choice = max(0, citationStyleCO->currentIndex());
style_ = citationStyleCO->currentData().toString();
style_ = citationStyleCO->itemData(citationStyleCO->currentIndex()).toString();
bool const full = starredCB->isChecked();
bool const force = forceuppercaseCB->isChecked();
@ -392,7 +392,8 @@ void GuiCitation::updateStyles(BiblioInfo const & bi)
citationStyleCO->blockSignals(true);
// save old style selection
QString const curdata = citationStyleCO->currentData().toString();
QString const curdata =
citationStyleCO->itemData(citationStyleCO->currentIndex()).toString();
QString const olddata = (curdata.isEmpty()) ? style_ : curdata;
citationStyleCO->clear();
BiblioInfo::CiteStringMap::const_iterator cit = sty.begin();