fix qt build default tip

Thu, 23 Jul 2026 21:46:06 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 23 Jul 2026 21:46:06 +0200
changeset 1221
b147745ba6be
parent 1220
185d9fe96c6b

fix qt build

application/demo_states.c file | annotate | diff | comparison | revisions
ui/qt/toolkit.cpp file | annotate | diff | comparison | revisions
ui/qt/window.cpp file | annotate | diff | comparison | revisions
ui/ui/toolkit.h file | annotate | diff | comparison | revisions
--- a/application/demo_states.c	Wed Jul 22 21:21:24 2026 +0200
+++ b/application/demo_states.c	Thu Jul 23 21:46:06 2026 +0200
@@ -28,6 +28,7 @@
 
 #include "demo_states.h"
 
+#include <stdio.h>
 #include <inttypes.h>
 
 static void *doc1;
--- a/ui/qt/toolkit.cpp	Wed Jul 22 21:21:24 2026 +0200
+++ b/ui/qt/toolkit.cpp	Thu Jul 23 21:46:06 2026 +0200
@@ -131,7 +131,7 @@
     e.window = obj->window;
     e.document = obj->ctx->document;
     e.eventdata = NULL;
-    e.eventdatatype = 0;
+    e.eventdatatype = UI_EVENT_DATA_NULL;
     e.intval = 0;
     e.set = ui_get_setop();
     if(prepare_event) {
@@ -169,7 +169,7 @@
     e.window = obj->window;
     e.document = obj->ctx->document;
     e.eventdata = NULL;
-    e.eventdatatype = 0;
+    e.eventdatatype = UI_EVENT_DATA_NULL;
     e.intval = 0;
     e.set = ui_get_setop();
     if(prepare_event) {
@@ -185,3 +185,6 @@
     action->setEnabled((bool)enable);
 }
 
+void ui_call_mainthread(ui_threadfunc tf, void* td) {
+    // TODO
+}
--- a/ui/qt/window.cpp	Wed Jul 22 21:21:24 2026 +0200
+++ b/ui/qt/window.cpp	Thu Jul 23 21:46:06 2026 +0200
@@ -113,7 +113,7 @@
         evt.document = evt.obj->ctx->document;
         evt.window = evt.obj->window;
         evt.eventdata = NULL;
-        evt.eventdatatype = 0;
+        evt.eventdatatype = UI_EVENT_DATA_NULL;
         evt.intval = 0;
         if(msgBox.clickedButton() == btn1) {
             evt.intval = 1;
--- a/ui/ui/toolkit.h	Wed Jul 22 21:21:24 2026 +0200
+++ b/ui/ui/toolkit.h	Thu Jul 23 21:46:06 2026 +0200
@@ -214,8 +214,6 @@
 typedef struct UiTextStyle  UiTextStyle;
 typedef struct UiColor      UiColor;
 
-typedef enum UiEventType UiEventType;
-
 /* begin opaque types */
 typedef struct UiContext     UiContext;
 typedef struct UiContainer   UiContainer;
@@ -337,6 +335,7 @@
     UI_EVENT_DATA_FILE_LIST,
     UI_EVENT_DATA_TYPED_OBJECT
 };
+typedef enum UiEventType UiEventType;
 
 struct UiEvent {
     UiObject     *obj;

mercurial