rpms/kdelibs/F-9 kdelibs-4.1.1-kde#858160-vfat.patch, NONE, 1.1 kdelibs-4.1.1-kdeui-widgets-fixes.patch, NONE, 1.1 kdelibs.spec, 1.348, 1.349

Lukas Tinkl ltinkl at fedoraproject.org
Mon Sep 8 13:04:03 UTC 2008


Author: ltinkl

Update of /cvs/extras/rpms/kdelibs/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28173

Modified Files:
	kdelibs.spec 
Added Files:
	kdelibs-4.1.1-kde#858160-vfat.patch 
	kdelibs-4.1.1-kdeui-widgets-fixes.patch 
Log Message:
more fixes


kdelibs-4.1.1-kde#858160-vfat.patch:

--- NEW FILE kdelibs-4.1.1-kde#858160-vfat.patch ---
Index: solid/solid/backends/hal/halstorageaccess.cpp
===================================================================
--- solid/solid/backends/hal/halstorageaccess.cpp	(revision 858159)
+++ solid/solid/backends/hal/halstorageaccess.cpp	(revision 858160)
@@ -19,6 +19,7 @@
 
 #include "halstorageaccess.h"
 
+#include <QtCore/QLocale>
 #include <QtCore/QDebug>
 #include <QtDBus/QDBusConnection>
 #include <QtDBus/QDBusInterface>
@@ -233,6 +234,38 @@
     if (halOptions.contains("uid=")) {
         options << "uid="+QString::number(::getuid());
     }
+    //respect windows-enforced charsets for fat
+    if ( m_device->property("volume.fstype").toString()=="vfat" && halOptions.contains("codepage=") ) {
+        options << "iocharset=utf8";
+        switch (QLocale::system().language()) {
+        case QLocale::Russian:
+        case QLocale::Ukrainian:
+            options << "codepage=1251";
+            break;
+        case QLocale::Hebrew:
+            options << "codepage=1255";
+            break;
+        case QLocale::Turkish:
+            options << "codepage=1254";
+        case QLocale::Greek:
+            options << "codepage=1253";
+        case QLocale::Arabic:
+            options << "codepage=1256";
+        case QLocale::German:
+        case QLocale::Italian:
+        case QLocale::Spanish:
+        case QLocale::Portuguese:
+        case QLocale::French:
+        case QLocale::Dutch:
+        case QLocale::Danish:
+        case QLocale::Swedish:
+        case QLocale::Norwegian:
+        case QLocale::Icelandic:
+            options << "codepage=1255";
+        default:
+            options.removeLast();
+        }
+    }
 
     msg << "" << "" << options;
 

kdelibs-4.1.1-kdeui-widgets-fixes.patch:

--- NEW FILE kdelibs-4.1.1-kdeui-widgets-fixes.patch ---
Index: kdeui/widgets/krichtextedit.cpp
===================================================================
--- kdeui/widgets/krichtextedit.cpp	(revision 857817)
+++ kdeui/widgets/krichtextedit.cpp	(revision 857818)
@@ -492,7 +492,7 @@
     static QString evilline = "<p style=\" margin-top:0px; margin-bottom:0px; "
                       "margin-left:0px; margin-right:0px; -qt-block-indent:0; "
                       "text-indent:0px; -qt-user-state:0;\">";
-        
+
     QString result;
     QStringList lines = toHtml().split("\n");
     foreach(QString tempLine, lines ) {
@@ -507,6 +507,33 @@
             result += tempLine;
         }
     }
+
+    // ### HACK to fix bug 86925: A completely empty line is ignored in HTML-mode
+    int offset = 0;
+    QRegExp paragraphFinder("<p.*>(.*)</p>");
+    QRegExp paragraphEnd("</p>");
+    paragraphFinder.setMinimal(true);
+
+    while (offset != -1) {
+
+        // Find the next paragraph
+        offset = paragraphFinder.indexIn(result, offset);
+
+        if (offset != -1) {
+
+            // If the text in the paragraph is empty, add a &nbsp there.
+            if (paragraphFinder.capturedTexts().size() == 2 &&
+                paragraphFinder.capturedTexts()[1].isEmpty()) {
+                int end = paragraphEnd.indexIn(result, offset);
+                Q_ASSERT(end != -1 && end > offset);
+                result.replace(end, paragraphEnd.pattern().length(), "<br></p>");
+            }
+
+            // Avoid finding the same match again
+            offset++;
+        }
+    }
+
     return result;
 }
 
Index: kdeui/fonts/kfontchooser.cpp
===================================================================
--- kdeui/fonts/kfontchooser.cpp	(revision 858147)
+++ kdeui/fonts/kfontchooser.cpp	(revision 858148)
@@ -444,6 +444,10 @@
     QPalette pal = d->sampleEdit->palette();
     pal.setColor( QPalette::Active, QPalette::Text, col );
     d->sampleEdit->setPalette( pal );
+    QTextCursor cursor = d->sampleEdit->textCursor();
+    d->sampleEdit->selectAll();
+    d->sampleEdit->setTextColor( col );
+    d->sampleEdit->setTextCursor( cursor );
 }
 
 QColor KFontChooser::color() const
Index: kdeui/widgets/khelpmenu.cpp
===================================================================
--- kdeui/widgets/khelpmenu.cpp	(revision 858312)
+++ kdeui/widgets/khelpmenu.cpp	(revision 858313)
@@ -162,6 +162,7 @@
       d->mWhatsThisAction = new KAction(KIcon("help-contextual"), i18n( "What's &This" ), d->mMenu);
       d->mWhatsThisAction->setShortcut(Qt::SHIFT + Qt::Key_F1);
       connect(d->mWhatsThisAction, SIGNAL(triggered(bool)), this, SLOT(contextHelpActivated()));
+      d->mMenu->addAction(d->mWhatsThisAction);
       need_separator = true;
     }
Index: kdeui/widgets/ktabwidget.cpp
===================================================================
--- kdeui/widgets/ktabwidget.cpp	(revision 858490)
+++ kdeui/widgets/ktabwidget.cpp	(revision 858491)
@@ -281,14 +281,22 @@
 
 QString KTabWidget::tabText( int index ) const
 {
-  if ( d->m_automaticResizeTabs ) {
-    if ( index >= 0 && index < count() )
-      return d->m_tabNames[ index ];
+    if ( d->m_automaticResizeTabs ) {
+        if (index >= 0 && index < count()) {
+            if (index >= d->m_tabNames.count()) {
+                // Ooops, the tab exists, but tabInserted wasn't called yet.
+                // This can happen when inserting the first tab,
+                // and calling tabText from slotCurrentChanged,
+                // see KTabWidget_UnitTest.
+                const_cast<KTabWidget*>(this)->tabInserted(index);
+            }
+            return d->m_tabNames[ index ];
+        }
+        else
+            return QString();
+    }
     else
-      return QString();
-  }
-  else
-    return QTabWidget::tabText( index );
+        return QTabWidget::tabText( index );
 }
 
 void KTabWidget::setTabText( int index, const QString &text )
Index: kdeui/widgets/ktabwidget.h
===================================================================
--- kdeui/widgets/ktabwidget.h	(revision 858490)
+++ kdeui/widgets/ktabwidget.h	(revision 858491)
@@ -187,7 +187,7 @@
      * Removes the widget, reimplemented for
      * internal reasons (keeping labels in sync).
      */
-    virtual void removeTab(int index);
+    virtual void removeTab(int index); // but it's not virtual in QTabWidget...
 
     /**
      * If \a enable is true, tab reordering with middle button will be enabled.


Index: kdelibs.spec
===================================================================
RCS file: /cvs/extras/rpms/kdelibs/F-9/kdelibs.spec,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -r1.348 -r1.349
--- kdelibs.spec	8 Sep 2008 12:41:53 -0000	1.348
+++ kdelibs.spec	8 Sep 2008 13:03:32 -0000	1.349
@@ -85,6 +85,8 @@
 Patch101: kdelibs-4.1.1-kde#856379-cookiejar.patch
 Patch102: kdelibs-4.1.1-kde#856403-urlnav.patch
 Patch103: kdelibs-4.1.1-kutils-fixes.patch
+Patch104: kdelibs-4.1.1-kdeui-widgets-fixes.patch
+Patch105: kdelibs-4.1.1-kde#858160-vfat.patch
 
 BuildRequires: qt4-devel >= 4.4.0
 Requires: qt4 >= %{_qt4_version} 
@@ -215,6 +217,8 @@
 %patch101 -p0 -b .kde#856379-cookiejar
 %patch102 -p0 -b .kde#856403-urlnav
 %patch103 -p0 -b .kutils-fixes
+%patch104 -p0 -b .kdeui-widgets-fixes
+%patch105 -p0 -b .kde#858160-vfat
 
 %build
 
@@ -377,6 +381,8 @@
 %changelog
 * Mon Sep 08 2008 Lukáš Tinkl <ltinkl at redhat.com> 4.1.1-6
 - fix crashes in plugin selector
+- fix problems in various kdeui widgets
+- fix code page selection for vfat volumes in Solid
 
 * Wed Sep 03 2008 Lukáš Tinkl <ltinkl at redhat.com> 4.1.1-5
 - fixed crash on setting cookies on empty domains (like the file




More information about the fedora-extras-commits mailing list