octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48753] KeyboardTranslator.h macros failing wi


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48753] KeyboardTranslator.h macros failing with Qt5 and GCC 4.8.4
Date: Wed, 10 Aug 2016 23:20:58 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #5, bug #48753 (project octave):

Oy, I just picked the latest Mint a few months ago and it said it would be
supported into 2019.  Well, maybe I'm a bit more willing to switch from V17 to
V18 if it means that my Cinnamon settings all transfer over.  Not right now
though.

OK, so my best guess is that this hunk of macro code that is failing was
tossed in there by the terminal emulator person in order to make a global
instance of KeyboardTranslator that can be used in a loadable library for this
emulator.  So there really is no easy way of getting away from that approach.

However, I may have found a route to investigate.  In Qt 5.1 was introduced an
equivalent type of macro/class:

http://doc.qt.io/qt-5/qglobalstatic.html

Ha!  Here's all I needed to do to make it compile:


diff --git a/libgui/qterminal/libqterminal/unix/KeyboardTranslator.cpp
b/libgui/qterminal/libqterminal/unix/KeyboardTranslator.cpp
--- a/libgui/qterminal/libqterminal/unix/KeyboardTranslator.cpp
+++ b/libgui/qterminal/libqterminal/unix/KeyboardTranslator.cpp
@@ -889,7 +889,7 @@ bool KeyboardTranslatorManager::deleteTr
         return false;
     }
 }
-K_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager )
+Q_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager )
 KeyboardTranslatorManager* KeyboardTranslatorManager::instance()
 {
     return theKeyboardTranslatorManager;



And it appears to run.

So, if this is compiled with Qt 5, can we switch over to Q_GLOBAL_STATIC,
otherwise use K_GLOBAL_STATIC?  Anyone see an easy way to redefine
K_GLOBAL_STATIC without having to modify the source file?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48753>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]