Author Topic: compiling with qt 4.6/4.5 (solved)  (Read 637 times)

mckaygerhard

  • Newbie
  • *
  • Posts: 8
    • View Profile
compiling with qt 4.6/4.5 (solved)
« on: September 01, 2015, 10:13:44 PM »
i made a compilation of yabause qt interface with qt 4.5 and/or 4.6 for maebo older versions and some debian derivatives (xandros os)

with this little patch:

can be easyle with :

Code: [Select]
@@ -188,7 +188,8 @@ QList <translation_struct> QtYabause::ge
        // Find the locale
        QLocale locale = QLocale(localeStr);   
        // Now we should be good for the language name
-       trans.name = locale.nativeLanguageName();
+ #if QT_VERSION < 0x040700
+       trans.name = locale.name(); // all qt 4, ugly but works
+ #else
+              trans.name = locale.nativeLanguageName(); // qt 4.8 only
+ #endif
        translations.append(trans);
    }
 #endif

and works like a charm with qt 4.6/4.5, glib 2.24, mesa 7.2 or mesa 7.7

but this are for yabause 0.9.13 and 0.9.14

now in lasted git are solved https://github.com/Yabause/yabause/commit/39b37a41bdf7dc12b14a8a6aed678db1e5d8b4c6

mckaygerhard

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: compiling with qt 4.6/4.5 (solved)
« Reply #1 on: September 02, 2015, 12:02:06 AM »
another patch for qt 4.6 only

he commit fe08b71 deprecated older functions for qt4 but if now used qt5 let older linux can build for older devices, i build yabause using
qt 4.6.3, gcc 4.3, gtk 2.20, cmake 2.8.0

with this patch can be able:

Code: [Select]
--- yabause-0.9.14.1.orig/src/qt/ui/UIDebugSCSP.cpp
+++ yabause-0.9.14.1/src/qt/ui/UIDebugSCSP.cpp
@@ -76,8 +76,13 @@ void UIDebugSCSP::initAudio()

    isPlaying = true;

+#if QT_VERSION < 0x040700
+   audioFormat.setFrequency(44100);
+   audioFormat.setChannels(2);
+#else
    audioFormat.setSampleRate(44100);
    audioFormat.setChannelCount(2);
+#endif
    audioFormat.setSampleSize(16);
    audioFormat.setCodec("audio/pcm");
    audioFormat.setByteOrder(QAudioFormat::LittleEndian);