Some misc fixes
authorunc0rr
Wed, 19 Dec 2007 20:54:00 +0000
changeset 682 a37b6966de84
parent 681 7a20c50988ec
child 683 57d624f71e65
Some misc fixes
QTfrontend/game.cpp
QTfrontend/mapContainer.cpp
QTfrontend/selectWeapon.cpp
hedgewars.kdevelop
hedgewars/CCHandlers.inc
--- a/QTfrontend/game.cpp	Wed Dec 19 11:10:23 2007 +0000
+++ b/QTfrontend/game.cpp	Wed Dec 19 20:54:00 2007 +0000
@@ -85,7 +85,7 @@
 		{
 			HWProto::addStringListToBuffer(buf,
 				(*it).TeamGameConfig(gamecfg->getInitHealth()));
-			HWProto::addStringToBuffer(buf, ammostr);
+			HWProto::addStringToBuffer(buf, QString("eammstore %1").arg(ammostr));
 		}
 	}
 	RawSendIPC(buf);
--- a/QTfrontend/mapContainer.cpp	Wed Dec 19 11:10:23 2007 +0000
+++ b/QTfrontend/mapContainer.cpp	Wed Dec 19 20:54:00 2007 +0000
@@ -34,7 +34,10 @@
   QWidget(parent), mainLayout(this)
 {
 #if QT_VERSION >= 0x040300
-  mainLayout.setContentsMargins (0, 1, 0, QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
+  mainLayout.setContentsMargins(QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin),
+                1,
+                QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin),
+                QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
 #endif
   imageButt=new QPushButton(this);
   imageButt->setObjectName("imageButt");
--- a/QTfrontend/selectWeapon.cpp	Wed Dec 19 11:10:23 2007 +0000
+++ b/QTfrontend/selectWeapon.cpp	Wed Dec 19 20:54:00 2007 +0000
@@ -86,9 +86,9 @@
 
 QString SelWeaponWidget::getWeaponsString() const
 {
-  QString ammo("eammstore ");
+  QString ammo;
   for(int i=0; i<20; ++i) {
-    ammo=QString("%1%2").arg(ammo).arg((*this)[i]);
+    ammo += (*this)[i];
   }
   return ammo;
 }
--- a/hedgewars.kdevelop	Wed Dec 19 11:10:23 2007 +0000
+++ b/hedgewars.kdevelop	Wed Dec 19 20:54:00 2007 +0000
@@ -18,21 +18,21 @@
     <projectname>hedgewars</projectname>
     <projectdirectory>.</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
-    <description/>
+    <description></description>
     <versioncontrol>kdevsubversion</versioncontrol>
-    <defaultencoding/>
+    <defaultencoding></defaultencoding>
   </general>
   <kdevcustomproject>
     <run>
       <directoryradio>executable</directoryradio>
       <customdirectory>/</customdirectory>
-      <mainprogram>/home/igor/sources/hedgewars/bin/hedgewars</mainprogram>
-      <programargs/>
+      <mainprogram>bin/hedgewars</mainprogram>
+      <programargs></programargs>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
       <envvars/>
-      <globaldebugarguments/>
-      <globalcwd>/home/igor/sources/hedgewars/bin</globalcwd>
+      <globaldebugarguments></globaldebugarguments>
+      <globalcwd></globalcwd>
       <useglobalprogram>false</useglobalprogram>
       <autoinstall>false</autoinstall>
       <autokdesu>false</autokdesu>
@@ -172,16 +172,16 @@
     </general>
     <build>
       <buildtool>make</buildtool>
-      <builddir/>
+      <builddir></builddir>
     </build>
     <make>
       <abortonerror>true</abortonerror>
       <numberofjobs>1</numberofjobs>
       <prio>0</prio>
       <dontact>false</dontact>
-      <makebin/>
-      <defaulttarget/>
-      <makeoptions/>
+      <makebin></makebin>
+      <defaulttarget></defaulttarget>
+      <makeoptions></makeoptions>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -189,9 +189,9 @@
     </make>
     <other>
       <prio>0</prio>
-      <otherbin/>
-      <defaulttarget/>
-      <otheroptions/>
+      <otherbin></otherbin>
+      <defaulttarget></defaulttarget>
+      <otheroptions></otheroptions>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -200,15 +200,16 @@
   </kdevcustomproject>
   <kdevdebugger>
     <general>
-      <dbgshell/>
+      <dbgshell></dbgshell>
       <programargs/>
-      <gdbpath/>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
+      <gdbpath></gdbpath>
+      <configGdbScript></configGdbScript>
+      <runShellScript></runShellScript>
+      <runGdbScript></runGdbScript>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
       <floatingtoolbar>false</floatingtoolbar>
+      <raiseGDBOnStart>false</raiseGDBOnStart>
     </general>
     <display>
       <staticmembers>false</staticmembers>
@@ -277,8 +278,8 @@
       <includestyle>4</includestyle>
       <root>/usr/qt/3</root>
       <designerintegration>EmbeddedKDevDesigner</designerintegration>
-      <qmake>/usr/bin/qmake</qmake>
-      <designer>/usr/bin/designer</designer>
+      <qmake>/usr/local/bin/qmake-qt4</qmake>
+      <designer>/usr/local/bin/designer-qt4</designer>
       <designerpluginpaths/>
     </qt>
     <references/>
@@ -310,7 +311,7 @@
       <includeTypedefs>false</includeTypedefs>
     </codecompletion>
     <creategettersetter>
-      <prefixGet/>
+      <prefixGet></prefixGet>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
       <parameterName>theValue</parameterName>
@@ -329,7 +330,7 @@
       <hidenonlocation>false</hidenonlocation>
     </groups>
     <tree>
-      <hidepatterns></hidepatterns>
+      <hidepatterns/>
       <hidenonprojectfiles>true</hidenonprojectfiles>
       <showvcsfields>false</showvcsfields>
     </tree>
@@ -342,13 +343,13 @@
   </cppsupportpart>
   <kdevdocumentation>
     <projectdoc>
-      <docsystem/>
-      <docurl/>
-      <usermanualurl/>
+      <docsystem></docsystem>
+      <docurl></docurl>
+      <usermanualurl></usermanualurl>
     </projectdoc>
   </kdevdocumentation>
   <ctagspart>
-    <customArguments/>
+    <customArguments></customArguments>
     <customTagfilePath>/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA/tags</customTagfilePath>
     <activeTagsFiles/>
   </ctagspart>
--- a/hedgewars/CCHandlers.inc	Wed Dec 19 11:10:23 2007 +0000
+++ b/hedgewars/CCHandlers.inc	Wed Dec 19 20:54:00 2007 +0000
@@ -409,6 +409,7 @@
      with Hedgehogs[CurrHedgehog] do
           begin
           bSelected:= false;
+
           if bShowAmmoMenu then bShowAmmoMenu:= false
           else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or (AttacksNum > 0)
                or ((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true