Tidied it up a bit more (hopefully this should be it)

On 21/05/05, John Pullan <[EMAIL PROTECTED]> wrote:
> Try again :|
> 
> On 21/05/05, John Pullan <[EMAIL PROTECTED]> wrote:
> > On 21/05/05, Christian Hack <[EMAIL PROTECTED]> wrote:
> > > I've been away for a while - is QT3.3 required now for CVS?
> > >
> > > Scanwizard.cpp as of May 15 won't compile due to "qlocale.h" being not
> > > available in QT3.2. It appeared in QT3.3.
> > >
> > The code auto tries to auto select which country you are in for a
> > DVB-T full scan.
> > The attached patch should alliviate the problem for you while keeping
> > the functionality in. If you could test it and report back that would
> > be good :)
> 

-- 
John
Index: scanwizard.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/scanwizard.cpp,v
retrieving revision 1.12
diff -u -r1.12 scanwizard.cpp
--- scanwizard.cpp	15 May 2005 22:55:40 -0000	1.12
+++ scanwizard.cpp	21 May 2005 14:00:55 -0000
@@ -31,7 +31,9 @@
  */
 #include <qapplication.h>
 #include <qptrlist.h>
+#if (QT_VERSION >= 0x030300)
 #include <qlocale.h>
+#endif
 #include "mythcontext.h"
 #include "dvbchannel.h"
 #include "videosource.h"
@@ -547,20 +549,28 @@
 
 ScanCountry::ScanCountry()
 {
+    Lang country = AU;
+#if (QT_VERSION >= 0x030300)
     QLocale locale = QLocale::system();
-    QLocale::Country country = locale.country();
+    QLocale::Country qtcountry = locale.country();
+    if (qtcountry == QLocale::Australia)
+        country = AU;
+    else if (qtcountry == QLocale::Germany)
+        country = DE;
+    else if (qtcountry == QLocale::Finland)
+        country = FI;
+    else if (qtcountry == QLocale::Sweden)
+        country = SE;
+    else if (qtcountry == QLocale::UnitedKingdom)
+        country = UK;
+#endif
 
     setLabel(tr("Country"));
-    addSelection(QObject::tr("Australia"),QString::number(AU),
-                 country==QLocale::Australia);
-    addSelection(QObject::tr("Finland"),QString::number(FI),
-                 country==QLocale::Finland);
-    addSelection(QObject::tr("Sweden"),QString::number(SE),
-                 country==QLocale::Sweden);
-    addSelection(QObject::tr("United Kingdom"),QString::number(UK),
-                 country==QLocale::UnitedKingdom);
-    addSelection(QObject::tr("Germany"),QString::number(DE),
-                 country==QLocale::Germany);
+    addSelection(QObject::tr("Australia"),QString::number(AU) ,country==AU);
+    addSelection(QObject::tr("Finland"),QString::number(FI), country==FI);
+    addSelection(QObject::tr("Sweden"),QString::number(SE), country==SE);
+    addSelection(QObject::tr("United Kingdom"),QString::number(UK),country==UK);
+    addSelection(QObject::tr("Germany"),QString::number(DE),country==DE);
 }
 
 ScanOptionalConfig::ScanOptionalConfig(ScanWizard *wizard) : 
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to