Author: cazfi
Date: Sat Dec 13 11:32:05 2014
New Revision: 27283

URL: http://svn.gna.org/viewcvs/freeciv?rev=27283&view=rev
Log:
Fixed Qt modpack installer to install modpack from list after double-click, not
already when the modpack row is selected.

See bug #23029

Modified:
    branches/S2_5/tools/mpgui_qt.cpp
    branches/S2_5/tools/mpgui_qt.h

Modified: branches/S2_5/tools/mpgui_qt.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/tools/mpgui_qt.cpp?rev=27283&r1=27282&r2=27283&view=diff
==============================================================================
--- branches/S2_5/tools/mpgui_qt.cpp    (original)
+++ branches/S2_5/tools/mpgui_qt.cpp    Sat Dec 13 11:32:05 2014
@@ -208,7 +208,7 @@
   mplist_table->hideColumn(ML_TYPE);
 
   connect(mplist_table, SIGNAL(cellClicked(int, int)), this, 
SLOT(row_selected(int, int)));
-  connect(mplist_table, SIGNAL(cellActivated(int, int)), this, 
SLOT(row_download(int, int)));
+  connect(mplist_table, SIGNAL(doubleClicked(QModelIndex)), this, 
SLOT(row_download(QModelIndex)));
 
   main_layout->addWidget(mplist_table);
 
@@ -403,9 +403,9 @@
 /**************************************************************************
   User activated another table row
 **************************************************************************/
-void mpgui::row_download(int row, int column)
-{
-  QString URL = mplist_table->item(row, ML_COL_URL)->text();
+void mpgui::row_download(const QModelIndex &index)
+{
+  QString URL = mplist_table->item(index.row(), ML_COL_URL)->text();
 
   URLedit->setText(URL);
 

Modified: branches/S2_5/tools/mpgui_qt.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/tools/mpgui_qt.h?rev=27283&r1=27282&r2=27283&view=diff
==============================================================================
--- branches/S2_5/tools/mpgui_qt.h      (original)
+++ branches/S2_5/tools/mpgui_qt.h      Sat Dec 13 11:32:05 2014
@@ -46,7 +46,7 @@
   private slots:
     void URL_given();
     void row_selected(int, int);
-    void row_download(int, int);
+    void row_download(const QModelIndex &);
 
   private:
     QLineEdit *URLedit;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to