]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiExternal.cpp
Make code a bit easier to read
[lyx.git] / src / frontends / qt / GuiExternal.cpp
index 70239f19e22c03fe9080be60a7f405ea95b44a71..c88be8cdb808a9643edc2bfd6c8435f625d2f694 100644 (file)
@@ -100,12 +100,12 @@ GuiExternal::GuiExternal(GuiView & lv)
                this, SLOT(change_adaptor()));
        connect(browsePB, SIGNAL(clicked()),
                this, SLOT(browseClicked()));
-       connect(externalCO, SIGNAL(activated(QString)),
+       connect(externalCO, SIGNAL(activated(int)),
                this, SLOT(templateChanged()));
        connect(extraED, SIGNAL(textChanged(QString)),
                this, SLOT(extraChanged(QString)));
-       connect(extraFormatCO, SIGNAL(activated(QString)),
-               this, SLOT(formatChanged(QString)));
+       connect(extraFormatCO, SIGNAL(activated(int)),
+               this, SLOT(formatChanged(int)));
        connect(widthUnitCO, SIGNAL(activated(int)),
                this, SLOT(widthUnitChanged()));
        connect(heightUnitCO, SIGNAL(selectionChanged(lyx::Length::UNIT)),
@@ -315,9 +315,9 @@ void GuiExternal::extraChanged(const QString & text)
 }
 
 
-void GuiExternal::formatChanged(const QString & format)
+void GuiExternal::formatChanged(int const i)
 {
-       extraED->setText(extra_[format]);
+       extraED->setText(extra_[extraFormatCO->itemText(i)]);
 }
 
 
@@ -682,7 +682,7 @@ static QStringList templateFilters(QString const & template_name)
 
 
 QString GuiExternal::browse(QString const & input,
-                                    QString const & template_name) const
+                                    QString const & template_name)
 {
        QString const title = qt_("Select external file");
        QString const bufpath = bufferFilePath();