[tracker] Use minimal in Nemo for QGuiApplication for in case the compositor isn't running yet. Use QGuiApplic
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Use minimal in Nemo for QGuiApplication for in case the compositor isn't running yet. Use QGuiApplic
- Date: Thu, 9 Jan 2014 13:21:53 +0000 (UTC)
commit 934eb10ffaddaaf127a09abd76da694305fbec31
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Dec 23 19:16:41 2013 +0100
Use minimal in Nemo for QGuiApplication for in case the compositor isn't running yet. Use QGuiApplication
instead of QCoreApplication
configure.ac | 17 +++++++++++++++++
src/tracker-extract/tracker-media-art-qt.cpp | 19 ++++++++++++++-----
2 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2e4c1dc..d733ae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -624,6 +624,22 @@ if test "x$enable_maemo" = "xyes" ; then
fi
####################################################################
+# Check if we should install nemo specific features
+####################################################################
+
+AC_ARG_ENABLE(nemo,
+ AS_HELP_STRING([--enable-nemo],
+ [enable nemo specific [[default=no]]]),
+ [enable_nemo="$enableval"],
+ [enable_nemo=no])
+
+AM_CONDITIONAL(HAVE_NEMO, test "x$enable_nemo" = "xyes")
+
+if test "x$enable_nemo" = "xyes" ; then
+ AC_DEFINE(HAVE_NEMO, 1, [Define if we enable Nemo specific features])
+fi
+
+####################################################################
# Check if we should disable the journal
####################################################################
@@ -2674,6 +2690,7 @@ Writeback:
Frameworks / Options:
Support Maemo $enable_maemo
+ Support Nemo $enable_nemo
Support libmeegotouch $have_meegotouch
Support Guaranteed Metadata $enable_guarantee_metadata (e.g. guess nie:title from files)
diff --git a/src/tracker-extract/tracker-media-art-qt.cpp b/src/tracker-extract/tracker-media-art-qt.cpp
index 9b110c0..ab220c4 100644
--- a/src/tracker-extract/tracker-media-art-qt.cpp
+++ b/src/tracker-extract/tracker-media-art-qt.cpp
@@ -29,7 +29,7 @@
#include <QImageReader>
#include <QImageWriter>
#ifdef HAVE_QT5
-#include <QCoreApplication>
+#include <QGuiApplication>
#else
#include <QApplication>
#endif
@@ -38,12 +38,16 @@
#include <glib.h>
+#ifdef HAVE_NEMO
+#include <stdlib.h>
+#endif
+
#include "tracker-media-art-generic.h"
G_BEGIN_DECLS
#ifdef HAVE_QT5
-static QCoreApplication *app = NULL;
+static QGuiApplication *app = NULL;
#else
static QApplication *app = NULL
#endif
@@ -51,11 +55,16 @@ static QApplication *app = NULL
void
tracker_media_art_plugin_init (void)
{
- int argc = 0;
- char *argv[2] = { NULL, NULL };
+ int argc = 1;
+ char *argv[2] = { (char*) "tracker-extract", NULL };
#ifdef HAVE_QT5
- app = new QCoreApplication (argc, argv);
+
+#ifdef HAVE_NEMO
+ setenv("QT_QPA_PLATFORM", "minimal", 1);
+#endif
+
+ app = new QGuiApplication (argc, argv);
#else
app = new QApplication (argc, argv, QApplication::Tty);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]