2018-04-17 7:48 GMT+03:00 Ingo Schwarze <schwa...@usta.de>: > Hi, > > it may seem presumptuous that i'm fanning out candidate fixes for > kde/libs3, given that i never used KDE or GNOME or anything similar > in my life. > > Not sure whether i should ask for OKs for this... > I have mostly done code inspection, no testing, > and the package now builds. > > My hope is mainly that this gets us started. > > Then again, what can be worse than having it not build at all? > KDE3 is probably not the most bug-free and secure software > in the first place, right? > > Once people start fixing the applications on top, testing will > happen anyway, maybe?
Hi, Ingo! First of all thank you for taking care of this. It's a pity I can't take enough part in workflow for now. I'm sorry that you have to work on this. Now to the patch. TL;DR: I'm agree with all changes, but a few libs should have major bump since ABI is changed (public constants): kdeui, khtml, kjs. -- WBR, Vadim Zhukov > Index: patches/patch-kate_part_katebuffer_cpp > =================================================================== > RCS file: /cvs/ports/x11/kde/libs3/patches/patch-kate_part_katebuffer_cpp,v > retrieving revision 1.1 > diff -u -p -r1.1 patch-kate_part_katebuffer_cpp > --- patches/patch-kate_part_katebuffer_cpp 19 Apr 2017 13:21:23 -0000 > 1.1 > +++ patches/patch-kate_part_katebuffer_cpp 17 Apr 2018 04:43:42 -0000 > @@ -1,6 +1,16 @@ > $OpenBSD: patch-kate_part_katebuffer_cpp,v 1.1 2017/04/19 13:21:23 espie Exp > $ > ---- kate/part/katebuffer.cpp.orig Tue Apr 18 16:35:12 2017 > -+++ kate/part/katebuffer.cpp Tue Apr 18 16:38:02 2017 > +Index: kate/part/katebuffer.cpp > +--- kate/part/katebuffer.cpp.orig > ++++ kate/part/katebuffer.cpp > +@@ -122,7 +122,7 @@ class KateFileLoader > + if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == > 0x00)) > + { > + // utf16LE, we need to put the decoder in LE mode > +- char reverseUtf16[3] = {0xFF, 0xFE, 0x00}; > ++ char reverseUtf16[3] = {'\377', '\376', '\0'}; > + m_decoder->toUnicode(reverseUtf16, 2); > + } > + > @@ -917,7 +917,7 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlo > } while (textLine->firstChar()==-1); > kdDebug(13020)<<"updatePreviousNotEmptyLine: updating > line:"<<(blk->startLine()+current_line)<<endl; okay > Index: patches/patch-kdecore_network_kresolverworkerbase_h > =================================================================== > RCS file: patches/patch-kdecore_network_kresolverworkerbase_h > diff -N patches/patch-kdecore_network_kresolverworkerbase_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kdecore_network_kresolverworkerbase_h 17 Apr 2018 04:43:42 > -0000 > @@ -0,0 +1,13 @@ > +$OpenBSD$ > + > +Index: kdecore/network/kresolverworkerbase.h > +--- kdecore/network/kresolverworkerbase.h.orig > ++++ kdecore/network/kresolverworkerbase.h > +@@ -290,6 +290,7 @@ class KResolverWorkerFactoryBase > + { > + public: > + virtual KResolverWorkerBase* create() const = 0; > ++ virtual ~KResolverWorkerFactoryBase() { } > + > + /** > + * Wrapper call to register workers okay > Index: patches/patch-kdecore_network_kserversocket_cpp > =================================================================== > RCS file: patches/patch-kdecore_network_kserversocket_cpp > diff -N patches/patch-kdecore_network_kserversocket_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kdecore_network_kserversocket_cpp 17 Apr 2018 04:43:42 > -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > + > +Index: kdecore/network/kserversocket.cpp > +--- kdecore/network/kserversocket.cpp.orig > ++++ kdecore/network/kserversocket.cpp > +@@ -292,7 +292,7 @@ KActiveSocketBase* KServerSocket::accept() > + } > + else if (!listen()) > + // error happened during listen > +- return false; > ++ return NULL; > + } > + > + // check to see if we're doing a timeout okay > Index: patches/patch-kdeui_kdialogbase_h > =================================================================== > RCS file: patches/patch-kdeui_kdialogbase_h > diff -N patches/patch-kdeui_kdialogbase_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kdeui_kdialogbase_h 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Index: kdeui/kdialogbase.h > +--- kdeui/kdialogbase.h.orig > ++++ kdeui/kdialogbase.h > +@@ -209,8 +209,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog > + No = 0x00000080, ///< Show No button. > + Yes = 0x00000100, ///< Show Yes button. > + Details = 0x00000400, ///< Show Details button. > +- Filler = 0x40000000, ///< @internal Ignored when used in a > constructor. > +- Stretch = 0x80000000, ///< @internal Ignored when used in a > constructor. > ++ Filler = 0x20000000, ///< @internal Ignored when used in a > constructor. > ++ Stretch = 0x40000000, ///< @internal Ignored when used in a > constructor. > + NoDefault ///< Used when specifying a default button; > indicates that no button should be marked by default. @since 3.3 > + }; > + This deserves major bump of libkdeui version in SHARED_LIBS, because ABI changes. > Index: patches/patch-khtml_dom_dom2_traversal_h > =================================================================== > RCS file: patches/patch-khtml_dom_dom2_traversal_h > diff -N patches/patch-khtml_dom_dom2_traversal_h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-khtml_dom_dom2_traversal_h 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > + > +Index: khtml/dom/dom2_traversal.h > +--- khtml/dom/dom2_traversal.h.orig > ++++ khtml/dom/dom2_traversal.h > +@@ -215,7 +215,7 @@ class KHTML_EXPORT NodeFilter (public) > + * > + */ > + enum ShowCode { > +- SHOW_ALL = 0xFFFFFFFF, > ++ SHOW_ALL = 0x00007FFF, > + SHOW_ELEMENT = 0x00000001, > + SHOW_ATTRIBUTE = 0x00000002, > + SHOW_TEXT = 0x00000004, And this deserves major bump of libkhtml version in SHARED_LIBS. > Index: patches/patch-khtml_ecma_kjs_events_cpp > =================================================================== > RCS file: patches/patch-khtml_ecma_kjs_events_cpp > diff -N patches/patch-khtml_ecma_kjs_events_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-khtml_ecma_kjs_events_cpp 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > + > +Index: khtml/ecma/kjs_events.cpp > +--- khtml/ecma/kjs_events.cpp.orig > ++++ khtml/ecma/kjs_events.cpp > +@@ -405,7 +405,7 @@ DOM::Event toEvent(const Value& val) > + FOCUS 4096 DontDelete|ReadOnly > + BLUR 8192 DontDelete|ReadOnly > + SELECT 16384 DontDelete|ReadOnly > +- CHANGE 32768 DontDelete|ReadOnly > ++ CHANGE -1 DontDelete|ReadOnly > + @end > + */ > + DEFINE_CONSTANT_TABLE(EventConstants) And same for libkjs. > Index: patches/patch-khtml_misc_decoder_cpp > =================================================================== > RCS file: patches/patch-khtml_misc_decoder_cpp > diff -N patches/patch-khtml_misc_decoder_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-khtml_misc_decoder_cpp 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > + > +Index: khtml/misc/decoder.cpp > +--- khtml/misc/decoder.cpp.orig > ++++ khtml/misc/decoder.cpp > +@@ -265,7 +265,7 @@ QString Decoder::decode(const char *data, int len) > + if (m_codec->mibEnum() == 1000 && c2 == 0x00) > + { > + // utf16LE, we need to put the decoder in LE mode > +- char reverseUtf16[3] = {0xFF, 0xFE, 0x00}; > ++ char reverseUtf16[3] = {'\377', '\376', '\0'}; > + m_decoder->toUnicode(reverseUtf16, 2); > + } > + } okay > Index: patches/patch-kinit_kinit_cpp > =================================================================== > RCS file: patches/patch-kinit_kinit_cpp > diff -N patches/patch-kinit_kinit_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kinit_kinit_cpp 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,23 @@ > +$OpenBSD$ > + > +Index: kinit/kinit.cpp > +--- kinit/kinit.cpp.orig > ++++ kinit/kinit.cpp > +@@ -321,7 +321,7 @@ const char* get_env_var( const char* var, int envc, co > + static void init_startup_info( KStartupInfoId& id, const char* bin, > + int envc, const char* envs ) > + { > +- const char* dpy = get_env_var( DISPLAY"=", envc, envs ); > ++ const char* dpy = get_env_var( DISPLAY "=", envc, envs ); > + // this may be called in a child, so it can't use display open using > X11display > + // also needed for multihead > + X11_startup_notify_display = XOpenDisplay( dpy ); > +@@ -1513,7 +1513,7 @@ static void kdeinit_library_path() > + QCString display = getenv(DISPLAY); > + if (display.isEmpty()) > + { > +- fprintf(stderr, "kdeinit: Aborting. $"DISPLAY" is not set.\n"); > ++ fprintf(stderr, "kdeinit: Aborting. $" DISPLAY " is not set.\n"); > + exit(255); > + } > + int i; okay > Index: patches/patch-kio_kio_kshred_cpp > =================================================================== > RCS file: patches/patch-kio_kio_kshred_cpp > diff -N patches/patch-kio_kio_kshred_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kio_kio_kshred_cpp 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,18 @@ > +$OpenBSD$ > + > +Index: kio/kio/kshred.cpp > +--- kio/kio/kshred.cpp.orig > ++++ kio/kio/kshred.cpp > +@@ -206,9 +206,9 @@ KShred::flush() > + bool > + KShred::shred() > + { > +- unsigned char p[6][3] = {{'\222', '\111', '\044'}, {'\111', '\044', > '\222'}, > +- {'\044', '\222', '\111'}, {'\155', '\266', > '\333'}, > +- {'\266', '\333', '\155'}, {'\333', '\155', > '\266'}}; > ++ unsigned char p[6][3] = {{ 0x92, '\111', '\044'}, {'\111', '\044', 0x92}, > ++ {'\044', 0x92, '\111'}, {'\155', 0xb6, 0xdb}, > ++ { 0xb6, 0xdb, '\155'}, { 0xdb, '\155', > 0xb6}}; > + QString msg = i18n("Shredding: pass %1 of 35"); > + > + emit processedSize(0); okay > Index: patches/patch-kstyles_keramik_keramik_cpp > =================================================================== > RCS file: patches/patch-kstyles_keramik_keramik_cpp > diff -N patches/patch-kstyles_keramik_keramik_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-kstyles_keramik_keramik_cpp 17 Apr 2018 04:43:42 -0000 > @@ -0,0 +1,37 @@ > +$OpenBSD$ > + > +Index: kstyles/keramik/keramik.cpp > +--- kstyles/keramik/keramik.cpp.orig > ++++ kstyles/keramik/keramik.cpp > +@@ -2790,18 +2790,24 @@ bool KeramikStyle::eventFilter( QObject* object, > QEven > + //Combo dropdowns are shaped > + case QEvent::Resize: > + { > ++ int w, h; > ++ > + QListBox* listbox = > static_cast<QListBox*>(object); > + QResizeEvent* resize = > static_cast<QResizeEvent*>(event); > +- if (resize->size().height() < 6) > ++ w = resize->size().width(); > ++ h = resize->size().height(); > ++ > ++ if (h < 6 || h > SHRT_MAX || > ++ w < 7 || w > SHRT_MAX) > + return false; > +- > ++ > + //CHECKME: Not sure the rects are perfect.. > + XRectangle rects[5] = { > +- {0, 0, resize->size().width()-2, > resize->size().height()-6}, > +- {0, resize->size().height()-6, > resize->size().width()-2, 1}, > +- {1, resize->size().height()-5, > resize->size().width()-3, 1}, > +- {2, resize->size().height()-4, > resize->size().width()-5, 1}, > +- {3, resize->size().height()-3, > resize->size().width()-7, 1} > ++ {0, 0, (unsigned short)(w-2), > (unsigned short)(h-6)}, > ++ {0, (short)(h-6), (unsigned > short)(w-2), 1}, > ++ {1, (short)(h-5), (unsigned > short)(w-3), 1}, > ++ {2, (short)(h-4), (unsigned > short)(w-5), 1}, > ++ {3, (short)(h-3), (unsigned > short)(w-7), 1} > + }; > + > + XShapeCombineRectangles(qt_xdisplay(), > listbox->handle(), ShapeBounding, 0, 0, okay