Unverified Commit ba750668 authored by Rick van Schijndel's avatar Rick van Schijndel Committed by GitHub
Browse files

Merge pull request #271362 from pbsds/rm-dead-patches

treewide: remove unreferenced patch files
parents 87ec25bf f41aba37
Loading
Loading
Loading
Loading
+0 −93
Original line number Diff line number Diff line
diff --git a/plug-ins/pdf/pdf-import.cpp b/plug-ins/pdf/pdf-import.cpp
index 189737908..a2a479693 100644
--- a/plug-ins/pdf/pdf-import.cpp
+++ b/plug-ins/pdf/pdf-import.cpp
@@ -152,12 +152,12 @@ public :
   void
   updateLineDash (GfxState *state)
   {
-    double *dashPattern;
-    int dashLength;
-    double dashStart;
-
-    state->getLineDash (&dashPattern, &dashLength, &dashStart);
-    this->dash_length = dashLength ? dashPattern[0] * scale : 1.0;
+    const double *dashPattern=NULL;
+    int dashLength=0;
+    double dashStart=0;
+    const std::vector<double> &dash = state->getLineDash(&dashStart);  // > Poppler 22.09 ...
+    dashPattern = dash.data();
+    dashLength = dash.size();
 
     if (dashLength == 0)
       this->line_style = DIA_LINE_STYLE_SOLID;
@@ -318,10 +318,11 @@ public :
     //FIXME: Dia is really unhappy about zero size fonts
     if (!(state->getFontSize() > 0.0))
       return;
-    GfxFont *f = state->getFont();
+    const std::shared_ptr<GfxFont> f = state->getFont();  // poppler 22.05 ... header changed
+    gconstpointer f1 = &f;  // GLib typedef const void * gconstpointer;
 
     // instead of building the same font over and over again
-    if (g_hash_table_lookup (this->font_map, f)) {
+    if (g_hash_table_lookup (this->font_map, f1)) {
       ++font_map_hits;
       return;
     }
@@ -333,8 +334,9 @@ public :
     gchar *family = g_strdup (f->getFamily() ? f->getFamily()->c_str() : "sans");
 
     // we are (not anymore) building the same font over and over again
+    f1  = &f;
     g_print ("Font 0x%x: '%s' size=%g (* %g)\n",
-	     GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale);
+	     GPOINTER_TO_INT (f1), family, state->getTransformedFontSize(), scale);
 
     // now try to make a fontname Dia/Pango can cope with
     // strip style postfix - we already have extracted the style bits above
@@ -354,7 +356,9 @@ public :
       fsize *= fabs(fm[3] / fm[0]);
     font = dia_font_new (family, style, fsize * scale / 0.8);
 
-    g_hash_table_insert (this->font_map, f, font);
+    f1 = &f;
+    gpointer f2 = (gpointer)f1;  // GLib typedef void* gpointer;
+    g_hash_table_insert (this->font_map, f2, font);
     g_free (family);
   }
   void updateTextShift(GfxState *state, double shift)
@@ -721,11 +725,12 @@ DiaOutputDev::drawString(GfxState *state, GooString *s)
     return;
   if (!(state->getFontSize() > 0.0))
     return;
-  font = (DiaFont *)g_hash_table_lookup (this->font_map, state->getFont());
+  gconstpointer f_1 = &state->getFont();
+  font = (DiaFont *)g_hash_table_lookup (this->font_map, f_1);
 
   // we have to decode the string data first
   {
-    GfxFont *f = state->getFont();
+    const std::shared_ptr<GfxFont> f = state->getFont();
     const char *p = s->c_str();
     CharCode code;
     int   j = 0, m, n;
@@ -870,8 +875,8 @@ import_pdf(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
   std::unique_ptr<PDFDoc> doc;
   GooString *fileName = new GooString(filename);
   // no passwords yet
-  GooString *ownerPW = NULL;
-  GooString *userPW = NULL;
+  const std::optional<GooString> ownerPW;
+  const std::optional<GooString> userPW;
   gboolean ret = FALSE;
 
   // without this we will get strange crashes (at least with /O2 build)
@@ -899,6 +904,7 @@ import_pdf(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
     delete diaOut;
     ret = TRUE;
   }
+  doc.reset();
   delete fileName;
 
   return ret;
+0 −200
Original line number Diff line number Diff line
ls diff --git focusblur-3.2.6/src/aaa.h focusblur-3.2.6/src/aaa.h
index 4a6d90b..c74cab2 100644
--- focusblur-3.2.6/src/aaa.h
+++ focusblur-3.2.6/src/aaa.h
@@ -19,8 +19,7 @@
 #ifndef __AAA_H__
 #define __AAA_H__
 
-#include <glib/gmacros.h>
-#include <glib/gtypes.h>
+#include <glib.h>
 
 
 G_BEGIN_DECLS
diff --git focusblur-3.2.6/src/brush.h focusblur-3.2.6/src/brush.h
index 685b253..8778fec 100644
--- focusblur-3.2.6/src/brush.h
+++ focusblur-3.2.6/src/brush.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_BRUSH_H__
 #define __FOCUSBLUR_BRUSH_H__
 
-#include <glib/gtypes.h>
+#include <glib.h>
 #include "focusblurtypes.h"
 
 G_BEGIN_DECLS
diff --git focusblur-3.2.6/src/depthmap.h focusblur-3.2.6/src/depthmap.h
index 78f5e99..baee540 100644
--- focusblur-3.2.6/src/depthmap.h
+++ focusblur-3.2.6/src/depthmap.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_DEPTHMAP_H__
 #define __FOCUSBLUR_DEPTHMAP_H__
 
-#include <glib/gtypes.h>
+#include <glib.h>
 
 #include "focusblurtypes.h"
 #include "focusblurenums.h"
diff --git focusblur-3.2.6/src/diffusion.h focusblur-3.2.6/src/diffusion.h
index 07ffe4b..3c1e4b9 100644
--- focusblur-3.2.6/src/diffusion.h
+++ focusblur-3.2.6/src/diffusion.h
@@ -23,7 +23,7 @@
 #define __FOCUSBLUR_DIFFUSION_H__
 
 
-#include <glib/gtypes.h>
+#include <glib.h>
 
 #include "focusblur.h"
 #include "focusblurtypes.h"
diff --git focusblur-3.2.6/src/fftblur.h focusblur-3.2.6/src/fftblur.h
index 124bcba..cd809fa 100644
--- focusblur-3.2.6/src/fftblur.h
+++ focusblur-3.2.6/src/fftblur.h
@@ -23,8 +23,7 @@
 #define __FOCUSBLUR_FFTBLUR_H__
 
 
-#include <glib/gmacros.h>
-#include <glib/gtypes.h>
+#include <glib.h>
 #include <libgimpwidgets/gimpwidgetstypes.h>
 
 #include "focusblurparam.h"
diff --git focusblur-3.2.6/src/fftblurbuffer.h focusblur-3.2.6/src/fftblurbuffer.h
index b34d682..42e6380 100644
--- focusblur-3.2.6/src/fftblurbuffer.h
+++ focusblur-3.2.6/src/fftblurbuffer.h
@@ -28,8 +28,7 @@
 #endif
 #include <fftw3.h>
 
-#include <glib/gmacros.h>
-#include <glib/gtypes.h>
+#include <glib.h>
 #include <gtk/gtkstyle.h>
 #include <libgimp/gimptypes.h>
 #include <libgimpwidgets/gimpwidgetstypes.h>
diff --git focusblur-3.2.6/src/fftblurproc.h focusblur-3.2.6/src/fftblurproc.h
index 495572d..10a34f4 100644
--- focusblur-3.2.6/src/fftblurproc.h
+++ focusblur-3.2.6/src/fftblurproc.h
@@ -23,8 +23,7 @@
 #define __FOCUSBLUR_FFTBLUR_PROC_H__
 
 
-#include <glib/gmacros.h>
-#include <glib/gtypes.h>
+#include <glib.h>
 
 #include "focusblurtypes.h"
 
diff --git focusblur-3.2.6/src/focusblur.h focusblur-3.2.6/src/focusblur.h
index 54ca40a..d7e13a6 100644
--- focusblur-3.2.6/src/focusblur.h
+++ focusblur-3.2.6/src/focusblur.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_H__
 #define __FOCUSBLUR_H__
 
-#include <glib/gmacros.h>
+#include <glib.h>
 
 G_BEGIN_DECLS
 
diff --git focusblur-3.2.6/src/focusblurparam.h focusblur-3.2.6/src/focusblurparam.h
index 64c887b..32865b4 100644
--- focusblur-3.2.6/src/focusblurparam.h
+++ focusblur-3.2.6/src/focusblurparam.h
@@ -22,8 +22,7 @@
 #ifndef __FOCUSBLUR_PARAM_H__
 #define __FOCUSBLUR_PARAM_H__
 
-#include <glib/gmacros.h>
-#include <glib/gtypes.h>
+#include <glib.h>
 #include <gtk/gtkstyle.h>
 #include <libgimp/gimptypes.h>
 
diff --git focusblur-3.2.6/src/focusblurstock.h focusblur-3.2.6/src/focusblurstock.h
index 15f3603..cfc0567 100644
--- focusblur-3.2.6/src/focusblurstock.h
+++ focusblur-3.2.6/src/focusblurstock.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_STOCK_H__
 #define __FOCUSBLUR_STOCK_H__
 
-#include <glib/gtypes.h>
+#include <glib.h>
 
 G_BEGIN_DECLS
 
diff --git focusblur-3.2.6/src/focusblurtypes.h focusblur-3.2.6/src/focusblurtypes.h
index 0954c60..1531c84 100644
--- focusblur-3.2.6/src/focusblurtypes.h
+++ focusblur-3.2.6/src/focusblurtypes.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_TYPES_H__
 #define __FOCUSBLUR_TYPES_H__
 
-#include <glib/gmacros.h>
+#include <glib.h>
 
 
 G_BEGIN_DECLS
diff --git focusblur-3.2.6/src/interface.h focusblur-3.2.6/src/interface.h
index 6defd27..e819c60 100644
--- focusblur-3.2.6/src/interface.h
+++ focusblur-3.2.6/src/interface.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_INTERFACE_H__
 #define __FOCUSBLUR_INTERFACE_H__
 
-#include <glib/gtypes.h>
+#include <glib.h>
 
 #include "focusblurtypes.h"
 
diff --git focusblur-3.2.6/src/render.h focusblur-3.2.6/src/render.h
index febbd24..a501f1e 100644
--- focusblur-3.2.6/src/render.h
+++ focusblur-3.2.6/src/render.h
@@ -24,7 +24,7 @@
 
 #include "config.h"
 
-#include <glib/gtypes.h>
+#include <glib.h>
 //#include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
 
diff --git focusblur-3.2.6/src/shine.h focusblur-3.2.6/src/shine.h
index c5a3621..86b4c09 100644
--- focusblur-3.2.6/src/shine.h
+++ focusblur-3.2.6/src/shine.h
@@ -22,7 +22,7 @@
 #ifndef __FOCUSBLUR_SHINE_H__
 #define __FOCUSBLUR_SHINE_H__
 
-#include <glib/gtypes.h>
+#include <glib.h>
 #include <libgimp/gimptypes.h>
 
 #include "focusblurtypes.h"
diff --git focusblur-3.2.6/src/source.h focusblur-3.2.6/src/source.h
index 50d34ca..8eec35c 100644
--- focusblur-3.2.6/src/source.h
+++ focusblur-3.2.6/src/source.h
@@ -24,7 +24,7 @@
 
 #include "config.h"
 
-#include <glib/gtypes.h>
+#include <glib.h>
 #include <libgimp/gimptypes.h>
 
 #include "focusblurtypes.h"
+0 −12
Original line number Diff line number Diff line
diff -urN Cura-15.04.old/Cura/util/sliceEngine.py Cura-15.04/Cura/util/sliceEngine.py
--- Cura-15.04.old/Cura/util/sliceEngine.py	2016-05-07 20:34:17.305020334 +0200
+++ Cura-15.04/Cura/util/sliceEngine.py	2016-05-07 20:40:02.993286467 +0200
@@ -343,7 +343,7 @@
 						objMax[1] = max(oMax[1], objMax[1])
 			if objMin is None:
 				return
-			pos += (objMin + objMax) / 2.0 * 1000
+			pos = numpy.add( pos, (objMin + objMax) / 2.0 * 1000, out=pos, casting='unsafe')
 			commandList += ['-s', 'posx=%d' % int(pos[0]), '-s', 'posy=%d' % int(pos[1])]
 
 			vertexTotal = [0] * 4
+0 −15
Original line number Diff line number Diff line
index 7ea81c7..0c19767 100644
--- a/src/utils/iso5426converter.cpp
+++ b/src/utils/iso5426converter.cpp
@@ -1211,7 +1211,11 @@ QChar Iso5426Converter::getCombiningChar(uint c) {
     return 0x1EF1; // SMALL LETTER U WITH HORN AND DOT BELOW
 
   default:
+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+    myDebug() << "no match for" << hex << c;
+#else
     myDebug() << "no match for" << Qt::hex << c;
+#endif
     return QChar();
   }
 }
+0 −55
Original line number Diff line number Diff line
From 86cc27022015697a61d1ec1b13e52f9dbe7f6c57 Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@protonmail.ch>
Date: Mon, 23 Mar 2020 18:34:00 -0400
Subject: [PATCH] Adjust get_data_path for NixOS

We construct the ulauncher data path from xdg_data_dirs
and prevent it from being a nix store path or being xdg_data_home.
We do this to prevent /nix/store paths being hardcoded to shortcuts.json.
On NixOS this path will either be /run/current-system/sw/share/ulauncher
or $HOME/.nix-profile/share/ulauncher if the user used nix-env.
---
 ulauncher/config.py | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/ulauncher/config.py b/ulauncher/config.py
index f21014e..cc636e1 100644
--- a/ulauncher/config.py
+++ b/ulauncher/config.py
@@ -50,15 +50,24 @@ def get_data_path():
     is specified at installation time.
     """
 
-    # Get pathname absolute or relative.
-    path = os.path.join(
-        os.path.dirname(__file__), __ulauncher_data_directory__)
-
-    abs_data_path = os.path.abspath(path)
-    if not os.path.exists(abs_data_path):
-        raise ProjectPathNotFoundError(abs_data_path)
-
-    return abs_data_path
+    paths = list(
+        filter(
+            os.path.exists,
+            [
+                os.path.join(dir, "ulauncher")
+                for dir in xdg_data_dirs
+                # Get path that isn't in the /nix/store so they don't get hardcoded into configs
+                if not dir.startswith("/nix/store/")
+                # Exclude .local/share/ulauncher which isn't what we want
+                if not dir.startswith(xdg_data_home)
+            ],
+        )
+    )
+
+    try:
+        return paths[0]
+    except:
+        raise ProjectPathNotFoundError()
 
 
 def is_wayland():
-- 
2.25.1
Loading