Remove some deprecated glib2 function calls #51

Merged
MicheleC merged 1 commits from fix/silence_glib2_warning into master 3 years ago
Ghost commented 3 years ago

Here is the warning I get:

/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:420:13: warning: 'gboolean g_thread_get_initialized()' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:265) [-Wdeprecated-declarations]
       if( ! g_thread_get_initialized () ) {
             ^
/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:420:39: warning: 'gboolean g_thread_get_initialized()' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:265) [-Wdeprecated-declarations]
       if( ! g_thread_get_initialized () ) {
                                       ^
/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:421:9: warning: 'void g_thread_init(gpointer)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
         g_thread_init(NULL);
         ^
/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:421:27: warning: 'void g_thread_init(gpointer)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
         g_thread_init(NULL);
                           ^
/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:425:35: warning: 'GThread* g_thread_create(GThreadFunc, gpointer, gboolean, GError**)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
     GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL);
                                   ^
/home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:425:109: warning: 'GThread* g_thread_create(GThreadFunc, gpointer, gboolean, GError**)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
     GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL);

For reference:
https://developer.gnome.org/glib/stable/glib-Deprecated-Thread-APIs.html#g-thread-get-initialized
https://developer.gnome.org/glib/stable/glib-Deprecated-Thread-APIs.html#g-thread-init
https://developer.gnome.org/glib/stable/glib-Threads.html#g-thread-new

Here is the warning I get: ``` /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:420:13: warning: 'gboolean g_thread_get_initialized()' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:265) [-Wdeprecated-declarations] if( ! g_thread_get_initialized () ) { ^ /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:420:39: warning: 'gboolean g_thread_get_initialized()' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:265) [-Wdeprecated-declarations] if( ! g_thread_get_initialized () ) { ^ /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:421:9: warning: 'void g_thread_init(gpointer)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations] g_thread_init(NULL); ^ /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:421:27: warning: 'void g_thread_init(gpointer)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations] g_thread_init(NULL); ^ /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:425:35: warning: 'GThread* g_thread_create(GThreadFunc, gpointer, gboolean, GError**)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations] GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL); ^ /home/cethyel/CMAKE_CONVERSION/tqt3/src/kernel/qthread_unix.cpp:425:109: warning: 'GThread* g_thread_create(GThreadFunc, gpointer, gboolean, GError**)' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations] GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL); ``` For reference: https://developer.gnome.org/glib/stable/glib-Deprecated-Thread-APIs.html#g-thread-get-initialized https://developer.gnome.org/glib/stable/glib-Deprecated-Thread-APIs.html#g-thread-init https://developer.gnome.org/glib/stable/glib-Threads.html#g-thread-new
Ghost added the PR/wip label 3 years ago
Ghost added 1 commit 3 years ago
Owner

Looks good to me. Any specific reason why this is marked WIP?

Looks good to me. Any specific reason why this is marked WIP?
Ghost changed title from WIP:Remove some deprecated glib2 function calls to Remove some deprecated glib2 function calls 3 years ago
Ghost removed the PR/wip label 3 years ago
MicheleC merged commit 43d7bc96c7 into master 3 years ago
MicheleC deleted branch fix/silence_glib2_warning 3 years ago
MicheleC added this to the R14.0.11 release milestone 3 years ago
The pull request has been merged as 43d7bc96c7.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tqt3#51
Loading…
There is no content yet.