Author: cazfi
Date: Tue Sep 20 19:02:40 2016
New Revision: 33838

URL: http://svn.gna.org/viewcvs/freeciv?rev=33838&view=rev
Log:
Shadow warning fixes and other cleanup to Qt client.

See patch #7701

Modified:
    trunk/client/gui-qt/chatline.cpp
    trunk/client/gui-qt/chatline.h
    trunk/client/gui-qt/citydlg.cpp
    trunk/client/gui-qt/fonts.cpp
    trunk/client/gui-qt/fonts.h

Modified: trunk/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.cpp?rev=33838&r1=33837&r2=33838&view=diff
==============================================================================
--- trunk/client/gui-qt/chatline.cpp    (original)
+++ trunk/client/gui-qt/chatline.cpp    Tue Sep 20 19:02:40 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -133,8 +133,8 @@
    * If client send commands to take ai, set /away to disable AI
    */
   if (message.startsWith("/take ")) {
-      s = s.remove("/take ");
-      players_iterate(pplayer) {
+    s = s.remove("/take ");
+    players_iterate(pplayer) {
       splayer = QString(pplayer->name);
       splayer = "\"" + splayer + "\"";
 
@@ -735,9 +735,9 @@
 /**************************************************************************
   Version message event constructor.
 **************************************************************************/
-version_message_event::version_message_event(const QString &message) :
+version_message_event::version_message_event(const QString &msg) :
   QEvent(QEvent::User),
-  message(message)
+  message(msg)
 {}
 
 /**************************************************************************

Modified: trunk/client/gui-qt/chatline.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.h?rev=33838&r1=33837&r2=33838&view=diff
==============================================================================
--- trunk/client/gui-qt/chatline.h      (original)
+++ trunk/client/gui-qt/chatline.h      Tue Sep 20 19:02:40 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -127,7 +127,7 @@
 {
   QString message;
 public:
-  explicit version_message_event(const QString &message);
+  explicit version_message_event(const QString &msg);
   QString get_message() const { return message; }
 };
 

Modified: trunk/client/gui-qt/citydlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/citydlg.cpp?rev=33838&r1=33837&r2=33838&view=diff
==============================================================================
--- trunk/client/gui-qt/citydlg.cpp     (original)
+++ trunk/client/gui-qt/citydlg.cpp     Tue Sep 20 19:02:40 2016
@@ -818,7 +818,7 @@
     QGroupBox *prod_box = new QGroupBox(this);
     QGridLayout *prod_layout = new QGridLayout;
     // City information widget texts about surpluses and so on
-    QWidget *info_widget = new QWidget(overview_tab);
+    QWidget *info_wdg = new QWidget(overview_tab);
 
     info_grid_layout = new QGridLayout(parent);
     info_list << _("Food:") << _("Prod:") << _("Trade:") << _("Gold:")
@@ -826,18 +826,18 @@
               << _("Change in:") << _("Corruption:") << _("Waste:")
               << _("Culture:") << _("Pollution:") << _("Plague Risk:");
     info_nr = info_list.count();
-    new font_updater(info_widget, fonts::city_label);
+    new font_updater(info_wdg, fonts::city_label);
     info_grid_layout->setSpacing(0);
     for (iter = 0; iter < info_nr; iter++) {
-      ql = new QLabel(info_list[iter], info_widget);
+      ql = new QLabel(info_list[iter], info_wdg);
       info_grid_layout->addWidget(ql, iter, 0);
-      qlt[iter] = new QLabel(info_widget);
+      qlt[iter] = new QLabel(info_wdg);
       info_grid_layout->addWidget(qlt[iter], iter, 1);
     }
-    info_widget->setLayout(info_grid_layout);
-    info_widget->setMinimumHeight(2 * fm.height() + 24
-                                  + tileset_tile_height(tileset)
-                                  + tileset_unit_with_upkeep_height(tileset));
+    info_wdg->setLayout(info_grid_layout);
+    info_wdg->setMinimumHeight(2 * fm.height() + 24
+                               + tileset_tile_height(tileset)
+                               + tileset_unit_with_upkeep_height(tileset));
     production_combo = new progress_bar(parent);
     production_combo->setToolTip(_("Click to change current production"));
 
@@ -910,7 +910,7 @@
     9  [.INFO] [..SCROLL.2.........................]
     */
     overview_grid_layout->addWidget(prod_box, 1, 5, 4, 2);
-    overview_grid_layout->addWidget(info_widget, 6, 0, 4, 1);
+    overview_grid_layout->addWidget(info_wdg, 6, 0, 4, 1);
     overview_grid_layout->addWidget(citizens_label, 0, 0, 1, 6);
     overview_grid_layout->addWidget(map_box, 1, 0, 4, 5);
     overview_grid_layout->addWidget(lcity_name, 0, 6, 1, 1);

Modified: trunk/client/gui-qt/fonts.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fonts.cpp?rev=33838&r1=33837&r2=33838&view=diff
==============================================================================
--- trunk/client/gui-qt/fonts.cpp       (original)
+++ trunk/client/gui-qt/fonts.cpp       Tue Sep 20 19:02:40 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,10 +11,14 @@
    GNU General Public License for more details.
 ***********************************************************************/
 
-#include "fonts.h"
+#ifdef HAVE_CONFIG_H
+#include <fc_config.h>
+#endif
 
 // client
 #include "options.h"
+
+#include "fonts.h"
 
 // Qt
 #include <QWidget>
@@ -105,12 +109,12 @@
 /***************************************************************************
   Constructor.
 ***************************************************************************/
-font_updater::font_updater(QWidget *widget, const QString &font_name) :
+font_updater::font_updater(QWidget *wdg, const QString &fname) :
   QObject(widget),
-  font_name(font_name),
-  widget(widget)
+  font_name(fname),
+  widget(wdg)
 {
-  widget->setFont(get_font(font_name));
+  wdg->setFont(get_font(fname));
   font_options_listener::listen();
 }
 

Modified: trunk/client/gui-qt/fonts.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fonts.h?rev=33838&r1=33837&r2=33838&view=diff
==============================================================================
--- trunk/client/gui-qt/fonts.h (original)
+++ trunk/client/gui-qt/fonts.h Tue Sep 20 19:02:40 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by


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

Reply via email to