]> git.pld-linux.org Git - packages/kde4-kdelibs.git/commitdiff
- rel 2; branch diff updated auto/th/kde4-kdelibs-4_4_1-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 16 Mar 2010 19:56:29 +0000 (19:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kde4-kdelibs-branch.diff -> 1.19
    kde4-kdelibs.spec -> 1.184

kde4-kdelibs-branch.diff
kde4-kdelibs.spec

index 76b271f6e3231b4edd88782191a6f219c87190fd..9da321b5b4022776d23584ff2b868fb40f4843d4 100644 (file)
-Index: interfaces/ktexteditor/templateinterface.cpp
-===================================================================
---- interfaces/ktexteditor/templateinterface.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ interfaces/ktexteditor/templateinterface.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -114,7 +114,7 @@
- {
-   QMap<QString, QString> enhancedInitValues( initialValues );
--  QRegExp rx( "[$%]\\{([^}\\s]+)\\}" );
-+  QRegExp rx( "[$%]\\{([^}\\r\\n]+)\\}" );
-   rx.setMinimal( true );
-   int pos = 0;
-   int offset;
-Index: kate/dialogs/katedialogs.cpp
-===================================================================
---- kate/dialogs/katedialogs.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/dialogs/katedialogs.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -743,6 +743,10 @@
-   ui->cmbDynamicWordWrapIndicator->addItem( i18n("Follow Line Numbers") );
-   ui->cmbDynamicWordWrapIndicator->addItem( i18n("Always On") );
-+  // hide power user mode if activated anyway
-+  if (!KateGlobal::self()->simpleMode ())
-+    ui->chkDeveloperMode->hide ();
-+    
-   // What's This? help is in the ui-file
-   reload();
-Index: kate/syntax/katehighlight.h
-===================================================================
---- kate/syntax/katehighlight.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/syntax/katehighlight.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -223,6 +223,7 @@
-      * the returned string is used as key for m_additionalData.
-      */
-     QString hlKeyForAttrib( int attrib ) const;
-+    QString hlKeyForContext( int attrib ) const;
+Index: cmake/modules/FindBlitz.cmake
+===================================================================
+--- cmake/modules/FindBlitz.cmake      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ cmake/modules/FindBlitz.cmake      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1,6 +1,6 @@
+-################################################################
+-########## DEPRECATED, use FindQImageBlitz instead #############
+-################################################################
++########################################################### 
++######### DEPRECATED, use FindQImageBlitz instead ######### 
++###########################################################
+ # - Try to find blitz lib
+ # Once done this will define
+ #
+Index: cmake/modules/Qt4ConfigDependentSettings.cmake
+===================================================================
+--- cmake/modules/Qt4ConfigDependentSettings.cmake     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ cmake/modules/Qt4ConfigDependentSettings.cmake     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -77,7 +77,18 @@
+ # QtOpenGL dependencies
+ QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL")
+-SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
++IF(Q_WS_MAC)
++# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL".
++# The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the 
++# linker command. So we need to protect the "-framework foo" as non-separatable strings.
++# We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(),
++# and then we replace the underscores again with spaces. So we get proper linker commands. Alex
++  STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
++  SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
++  STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
++ELSE(Q_WS_MAC)
++  SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
++ENDIF(Q_WS_MAC)
+ SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL})
+Index: cmake/modules/KDE4Macros.cmake
+===================================================================
+--- cmake/modules/KDE4Macros.cmake     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ cmake/modules/KDE4Macros.cmake     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1244,22 +1244,23 @@
+ # being automatically activated by the system bus.
+ # *WARNING* You have to install the helper in ${LIBEXEC_INSTALL_DIR} to make sure everything will work.
+ function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID HELPER_USER)
+-    
+-  if (_kdeBootStrapping)
+-    set(_stubFilesDir  ${CMAKE_SOURCE_DIR}/kdecore/auth/backends/dbus/ )
+-  else (_kdeBootStrapping)
+-    set(_stubFilesDir  ${KDE4_DATA_INSTALL_DIR}/kauth/ )
+-  endif (_kdeBootStrapping)
++    if(KAUTH_HELPER_BACKEND_NAME STREQUAL "DBUS")
++        if (_kdeBootStrapping)
++            set(_stubFilesDir  ${CMAKE_SOURCE_DIR}/kdecore/auth/backends/dbus/ )
++        else (_kdeBootStrapping)
++            set(_stubFilesDir  ${KDE4_DATA_INSTALL_DIR}/kauth/ )
++        endif (_kdeBootStrapping)
+-  configure_file(${_stubFilesDir}/dbus_policy.stub
+-                 ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf)
+-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf 
+-          DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
+-       
+-  configure_file(${_stubFilesDir}/dbus_service.stub
+-                 ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service)
+-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service 
+-          DESTINATION ${DBUS_SYSTEM_SERVICES_INSTALL_DIR})
++        configure_file(${_stubFilesDir}/dbus_policy.stub
++                        ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf)
++        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.conf
++                DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d/)
++
++        configure_file(${_stubFilesDir}/dbus_service.stub
++                        ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service)
++        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.service
++                DESTINATION ${DBUS_SYSTEM_SERVICES_INSTALL_DIR})
++    endif(KAUTH_HELPER_BACKEND_NAME STREQUAL "DBUS")
+ endfunction(KDE4_INSTALL_AUTH_HELPER_FILES)
+ # This macro generates an action file, depending on the backend used, for applications using KAuth.
+@@ -1276,7 +1277,7 @@
+   elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT" OR KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
+     set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy)
+     get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE)
+-    
++
+     add_custom_command(OUTPUT ${_output} 
+                        COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${_input} > ${_output} 
+                        MAIN_DEPENDENCY ${_input}
+Index: interfaces/kimproxy/interface/kcm_instantmessenger.desktop
+===================================================================
+--- interfaces/kimproxy/interface/kcm_instantmessenger.desktop (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ interfaces/kimproxy/interface/kcm_instantmessenger.desktop (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -33,6 +33,7 @@
+ Name[km]=កម្មវិធី​វិធី​ផ្ញើសារ​បន្ទាន់
+ Name[kn]=ತತ್ಷಣ ಓಲೆಕಾರ
+ Name[ko]=인스턴트 메신저
++Name[lt]=Momentinių žinučių klientas
+ Name[lv]=Tūlītējais ziņotājs
+ Name[ml]=ഇന്‍സ്റ്റന്റ് മെസഞ്ചര്‍
+ Name[ms]=Utusan Segera
+Index: interfaces/ktexteditor/kcm_ktexteditor.desktop
+===================================================================
+--- interfaces/ktexteditor/kcm_ktexteditor.desktop     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ interfaces/ktexteditor/kcm_ktexteditor.desktop     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -32,6 +32,7 @@
+ Name[km]=កម្មវិធី​និពន្ធ​អត្ថបទ​ដែល​បាន​បង្កប់
+ Name[kn]=ಹುದುಗಿಸಲಾದ (ಎಂಬೆಡೆಡ್) ಪಠ್ಯ ಸಂಪಾದಕ
+ Name[ko]=끼워넣은 텍스트 편집기
++Name[lt]=Įtaisyta tekstų rengyklė
+ Name[lv]=Iegultais teksta redaktors
+ Name[ml]=തുന്നിച്ചേര്‍ത്ത ചെയ്ത എഴുത്തിടം
+ Name[ms]=Editor Teks Terbinadalam
+Index: kate/plugins/autobrace/ktexteditor_autobrace.desktop
+===================================================================
+--- kate/plugins/autobrace/ktexteditor_autobrace.desktop       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/plugins/autobrace/ktexteditor_autobrace.desktop       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -36,10 +36,11 @@
+ Name[hu]=Automatikus járójelbezáró
+ Name[id]=KurawalOtomatis
+ Name[is]=SjálfvirkirSvigar
+-Name[it]=GraffeAutomatiche
++Name[it]=Graffe automatiche
+ Name[ja]=自動括弧生成
+ Name[km]=AutoBrace
+ Name[ko]=괄호 닫기
++Name[lt]=Automatinis kabučių uždarymas
+ Name[nb]=AutoBrace
+ Name[nds]=AutoKlemmen
+ Name[nl]=AutoBrace
+@@ -85,6 +86,7 @@
+ Comment[ja]=Enter キーを押すことで閉じる括弧を挿入します
+ Comment[km]=បញ្ចូល​រង្វង់ក្រចក​បិទ​នៅ​ពេល​ចុច​គ្រាប់​ចុច​បញ្ចូល (Enter)
+ Comment[ko]=Enter 키를 누를 때 닫는 괄호 삽입하기
++Comment[lt]=Įterpti užveriančias kabutes nuspaudžiant Įvesti (Enter)
+ Comment[nb]=Sett inn avsluttende krøllparentes når Enter trykkes
+ Comment[nds]=Afsluten Klemmen mit de Ingaavtast infögen
+ Comment[nl]=Voert afsluit haakjes in bij indrukken van Enter
+Index: kate/plugins/exporter/exporterpluginview.cpp
+===================================================================
+--- kate/plugins/exporter/exporterpluginview.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/plugins/exporter/exporterpluginview.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -83,13 +83,13 @@
+   }
  
-     int defaultStyleForAttribute( int attrib ) const;
+   QMimeData *data = new QMimeData();
+-  data->setText(m_view->selectionText());
  
-@@ -377,7 +378,7 @@
-      * @see hlKeyForAttrib
-      */
-     QMap<int, QString> m_hlIndex;
+   QString s;
+   QTextStream output( &s, QIODevice::WriteOnly );
+   exportData(true, output);
+   data->setHtml(s);
++  data->setText(s);
+   QApplication::clipboard()->setMimeData(data);
+ }
+Index: kate/plugins/exporter/ktexteditor_exporter.desktop
+===================================================================
+--- kate/plugins/exporter/ktexteditor_exporter.desktop (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/plugins/exporter/ktexteditor_exporter.desktop (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -41,6 +41,7 @@
+ Name[ja]=エクスポート
+ Name[km]=កម្មវិធីនាំចេញ
+ Name[ko]=내보내기
++Name[lt]=Eksportas
+ Name[nb]=Exporter
+ Name[nds]=Export
+ Name[nl]=Exporter
+@@ -86,6 +87,7 @@
+ Comment[ja]=選択した文書を HTML にエクスポートします
+ Comment[km]=នាំចេញ​ឯកសារ​ដែលបានបន្លិច​ទៅ HTML
+ Comment[ko]=강조한 문서를 HTML로 내보내기
++Comment[lt]=Eksportuoti pažymėtą dokumentą į HTML
+ Comment[nb]=Eksporterer fremhevede dokumenter til HTML
+ Comment[nds]=Syntaxmarkeert Dokment as HTML exporteren
+ Comment[nl]=Oplichtend document exporteren naar HTML
+Index: kate/plugins/pythonencoding/ktexteditor_python-encoding.desktop
+===================================================================
+--- kate/plugins/pythonencoding/ktexteditor_python-encoding.desktop    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/plugins/pythonencoding/ktexteditor_python-encoding.desktop    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -39,6 +39,7 @@
+ Name[kn]=ಪೈಥಾನ್ ಸಂಕೇತೀಕರಣ (ಎಂಕೋಡಿಂಗ್) ಪರಿಶೀಲಕ/ಸೇರಿಸುಗ
+ Name[ko]=파이썬 인코딩 검사 및 추가기
+ Name[ku]=Python kod kirina kontrolker/lê zêdeker ê
++Name[lt]=Python koduočių tikrinimo/pridėjimo priemonė
+ Name[lv]=Python kodējuma pārbaudītājs/pievienotājs
+ Name[mai]=पाइथन एनकोडिंग जाँचकएनिहार/जोड़निहार
+ Name[ml]=പൈത്തണ്‍ എന്‍കോഡിങ്ങ് ചെക്കര്‍/ആഡര്‍
+@@ -105,6 +106,7 @@
+ Comment[kn]=ಉಳಿಸುವಾಗ ಪೈಥಾನ್ ಕಡತಗಳ ಸಂಕೇತೀಕರಣವನ್ನು (ಎಂಕೋಡಿಂಗ್) ಪರಿಶೀಲಿಸಿ, ಸಂಕೇತೀಕರಣ ಸಾಲನ್ನು ಸೇರಿಸು
+ Comment[ko]=파이썬 파일을 저장할 때 인코딩을 검사하여 인코딩 줄 추가하기
+ Comment[ku]=Demê tomar kirinê de kod kirina pelên python kontrol bike û rêzekê kod kirinê lê zêde bike
++Comment[lt]=Įrašant python failus patikrinti koduotę ir pridėti koduotės eilutę
+ Comment[lv]=Saglabājot pārbauda kodējumu python failiem un pievieno kodējuma rindu
+ Comment[mai]=सहेजबाक काले पाएथनक एनकोडिंग जाँचू आओर कोनो एनकोडिंग फाइलकेँ जोड़ू
+ Comment[ml]=സൂക്ഷിയ്ക്കുമ്പോള്‍ പൈത്തണ്‍ ഫയലുകളുടെ എന്‍കോഡിങ്ങ് പരിശോദിയ്ക്കുകയും എന്‍കോഡിങ്ങ് വരി ചേര്‍ക്കുകയും ചെയ്യുക
+Index: kate/vimode/kateviinsertmode.cpp
+===================================================================
+--- kate/vimode/kateviinsertmode.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/vimode/kateviinsertmode.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -220,11 +220,6 @@
+       m_view->pageDown();
+       return true;
+     default:
+-      // accept completion if active
+-      if(m_view->completionWidget()->isCompletionActive()) {
+-        m_view->completionWidget()->execute();
+-      }
 -
-+    QMap<int, QString> m_ctxIndex;
-   public:
-     inline bool foldingIndentationSensitive () { return m_foldingIndentationSensitive; }
-     inline bool allowsFolding(){return folding;}
-Index: kate/syntax/katehighlight.cpp
-===================================================================
---- kate/syntax/katehighlight.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/syntax/katehighlight.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -84,6 +84,7 @@
-     m_additionalData["none"]->deliminator = stdDeliminator;
-     m_additionalData["none"]->wordWrapDeliminator = stdDeliminator;
-     m_hlIndex[0] = "none";
-+    m_ctxIndex[0]="";
-   }
-   else
+       return false;
+       break;
+     }
+Index: kate/data/katepartpluginsrc
+===================================================================
+--- kate/data/katepartpluginsrc        (.../tags/KDE/4.4.1/kdelibs)    (wersja 0)
++++ kate/data/katepartpluginsrc        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -0,0 +1,2 @@
++[Kate Part Plugins]
++ktexteditorexporter=true
+Index: kate/data/CMakeLists.txt
+===================================================================
+--- kate/data/CMakeLists.txt   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/data/CMakeLists.txt   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1,3 +1,3 @@
+ install( FILES katepartui.rc katepartsimpleui.rc  DESTINATION  ${DATA_INSTALL_DIR}/katepart )
+ install( FILES katepart.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
+-install( FILES katemoderc  DESTINATION  ${CONFIG_INSTALL_DIR} )
++install( FILES katemoderc katepartpluginsrc  DESTINATION  ${CONFIG_INSTALL_DIR} )
+Index: kate/spellcheck/spellcheckdialog.cpp
+===================================================================
+--- kate/spellcheck/spellcheckdialog.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/spellcheck/spellcheckdialog.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1,5 +1,5 @@
+ /* This file is part of the KDE libraries
+-   Copyright (C) 2009 Michel ludwig <michel.ludwig@kdemail.net>
++   Copyright (C) 2009-2010 Michel ludwig <michel.ludwig@kdemail.net>
+    Copyright (C) 2008 Mirko Stocker <me@misto.ch>
+    Copyright (C) 2004-2005 Anders Lund <anders@alweb.dk>
+    Copyright (C) 2003 Clarence Dang <dang@kde.org>
+@@ -233,8 +233,6 @@
+   if ( m_spellCheckCancelledByUser
+        || m_currentLanguageRangeIterator == m_languagesInSpellCheckRange.end() )
    {
-@@ -951,6 +952,20 @@
-   return true;
- }
-+QString KateHighlighting::hlKeyForContext(int i) const
-+{
-+  int k = 0;
-+  QMap<int,QString>::const_iterator it = m_ctxIndex.constEnd();
-+  while ( it != m_hlIndex.constBegin() )
-+  {
-+    --it;
-+    k = it.key();
-+    if ( i >= k )
-+      break;
-+  }
-+  return it.value();
-+}
-+
- QString KateHighlighting::hlKeyForAttrib( int i ) const
- {
-   // find entry. This is faster than QMap::find. m_hlIndex always has an entry
-@@ -1651,7 +1666,7 @@
-  */
- int KateHighlighting::addToContextList(const QString &ident, int ctx0)
- {
--  kDebug(13010)<<"=== Adding hl with ident '"<<ident<<"'";
-+  //kDebug(13010)<<"=== Adding hl with ident '"<<ident<<"' ctx0="<<ctx0;
-   buildIdentifier=ident;
-   KateSyntaxContextData *data, *datasub;
-@@ -1678,6 +1693,7 @@
-   RegionList<<"!KateInternal_TopLevel!";
-   m_hlIndex[internalIDList.count()] = ident;
-+  m_ctxIndex[ctx0]=ident;
-   m_additionalData.insert( ident, new HighlightPropertyBag );
-   // fill out the propertybag
-Index: kate/smart/katesmartregion.cpp
-===================================================================
---- kate/smart/katesmartregion.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/smart/katesmartregion.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -55,6 +55,8 @@
-     else
-       *m_bounding = m_bounding->encompass(*range);
+-    m_currentSpellCheckRange = KTextEditor::Range::invalid();
+-    m_currentDecToEncOffsetList.clear();
+     spellCheckDone();
+     return;
    }
+@@ -250,7 +248,6 @@
+     const QString& dictionary = (*m_currentLanguageRangeIterator).second;
+     KTextEditor::Range languageSubRange = (nextRangeBegin.isValid() ? KTextEditor::Range(nextRangeBegin, currentLanguageRange.end())
+                                                                     : currentLanguageRange);
+-
+     rangeDictionaryPairList = spellCheckManager->spellCheckWrtHighlightingRanges(m_view->doc(),
+                                                                                  languageSubRange,
+                                                                                  dictionary,
+@@ -264,6 +261,30 @@
+       }
+     }
+     else {
++      m_currentSpellCheckRange = rangeDictionaryPairList.first().first;
++      const QString& dictionary = rangeDictionaryPairList.first().second;
++
++      m_spellPosCursor = m_currentSpellCheckRange.start();
++      m_spellLastPos = 0;
++
++      m_currentDecToEncOffsetList.clear();
++      KateDocument::OffsetList encToDecOffsetList;
++      QString text = m_view->doc()->decodeCharacters(m_currentSpellCheckRange,
++                                                     m_currentDecToEncOffsetList,
++                                                     encToDecOffsetList);
++      // ensure that no empty string is passed on to Sonnet as this can lead to a crash
++      // (bug 228789)
++      if(text.isEmpty()) {
++        nextRangeBegin = m_currentSpellCheckRange.end();
++        continue;
++      }
 +
-+  m_bounding->setInternal();
++      if(m_speller->language() != dictionary) {
++        m_speller->setLanguage(dictionary);
++        m_backgroundChecker->setSpeller(*m_speller);
++      }
++
++      m_sonnetDialog->setBuffer(text);
+       break;
+     }
+   }
+@@ -272,25 +293,6 @@
+     spellCheckDone();
+     return;
+   }
+-
+-  const KTextEditor::Range& range = rangeDictionaryPairList.first().first;
+-  const QString& dictionary = rangeDictionaryPairList.first().second;
+-
+-  m_spellPosCursor = range.start();
+-  m_spellLastPos = 0;
+-
+-  if(m_speller->language() != dictionary) {
+-    m_speller->setLanguage(dictionary);
+-    m_backgroundChecker->setSpeller(*m_speller);
+-  }
+-
+-  KateDocument *kateDocument = m_view->doc();
+-  m_currentSpellCheckRange = range;
+-  m_currentDecToEncOffsetList.clear();
+-  KateDocument::OffsetList encToDecOffsetList;
+-  QString text = kateDocument->decodeCharacters(m_currentSpellCheckRange, m_currentDecToEncOffsetList,
+-                                                encToDecOffsetList);
+-  m_sonnetDialog->setBuffer(text);
  }
  
+ void KateSpellCheckDialog::cancelClicked()
+@@ -300,6 +302,8 @@
  
-Index: kate/utils/kateglobal.cpp
-===================================================================
---- kate/utils/kateglobal.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/kateglobal.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -157,9 +157,8 @@
-   m_viewConfig = new KateViewConfig ();
-   m_rendererConfig = new KateRendererConfig ();
--  // create script manager (search scripts) + register commands
-+  // create script manager (search scripts)
-   m_scriptManager = new KateScriptManager ();
--  KateCmd::self()->registerCommand (m_scriptManager);
+ void KateSpellCheckDialog::spellCheckDone()
+ {
++  m_currentSpellCheckRange = KTextEditor::Range::invalid();
++  m_currentDecToEncOffsetList.clear();
+   m_view->clearSelection();
+ }
  
-   //
-   // plugin manager
-Index: kate/utils/katecmd.cpp
+Index: kate/document/katedocument.cpp
 ===================================================================
---- kate/utils/katecmd.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/katecmd.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -48,6 +48,7 @@
+--- kate/document/katedocument.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kate/document/katedocument.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -397,9 +397,6 @@
+     return QString();
    }
  
-   m_cmds += l;
-+  m_cmdCompletion.insertItems(l);
+-  if ( blockwise && (range.start().column() > range.end().column()) )
+-    return QString ();
+-
+   QString s;
  
-   return true;
- }
-@@ -64,6 +65,7 @@
+   if (range.start().line() == range.end().line())
+@@ -771,9 +768,6 @@
+   if (!isReadWrite())
+     return false;
  
-   for ( QStringList::Iterator it1 = l.begin(); it1 != l.end(); ++it1 ) {
-     m_dict.remove(*it1);
-+    m_cmdCompletion.removeItem(*it1);
-     //kDebug(13050)<<"Removed command:"<<*it1;
+-  if ( block && (range.start().column() > range.end().column()) )
+-    return false;
+-
+   // Should now be impossible to trigger with the new Range class
+   Q_ASSERT( range.start().line() <= range.end().line() );
+@@ -818,8 +812,10 @@
+   else
+   {
+     int startLine = qMax(0, range.start().line());
+-    for (int line = qMin(range.end().line(), lastLine()); line >= startLine; --line)
+-      editRemoveText(line, range.start().column(), range.end().column() - range.start().column());
++    for (int line = qMin(range.end().line(), lastLine()); line >= startLine; --line) {
++      KTextEditor::Range subRange = rangeOnLine(range, line);
++      editRemoveText(line, subRange.start().column(), subRange.end().column() - subRange.start().column());
++    }
    }
  
-@@ -119,6 +121,11 @@
-     return QString();
-   return m_history[ index ];
- }
+   editEnd ();
+@@ -2945,6 +2941,8 @@
+   KTextEditor::Cursor pos = view->cursorPosition();
+   if (!view->config()->persistentSelection() && view->selection()) {
+     pos = view->selectionRange().start();
++    if (view->blockSelection())
++      pos = rangeOnLine(view->selectionRange(), pos.line()).start();
+     view->removeSelectedText();
+   }
+Index: CreateKDELibsDependenciesFile.cmake
+===================================================================
+--- CreateKDELibsDependenciesFile.cmake        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ CreateKDELibsDependenciesFile.cmake        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -19,7 +19,7 @@
+ # we need the absolute directories where stuff will be installed too
+ # but since the variables which contain the destinations can be relative
+-# or absolute paths, we need this macro to make them all absoulte, Alex
++# or absolute paths, we need this macro to make them all absolute, Alex
+ macro(MAKE_INSTALL_PATH_ABSOLUTE out in)
+    if (IS_ABSOLUTE "${in}")    # IS_ABSOLUTE is new since cmake 2.4.8
+       set(${out} "${in}")
+@@ -93,7 +93,7 @@
+ ")
+-# write the library dependencies
++# write library dependencies
+ if (WIN32)
+    file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake"
+@@ -101,9 +101,9 @@
+    set (QT_INSTALL_DIR \"${QT_INSTALL_DIR}\")
+ endif (NOT QT_INSTALL_DIR)
+ ")
+-   # replace hard codes paths by variables
++   # replace hard coded paths by variables
+    # !!! the following stuff does not work because export_library_dependencies
+-   # !!! does not wait until the file is written completly
++   # !!! does not wait until the file is written completely
+ #        export_library_dependencies(${CMAKE_BINARY_DIR}/tmpdeps.cmake)
+ #        file(READ ${CMAKE_BINARY_DIR}/tmpdeps.cmake _deps)
+ #        string(REPLACE "${QT_INSTALL_DIR}" "\${QT_INSTALL_DIR}" __deps "${_deps}")
+@@ -120,5 +120,6 @@
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake" "
+ set(KDE4_AUTH_BACKEND_NAME \"${KDE4_AUTH_BACKEND_NAME}\")
++set(KDE4_AUTH_HELPER_BACKEND_NAME \"${KDE4_AUTH_HELPER_BACKEND_NAME}\")
+ set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR \"${KDE4_AUTH_POLICY_FILES_INSTALL_DIR}\" CACHE STRING \"The location where policy files generated by KAuth will be installed, if the installed backend needs to\")
+ ")
+Index: kfile/kfilemodule.desktop
+===================================================================
+--- kfile/kfilemodule.desktop  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kfile/kfilemodule.desktop  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -25,6 +25,7 @@
+ Name[kk]=KFileModule
+ Name[km]=KFileModule
+ Name[ko]=KFileModule
++Name[lt]=KFileModule
+ Name[lv]=KFileModule
+ Name[ms]=KFileModule
+ Name[nb]=KFileModule
+@@ -74,6 +75,7 @@
+ Comment[kk]=Стандартты файл диалогын қамтамасыз ететін KDE файл модулі
+ Comment[km]=ម៉ូឌុល​ឯកសារ KDE លំនាំដើម​ផ្ដល់​នូវ​ប្រអប់​ឯកសារ​ស្តង់ដារ
+ Comment[ko]=표준 파일 대화상자를 제공하는 기본 KDE 파일 모듈
++Comment[lt]=Numatytasis KDE failų dialogo modulis
+ Comment[lv]=Noklusētais KDE failu modulis, kas nodrošina standarta failu dialogu
+ Comment[nb]=KDE standard filmodul som skaffer standard fildialog
+ Comment[nds]=Dat KDE-Standarddateimoduul, dat den Standard-Dateidialoog praatstellt
+Index: kfile/kdirsortfilterproxymodel.cpp
+===================================================================
+--- kfile/kdirsortfilterproxymodel.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kfile/kdirsortfilterproxymodel.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -22,20 +22,19 @@
+ #include "kdirsortfilterproxymodel.h"
++#include <kdatetime.h>
+ #include <kdirmodel.h>
+ #include <kfileitem.h>
+-#include <kdatetime.h>
+ #include <kglobalsettings.h>
+ #include <klocale.h>
+ #include <kstringhandler.h>
+-#include <Qt>
+ class KDirSortFilterProxyModel::KDirSortFilterProxyModelPrivate
+ {
+ public:
+     KDirSortFilterProxyModelPrivate(KDirSortFilterProxyModel* q);
+-    
 +
-+KCompletion* KateCmd::commandCompletionObject()
-+{
-+  return &m_cmdCompletion;
-+}
- //END KateCmd
- //BEGIN KateCmdShellCompletion
-Index: kate/utils/kateconfig.cpp
-===================================================================
---- kate/utils/kateconfig.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/kateconfig.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1392,6 +1392,7 @@
-   KColorScheme schemeView(QPalette::Active, KColorScheme::View);
-   KColorScheme schemeWindow(QPalette::Active, KColorScheme::Window);
-   KColorScheme schemeSelection(QPalette::Active, KColorScheme::Selection);
-+  KColorScheme schemeTooltip(QPalette::Active, KColorScheme::Tooltip);
-   QColor tmp0( schemeView.background().color() );
-   QColor tmp1( schemeSelection.background().color() );
-   QColor tmp2( schemeView.background(KColorScheme::AlternateBackground).color() );
-@@ -1446,11 +1447,18 @@
-   m_fontMetrics = QFontMetrics(m_font);
-   m_fontSet = true;
--  m_templateBackgroundColor=config.readEntry(QString("Color Template Background"),QColor(0xcc,0xcc,0xcc));
--  m_templateEditablePlaceholderColor = config.readEntry(QString("Color Template Editable Placeholder"),QColor(0xcc,0xff,0xcc));
--  m_templateFocusedEditablePlaceholderColor=config.readEntry(QString("Color Template Focused Editable Placeholder"),QColor(0x66,0xff,0x66));
--  m_templateNotEditablePlaceholderColor=config.readEntry(QString("Color Template Not Editable Placeholder"),QColor(0xff,0xcc,0xcc));
-+  m_templateBackgroundColor=config.readEntry(QString("Color Template Background"),
-+                                             schemeTooltip.background(KColorScheme::NormalBackground).color());
-+  m_templateEditablePlaceholderColor = config.readEntry(QString("Color Template Editable Placeholder"),
-+                                                        schemeTooltip.background(KColorScheme::NeutralBackground).color());
-+
-+  m_templateFocusedEditablePlaceholderColor=config.readEntry(QString("Color Template Focused Editable Placeholder"),
-+                                                             schemeTooltip.background(KColorScheme::PositiveBackground).color());
-+
-+  m_templateNotEditablePlaceholderColor=config.readEntry(QString("Color Template Not Editable Placeholder"),
-+                                                         schemeTooltip.background(KColorScheme::NegativeBackground).color());
-+
-   m_templateColorsSet=true;
- }
+     int compare(const QString&, const QString&, Qt::CaseSensitivity caseSensitivity  = Qt::CaseSensitive) const;
+     void slotNaturalSortingChanged();
  
-Index: kate/utils/katecmd.h
-===================================================================
---- kate/utils/katecmd.h       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/katecmd.h       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -45,10 +45,13 @@
-     const QString fromHistory( int i ) const;
-     uint historyLength() const { return m_history.count(); }
+@@ -154,7 +153,7 @@
  
-+    KCompletion* commandCompletionObject();
-+
-   private:
-     QHash<QString, KTextEditor::Command *> m_dict;
-     QStringList m_cmds;
-     QStringList m_history;
-+    KCompletion m_cmdCompletion; // shared completion object for all KateCmdLineEdits in each KTE::View
- };
+     switch (left.column()) {
+     case KDirModel::Name: {
+-        return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++        return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+     }
  
- /**
-Index: kate/utils/katetemplatehandler.cpp
-===================================================================
---- kate/utils/katetemplatehandler.cpp (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/katetemplatehandler.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -39,6 +39,12 @@
+     case KDirModel::Size: {
+@@ -171,7 +170,7 @@
+             // their names. So we have always everything ordered. We also check
+             // if we are taking in count their cases.
+             if (leftCount == rightCount) {
+-                return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++                return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+             }
  
- #define ifDebug(x) x
+             // If one of them has unknown child items, place them on the end. If we
+@@ -194,7 +193,7 @@
+         // If what we are measuring is two files and they have the same size,
+         // sort them by their file names.
+         if (leftFileItem.size() == rightFileItem.size()) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
  
-+/// just like Range::contains() but returns true when the cursor is at the end of the range
-+bool customContains(SmartRange* range, const Cursor& cursor)
-+{
-+  return range->start() <= cursor && range->end() >= cursor;
-+}
-+
- /* ####################################### */
+         // If their sizes are different, sort them by their sizes, as expected.
+@@ -206,7 +205,7 @@
+         KDateTime rightModifiedTime = rightFileItem.time(KFileItem::ModificationTime).toLocalZone();
  
- KateTemplateHandler::KateTemplateHandler( KateDocument *doc, const Cursor& position,
-@@ -49,6 +55,9 @@
- {
-   ifDebug(kDebug() << templateString << initialValues;)
+         if (leftModifiedTime == rightModifiedTime) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
  
-+  connect(m_doc, SIGNAL(aboutToReload(KTextEditor::Document*)),
-+          this, SLOT(cleanupAndExit()));
-+
-   connect(m_doc, SIGNAL(textInserted(KTextEditor::Document*, KTextEditor::Range)),
-           this, SLOT(slotTemplateInserted(KTextEditor::Document*, KTextEditor::Range)));
+         return leftModifiedTime < rightModifiedTime;
+@@ -221,7 +220,7 @@
+         int rightPermissionsPoints = pointsForPermissions(rightFileInfo);
  
-@@ -162,7 +171,8 @@
- void KateTemplateHandler::jumpToFinalCursorPosition()
- {
-   if ( m_doc->activeView() && (!m_wholeTemplateRange
--        || m_wholeTemplateRange->contains(m_doc->activeView()->cursorPosition())) ) {
-+        || customContains(m_wholeTemplateRange, m_doc->activeView()->cursorPosition())) )
-+  {
-     m_doc->activeView()->setSelection(Range::invalid());
-     m_doc->activeView()->setCursorPosition(*m_finalCursorPosition);
-   }
-@@ -295,12 +305,12 @@
- }
+         if (leftPermissionsPoints == rightPermissionsPoints) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
  
- /**
-- * Returns an attribute with \p color as background with 0x88 alpha value.
-+ * Returns an attribute with \p color as background with @p alpha alpha value.
-  */
--Attribute::Ptr getAttribute(QColor color)
-+Attribute::Ptr getAttribute(QColor color, int alpha = 230)
- {
-   Attribute::Ptr attribute(new Attribute());
--  color.setAlpha(0x88);
-+  color.setAlpha(alpha);
-   attribute->setBackground(QBrush(color));
-   return attribute;
- }
-@@ -433,12 +443,12 @@
+         return leftPermissionsPoints > rightPermissionsPoints;
+@@ -229,7 +228,7 @@
  
-   Attribute::Ptr editableAttribute = getAttribute(config->templateEditablePlaceholderColor());
-   editableAttribute->setDynamicAttribute(
--      Attribute::ActivateCaretIn, getAttribute(config->templateFocusedEditablePlaceholderColor())
-+      Attribute::ActivateCaretIn, getAttribute(config->templateFocusedEditablePlaceholderColor(), 255)
-   );
+     case KDirModel::Owner: {
+         if (leftFileItem.user() == rightFileItem.user()) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
  
-   Attribute::Ptr mirroredAttribute = getAttribute(config->templateNotEditablePlaceholderColor());
+         return d->compare(leftFileItem.user(), rightFileItem.user()) < 0;
+@@ -237,7 +236,7 @@
  
--  m_wholeTemplateRange->setAttribute(getAttribute(config->templateBackgroundColor()));
-+  m_wholeTemplateRange->setAttribute(getAttribute(config->templateBackgroundColor(), 200));
-   m_doc->addHighlightToDocument(m_wholeTemplateRange, true);
+     case KDirModel::Group: {
+         if (leftFileItem.group() == rightFileItem.group()) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
  
-   // create smart ranges for each found variable
-@@ -520,7 +530,7 @@
-   SmartRange* leftAdjacentRange = 0;
+         return d->compare(leftFileItem.group(), rightFileItem.group()) < 0;
+@@ -245,7 +244,7 @@
  
-   foreach ( SmartRange* parent, m_templateRanges ) {
--    if ( parent->start() <= range.start() && parent->end() >= range.start() )
-+    if ( customContains(parent, range.start()) )
-     {
-       if ( parent->childRanges().isEmpty() ) {
-         // simple, not-mirrored range got changed
-@@ -543,7 +553,7 @@
-         } else {
-           // find mirrored range that got edited
-           foreach ( SmartRange* child, parent->childRanges() ) {
--            if ( child->start() <= range.start() && child->end() >= range.start() ) {
-+            if ( customContains(child, range.start()) ) {
-               baseRange = child;
-               break;
-             }
-Index: kate/utils/katetemplatehandler.h
+     case KDirModel::Type: {
+         if (leftFileItem.mimetype() == rightFileItem.mimetype()) {
+-            return d->compare(leftFileItem.name(), rightFileItem.name(), sortCaseSensitivity()) < 0;
++            return d->compare(leftFileItem.text(), rightFileItem.text(), sortCaseSensitivity()) < 0;
+         }
+         return d->compare(leftFileItem.mimeComment(), rightFileItem.mimeComment()) < 0;
+Index: kross/qts/values_p.h
 ===================================================================
---- kate/utils/katetemplatehandler.h   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/katetemplatehandler.h   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -144,6 +144,13 @@
-     void syncMirroredRanges(KTextEditor::SmartRange* range);
+--- kross/qts/values_p.h       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kross/qts/values_p.h       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -237,6 +237,11 @@
+     QScriptValue createGridLayout(QScriptContext *context, QScriptEngine *engine) {
+         return createLayout(context, engine, new QGridLayout());
+     }
++    QScriptValue includeFunction(QScriptContext *context, QScriptEngine *engine) {
++        if (context->argumentCount() < 1)
++            return engine->nullValue();
++        return engine->importExtension(context->argument(0).toString());
++    }
  
      /**
-+     * Jumps to the final cursor position. This is either \p m_finalCursorPosition, or
-+     * if that is not set, the end of \p m_templateRange.
-+     */
-+    void jumpToFinalCursorPosition();
-+
-+  private Q_SLOTS:
-+    /**
-      * Cleans up the template handler and deletes it.
-      *
-      * We cannot always do that blindly in the dtor, as it would crash
-@@ -153,13 +160,6 @@
-     void cleanupAndExit();
+     * Initialize some core functionality like common used types we like
+@@ -267,6 +272,9 @@
  
-     /**
--     * Jumps to the final cursor position. This is either \p m_finalCursorPosition, or
--     * if that is not set, the end of \p m_templateRange.
--     */
--    void jumpToFinalCursorPosition();
--
--  private Q_SLOTS:
--    /**
-      * Saves the range of the inserted template. This is required since
-      * tabs could get expanded on insert. While we are at it, we can
-      * use it to auto-indent the code after insert.
-Index: kate/utils/katecmds.cpp
-===================================================================
---- kate/utils/katecmds.cpp    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/utils/katecmds.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -680,11 +680,19 @@
-   int replacementsDone = 0;
-   int linesTouched = 0;
-+  int linesAdded = 0;
-   if (r.isValid()) { // given range
--    for (int line = r.start().line(); line <= r.end().line(); line++) {
-+    for (int line = r.start().line(); line <= r.end().line()+linesAdded; line++) {
-       int temp = replacementsDone;
--      replacementsDone += sedMagic( doc, line, find, replace, d, !noCase, repeat );
-+      int r = sedMagic( doc, line, find, replace, d, !noCase, repeat );
-+      replacementsDone += r;
-+
-+      // if we replaced the text with n newlines, we have n new lines to look at
-+      if (replace.contains('\n') ) {
-+        linesAdded += r * replace.count('\n');
-+      }
+         // register the Kross::Object::Ptr wrapper
+         qScriptRegisterMetaType< Kross::Object::Ptr >(engine, toObjPtr,      fromObjPtr);
 +
-       if (replacementsDone > temp) {
-         linesTouched++;
-       }
-Index: kate/script/katecommandlinescript.cpp
++        // register the include function that allows to importExtension
++        global.setProperty("include", engine->newFunction(includeFunction));
+     }
+     /**
+Index: kioslave/http/http.cpp
 ===================================================================
---- kate/script/katecommandlinescript.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/script/katecommandlinescript.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -25,13 +25,21 @@
+--- kioslave/http/http.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kioslave/http/http.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -95,6 +95,12 @@
+ //authentication handlers
+ #include "httpauthentication.cpp"
  
- #include "katedocument.h"
- #include "kateview.h"
-+#include "katecmd.h"
-+#include "kshell.h"
++
++// see filenameFromUrl(): a sha1 hash is 160 bits
++static const int s_hashedUrlBits = 160;   // this number should always be divisible by eight
++static const int s_hashedUrlNibbles = s_hashedUrlBits / 4;
++static const int s_hashedUrlBytes = s_hashedUrlBits / 8;
++
+ using namespace KIO;
  
- KateCommandLineScript::KateCommandLineScript(const QString &url, const KateCommandLineScriptHeader &header)
-   : KateScript(url)
-   , m_header(header)
- {
-+  KateCmd::self()->registerCommand (this);
- }
+ extern "C" int KDE_EXPORT kdemain( int argc, char **argv )
+@@ -4386,7 +4392,7 @@
+     BinaryCacheFileHeader header;
+     quint32 commandCode;
+     // filename in ASCII, binary isn't worth the coding and decoding
+-    quint8 filename[40];
++    quint8 filename[s_hashedUrlNibbles];
+ };
  
-+KateCommandLineScript::~KateCommandLineScript()
-+{
-+  KateCmd::self()->unregisterCommand (this);
-+}
-+
- const KateCommandLineScriptHeader& KateCommandLineScript::header()
- {
-   return m_header;
-@@ -64,9 +72,44 @@
-   return true;
+ QByteArray HTTPProtocol::CacheTag::serialize() const
+@@ -4668,10 +4674,10 @@
+     // append the filename
+     QString fileName = cacheTag.file->fileName();
+     int basenameStart = fileName.lastIndexOf(QLatin1Char('/')) + 1;
+-    QByteArray baseName = fileName.mid(basenameStart, 40).toLatin1();
++    QByteArray baseName = fileName.mid(basenameStart, s_hashedUrlNibbles).toLatin1();
+     stream.writeRawData(baseName.constData(), baseName.size());
+-    Q_ASSERT(ret.size() == BinaryCacheFileHeader::size + sizeof(quint32) + 40);
++    Q_ASSERT(ret.size() == BinaryCacheFileHeader::size + sizeof(quint32) + s_hashedUrlNibbles);
+     return ret;
  }
  
-+const QStringList &KateCommandLineScript::cmds ()
+@@ -4702,7 +4708,7 @@
+             QString newName = oldName;
+             int basenameStart = newName.lastIndexOf(QLatin1Char('/')) + 1;
+             // remove the randomized name part added by QTemporaryFile
+-            newName.chop(newName.length() - basenameStart - 40);
++            newName.chop(newName.length() - basenameStart - s_hashedUrlNibbles);
+             kDebug(7113) << "Renaming temporary file" << oldName << "to" << newName;
+             // on windows open files can't be renamed
+@@ -4736,7 +4742,7 @@
+ void HTTPProtocol::sendCacheCleanerCommand(const QByteArray &command)
+ {
+     kDebug(7113);
+-    Q_ASSERT(command.size() == BinaryCacheFileHeader::size + 40 + sizeof(quint32));
++    Q_ASSERT(command.size() == BinaryCacheFileHeader::size + s_hashedUrlNibbles + sizeof(quint32));
+     int attempts = 0;
+     while (m_cacheCleanerConnection.state() != QLocalSocket::ConnectedState && attempts < 6) {
+         if (attempts == 2) {
+Index: kioslave/http/http_cache_cleaner.cpp
+===================================================================
+--- kioslave/http/http_cache_cleaner.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kioslave/http/http_cache_cleaner.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -25,6 +25,7 @@
+ //
+ // KDE HTTP Cache cleanup tool
++#include <cstring>
+ #include <time.h>
+ #include <stdlib.h>
+ #include <zlib.h>
+@@ -57,9 +58,14 @@
+ // !START OF SYNC!
+ // Keep the following in sync with the cache code in http.cpp
++static const int s_hashedUrlBits = 160;   // this number should always be divisible by eight
++static const int s_hashedUrlNibbles = s_hashedUrlBits / 4;
++static const int s_hashedUrlBytes = s_hashedUrlBits / 8;
++
+ static const char *version = "A\n";
+-struct CacheFileInfo {
++// never instantiated, on-disk / wire format only
++struct SerializedCacheFileInfo {
+ // from http.cpp
+     quint8 version[2];
+     quint8 compression; // for now fixed to 0
+@@ -76,15 +82,68 @@
+     QString etag;
+     QString mimeType;
+     QStringList responseHeaders; // including status response like "HTTP 200 OK"
+-// end of from http.cpp
++};
++
++static QString dateString(qint64 date)
 +{
-+  return m_header.functions();
++    KDateTime dt;
++    dt.setTime_t(date);
++    return dt.toString(KDateTime::ISODate);
 +}
 +
-+bool KateCommandLineScript::exec (KTextEditor::View *view, const QString &_cmd, QString &errorMsg)
-+{
-+  KShell::Errors errorCode;
-+  QStringList args(KShell::splitArgs(_cmd, KShell::NoOptions, &errorCode));
-+
-+  if (errorCode != KShell::NoError) {
-+    errorMsg = i18n("Bad quoting in call: %1. Please escape single quotes with a backslash.", _cmd);
-+    return false;
-+  }
++struct MiniCacheFileInfo {
++// data from cache entry file, or from scoreboard file
++    qint32 useCount;
++// from filesystem
+     qint64 lastUsedDate;
+-    QString baseName;
+     qint32 sizeOnDisk;
+     // we want to delete the least "useful" files and we'll have to sort a list for that...
+-    bool operator<(const CacheFileInfo &other) const;
++    bool operator<(const MiniCacheFileInfo &other) const;
++    void debugPrint() const
++    {
++        kDebug(7113) << "useCount:" << useCount
++                     << "\nlastUsedDate:" << lastUsedDate
++                     << "\nsizeOnDisk:" << sizeOnDisk << '\n';
++    }
+ };
+-bool CacheFileInfo::operator<(const CacheFileInfo &other) const
++struct CacheFileInfo : MiniCacheFileInfo {
++    quint8 version[2];
++    quint8 compression; // for now fixed to 0
++    quint8 reserved;    // for now; also alignment
 +
-+  QString cmd(args.first());
-+  args.removeFirst();
 +
-+  if (!view) {
-+    errorMsg = i18n("Could not access view");
-+    return false;
-+  }
++    qint64 servedDate;
++    qint64 lastModifiedDate;
++    qint64 expireDate;
++    qint32 bytesCached;
 +
-+  if (setView(qobject_cast<KateView*>(view))) {
-+    // setView fails, if the script cannot be loaded
-+    return callFunction(cmd, args, errorMsg);
-+  }
++    QString baseName;
++    QString url;
++    QString etag;
++    QString mimeType;
++    QStringList responseHeaders; // including status response like "HTTP 200 OK"
 +
-+  return false;
-+}
++    void prettyPrint() const
++    {
++        QTextStream out(stdout, QIODevice::WriteOnly);
++        out << "File " << baseName << " version " << version[0] << version[1];
++        out << "\n cached bytes     " << bytesCached << " useCount " << useCount;
++        out << "\n servedDate       " << dateString(servedDate);
++        out << "\n lastModifiedDate " << dateString(lastModifiedDate);
++        out << "\n expireDate       " << dateString(expireDate);
++        out << "\n entity tag       " << etag;
++        out << "\n encoded URL      " << url;
++        out << "\n mimetype         " << mimeType;
++        out << "\nResponse headers follow...\n";
++        foreach (const QString &h, responseHeaders) {
++            out << h << '\n';
++        }
++    }
++};
 +
 +
- bool KateCommandLineScript::help(KTextEditor::View* view, const QString& cmd, QString &msg)
++bool MiniCacheFileInfo::operator<(const MiniCacheFileInfo &other) const
  {
--  setView(qobject_cast<KateView*>(view));
-+  if (!setView(qobject_cast<KateView*>(view))) {
-+    // setView fails, if the script cannot be loaded
-+    return false;
-+  }
-   clearExceptions();
-   QScriptValue helpFunction = function("help");
-Index: kate/script/katescriptmanager.cpp
-===================================================================
---- kate/script/katescriptmanager.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/script/katescriptmanager.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -35,15 +35,19 @@
- #include <kde_file.h>
- #include "kateglobal.h"
-+#include "katecmd.h"
+     const int thisUseful = useCount / qMax(g_currentDate - lastUsedDate, qint64(1));
+     const int otherUseful = other.useCount / qMax(g_currentDate - other.lastUsedDate, qint64(1));
+@@ -102,30 +161,6 @@
+     FileInfo
+ };
  
- KateScriptManager::KateScriptManager() : QObject(), KTextEditor::Command()
+-QString dateString(qint64 date)
+-{
+-    KDateTime dt;
+-    dt.setTime_t(date);
+-    return dt.toString(KDateTime::ISODate);
+-}
+-
+-void printInfo(const CacheFileInfo &fi)
+-{
+-    QTextStream out(stdout, QIODevice::WriteOnly);
+-    out << "File " << fi.baseName << " version " << fi.version[0] << fi.version[1];
+-    out << "\n cached bytes     " << fi.bytesCached << " useCount " << fi.useCount;
+-    out << "\n servedDate       " << dateString(fi.servedDate);
+-    out << "\n lastModifiedDate " << dateString(fi.lastModifiedDate);
+-    out << "\n expireDate       " << dateString(fi.expireDate);
+-    out << "\n entity tag       " << fi.etag;
+-    out << "\n encoded URL      " << fi.url;
+-    out << "\n mimetype         " << fi.mimeType;
+-    out << "\nResponse headers follow...\n";
+-    foreach (const QString &h, fi.responseHeaders) {
+-        out << h << '\n';
+-    }
+-}
+-
+ static bool timeSizeFits(qint64 intTime)
  {
-+  KateCmd::self()->registerCommand (this);
-+
-   // false = force (ignore cache)
-   collect("katepartscriptrc", "katepart/script/*.js", false);
+     time_t tTime = static_cast<time_t>(intTime);
+@@ -133,9 +168,9 @@
+     return check == intTime;
  }
  
- KateScriptManager::~KateScriptManager()
+-bool readBinaryHeader(const QByteArray &d, CacheFileInfo *fi)
++static bool readBinaryHeader(const QByteArray &d, CacheFileInfo *fi)
  {
-+  KateCmd::self()->unregisterCommand (this);
-   qDeleteAll(m_indentationScripts);
-   qDeleteAll(m_commandLineScripts);
+-    if (d.size() < CacheFileInfo::size) {
++    if (d.size() < SerializedCacheFileInfo::size) {
+         kDebug(7113) << "readBinaryHeader(): file too small?";
+         return false;
+     }
+@@ -163,18 +198,6 @@
+     return timeSizeOk;
  }
-@@ -95,7 +99,6 @@
-   m_languageToIndenters.clear();
-   m_indentationScriptMap.clear();
--  m_commandLineScriptMap.clear();
  
-   // iterate through the files and read info out of cache or file
-   for(QStringList::ConstIterator fileit = list.begin(); fileit != list.end(); ++fileit) {
-@@ -210,11 +213,7 @@
-                         << qPrintable(*fileit) << '\n' << "-> skipping script" << '\n';
-           continue;
-         }
--        KateCommandLineScript* script = new KateCommandLineScript(*fileit, header);
--        foreach (const QString function, header.functions()) {
--          m_commandLineScriptMap.insert(function, script);
--        }
--        m_commandLineScripts.push_back(script);
-+        m_commandLineScripts.push_back(new KateCommandLineScript(*fileit, header));
-         break;
-       }
-       case Kate::UnknownScript:
-@@ -311,33 +310,21 @@
-   if (cmd == "reload-scripts") {
-     reload();
-     return true;
--  } else if (!m_commandLineScriptMap.contains(cmd)) {
-+  } else {
-     errorMsg = i18n("Command not found: %1", cmd);
-     return false;
-   }
--  KateCommandLineScript *script = m_commandLineScriptMap[cmd];
--  script->setView(qobject_cast<KateView*>(view));
+-static bool readLineChecked(QIODevice *dev, QByteArray *line)
+-{
+-    *line = dev->readLine(8192);
+-    // if nothing read or the line didn't fit into 8192 bytes(!)
+-    if (line->isEmpty() || !line->endsWith('\n')) {
+-        return false;
+-    }
+-    // we don't actually want the newline!
+-    line->chop(1);
+-    return true;
+-}
 -
--  return script->callFunction(cmd, args, errorMsg);
- }
- bool KateScriptManager::help(KTextEditor::View *view, const QString &cmd, QString &msg)
+ static QString filenameFromUrl(const QByteArray &url)
  {
--//   if (cmd == "run-buffer") {
--//     msg = i18n("This executes the current document or selection as JavaScript within Kate.");
--//     return true;
--//   }
--
-   if (cmd == "reload-scripts") {
-     msg = i18n("Reload all JavaScript files (indenters, command line scripts, etc).");
-     return true;
--  } else if (!m_commandLineScriptMap.contains(cmd)) {
-+  } else {
-     msg = i18n("Command not found: %1", cmd);
-     return false;
-   }
--
--  KateCommandLineScript *script = m_commandLineScriptMap[cmd];
--  return script->help(view, cmd, msg);
- }
- const QStringList &KateScriptManager::cmds()
-@@ -345,14 +332,8 @@
-   static QStringList l;
-   l.clear();
--//   l << "run-buffer"; // not implemented right now
-   l << "reload-scripts";
--  QVector<KateCommandLineScript*>::ConstIterator it = m_commandLineScripts.constBegin();
--  for ( ; it != m_commandLineScripts.constEnd(); ++it) {
--    l << (*it)->header().functions();
--  }
--
-   return l;
+     QCryptographicHash hash(QCryptographicHash::Sha1);
+@@ -191,8 +214,20 @@
+     return cacheDirName + baseName;
  }
  
-Index: kate/script/katecommandlinescript.h
-===================================================================
---- kate/script/katecommandlinescript.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/script/katecommandlinescript.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -23,6 +23,7 @@
- #include "kateview.h"
- #include <QtCore/QPair>
-+#include <ktexteditor/commandinterface.h>
- class KateScriptDocument;
-@@ -51,16 +52,24 @@
-  * A specialized class for scripts that are of type
-  * KateScriptInformation::IndentationScript
-  */
--class KateCommandLineScript : public KateScript
-+class KateCommandLineScript : public KateScript, public KTextEditor::Command
+-bool readTextHeader(QFile *file, CacheFileInfo *fi, OperationMode mode)
++static bool readLineChecked(QIODevice *dev, QByteArray *line)
  {
-   public:
-     KateCommandLineScript(const QString &url, const KateCommandLineScriptHeader &header);
-+    virtual ~KateCommandLineScript();
-     const KateCommandLineScriptHeader& header();
-     bool callFunction(const QString& cmd, const QStringList args, QString &errorMessage);
--    bool help(KTextEditor::View* view, const QString& cmd, QString &msg);
-+  //
-+  // KTextEditor::Command interface
-+  //
-+  public:
-+    virtual const QStringList &cmds ();
-+    virtual bool exec (KTextEditor::View *view, const QString &cmd, QString &msg);
-+    virtual bool help (KTextEditor::View *view, const QString &cmd, QString &msg);
++    *line = dev->readLine(8192);
++    // if nothing read or the line didn't fit into 8192 bytes(!)
++    if (line->isEmpty() || !line->endsWith('\n')) {
++        return false;
++    }
++    // we don't actually want the newline!
++    line->chop(1);
++    return true;
++}
 +
-   private:
-     KateCommandLineScriptHeader m_header;
- };
-Index: kate/script/katescriptmanager.h
-===================================================================
---- kate/script/katescriptmanager.h    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/script/katescriptmanager.h    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -132,9 +132,6 @@
++static bool readTextHeader(QFile *file, CacheFileInfo *fi, OperationMode mode)
++{
+     bool ok = true;
+     QByteArray readBuf;
  
-     /** Map of language to indent scripts */
-     QHash<QString, QVector<KateIndentScript*> > m_languageToIndenters;
--
--    /** Command line map to scripts */
--    QHash<QString, KateCommandLineScript*> m_commandLineScriptMap;
+@@ -233,7 +268,7 @@
+     UpdateFileCommand
  };
  
-Index: kate/view/kateview.cpp
-===================================================================
---- kate/view/kateview.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/view/kateview.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -264,8 +264,7 @@
-       m_topViewBar=0;
+-bool readCacheFile(const QString &baseName, CacheFileInfo *fi, OperationMode mode)
++static bool readCacheFile(const QString &baseName, CacheFileInfo *fi, OperationMode mode)
+ {
+     QFile file(filePath(baseName));
+     file.open(QIODevice::ReadOnly);
+@@ -242,7 +277,7 @@
      }
+     fi->baseName = baseName;
+-    QByteArray header = file.read(CacheFileInfo::size);
++    QByteArray header = file.read(SerializedCacheFileInfo::size);
+     // do *not* modify/delete the file if we're in file info mode.
+     if (!(readBinaryHeader(header, fi) && readTextHeader(&file, fi, mode)) && mode != FileInfo) {
+         kDebug(7113) << "read(Text|Binary)Header() returned false, deleting file" << baseName;
+@@ -256,18 +291,103 @@
+     return true;
+ }
  
--  if (!m_doc->singleViewMode())
--    KatePartPluginManager::self()->removeView(this);
-+  KatePartPluginManager::self()->removeView(this);
-   m_doc->removeView( this );
+-CacheCleanerCommand readCommand(const QByteArray &cmd, CacheFileInfo *fi)
++class Scoreboard;
++
++class CacheIndex
+ {
++public:
++    explicit CacheIndex(const QString &baseName)
++    {
++        QByteArray ba = baseName.toLatin1();
++        const int sz = ba.size();
++        const char *input = ba.constData();
++        Q_ASSERT(sz == s_hashedUrlNibbles);
++
++        int translated = 0;
++        for (int i = 0; i < sz; i++) {
++            int c = input[i];
++
++            if (c >= '0' && c <= '9') {
++                translated |= c - '0';
++            } else if (c >= 'a' && c <= 'f') {
++                translated |= c - 'a' + 10;
++            } else {
++                Q_ASSERT(false);
++            }
++
++            if (i & 1) {
++                // odd index
++                m_index[i >> 1] = translated;
++                translated = 0;
++            } else  {
++                translated = translated << 4;
++            }
++        }
++
++        computeHash();
++    }
++
++    bool operator==(const CacheIndex &other) const
++    {
++        const bool isEqual = memcmp(m_index, other.m_index, s_hashedUrlBytes) == 0;
++        if (isEqual) {
++            Q_ASSERT(m_hash == other.m_hash);
++        }
++        return isEqual;
++    }
++
++private:
++    explicit CacheIndex(const QByteArray &index)
++    {
++        Q_ASSERT(index.length() >= s_hashedUrlBytes);
++        memcpy(m_index, index.constData(), s_hashedUrlBytes);
++        computeHash();
++    }
++
++    void computeHash()
++    {
++        uint hash = 0;
++        const int ints = s_hashedUrlBytes / sizeof(uint);
++        for (int i = 0; i < ints; i++) {
++            hash ^= reinterpret_cast<uint *>(&m_index[0])[i];
++        }
++        if (const int bytesLeft = s_hashedUrlBytes % sizeof(uint)) {
++            // dead code until a new url hash algorithm or architecture with sizeof(uint) != 4 appears.
++            // we have the luxury of ignoring endianness because the hash is never written to disk.
++            // just merge the bits into the the hash in some way.
++            const int offset = ints * sizeof(uint);
++            for (int i = 0; i < bytesLeft; i++) {
++                hash ^= static_cast<uint>(m_index[offset + i]) << (i * 8);
++            }
++        }
++        m_hash = hash;
++    }
++
++    friend uint qHash(const CacheIndex &);
++    friend class Scoreboard;
++
++    quint8 m_index[s_hashedUrlBytes]; // packed binary version of the hexadecimal name
++    uint m_hash;
++};
++
++uint qHash(const CacheIndex &ci)
++{
++    return ci.m_hash;
++}
++
++
++static CacheCleanerCommand readCommand(const QByteArray &cmd, CacheFileInfo *fi)
++{
+     readBinaryHeader(cmd, fi);
+     QDataStream stream(cmd);
+-    stream.skipRawData(CacheFileInfo::size);
++    stream.skipRawData(SerializedCacheFileInfo::size);
+     quint32 ret;
+     stream >> ret;
+     QByteArray baseName;
+-    baseName.resize(40);
+-    stream.readRawData(baseName.data(), 40);
++    baseName.resize(s_hashedUrlNibbles);
++    stream.readRawData(baseName.data(), s_hashedUrlNibbles);
+     Q_ASSERT(stream.atEnd());
+     fi->baseName = QString::fromLatin1(baseName);
+@@ -275,51 +395,208 @@
+     return static_cast<CacheCleanerCommand>(ret);
+ }
  
-Index: kate/view/kateviewhelpers.cpp
-===================================================================
---- kate/view/kateviewhelpers.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/view/kateviewhelpers.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -318,12 +318,11 @@
-   , m_histpos( 0 )
-   , m_cmdend( 0 )
-   , m_command( 0L )
--  , m_oldCompletionObject( 0L )
+-// execute the command; return true if a new file was created, false otherwise.
+-bool dispatchCommand(const QByteArray &cmd, CacheFileInfo *fi)
++
++// never istantiated, on-disk format only
++struct ScoreboardEntry {
++// from scoreboard file
++    quint8 index[s_hashedUrlBytes];
++    static const int indexSize = s_hashedUrlBytes;
++    qint32 useCount;
++// from scoreboard file, but compared with filesystem to see if scoreboard has current data
++    qint64 lastUsedDate;
++    qint32 sizeOnDisk;
++    static const int size = 36;
++    // we want to delete the least "useful" files and we'll have to sort a list for that...
++    bool operator<(const MiniCacheFileInfo &other) const;
++};
++
++
++class Scoreboard
  {
-   connect (this, SIGNAL(returnPressed(const QString &)),
-            this, SLOT(slotReturnPressed(const QString &)));
--  completionObject()->insertItems (KateCmd::self()->commandList());
-+  setCompletionObject(KateCmd::self()->commandCompletionObject());
-   setAutoDeleteCompletionObject( false );
-   m_cmdRange.setPattern("^([0-9$]+|\\.([+-]\\d+)?)?,([0-9$]+|\\.([+-]\\d+)?)?");
-   m_cmdExpr.setPattern("^(\\d+)([+-])(\\d+)$");
-@@ -528,13 +527,11 @@
-   }
+-    Q_ASSERT(cmd.size() == 80);
+-    CacheCleanerCommand ccc = readCommand(cmd, fi);
+-    QString fileName = filePath(fi->baseName);
+-    switch (ccc) {
+-    case CreateFileNotificationCommand:
+-        // NOTE: for now we're not keeping cache stats / a list of cache files in memory, so
+-        //       this command does little. When we do a complete scan of the directory we will
+-        //       find any new files anyway.
+-        kDebug(7113) << "CreateNotificationCommand for" << fi->baseName;
+-        return true;
+-    case UpdateFileCommand: {
+-        kDebug(7113) << "UpdateFileCommand for" << fi->baseName;
+-        QFile file(fileName);
+-        file.open(QIODevice::ReadWrite);
++public:
++    Scoreboard()
++    {
++        // read in the scoreboard...
++        QFile sboard(filePath(QLatin1String("scoreboard")));
++        sboard.open(QIODevice::ReadOnly);
++        while (true) {
++            QByteArray baIndex = sboard.read(ScoreboardEntry::indexSize);
++            QByteArray baRest = sboard.read(ScoreboardEntry::size - ScoreboardEntry::indexSize);
++            if (baIndex.size() + baRest.size() != ScoreboardEntry::size) {
++                break;
++            }
  
-   // clean up
--  if ( m_oldCompletionObject )
-+  if (completionObject() != KateCmd::self()->commandCompletionObject())
-   {
-     KCompletion *c = completionObject();
--    setCompletionObject( m_oldCompletionObject );
--    m_oldCompletionObject = 0;
-+    setCompletionObject(KateCmd::self()->commandCompletionObject());
-     delete c;
--    c = 0;
-   }
-   m_command = 0;
-   m_cmdend = 0;
-@@ -635,13 +632,11 @@
-       else
-       {
-         // clean up if needed
--        if ( m_oldCompletionObject )
-+        if (completionObject() != KateCmd::self()->commandCompletionObject())
-         {
-           KCompletion *c = completionObject();
--          setCompletionObject( m_oldCompletionObject );
--          m_oldCompletionObject = 0;
-+          setCompletionObject(KateCmd::self()->commandCompletionObject());
-           delete c;
--          c = 0;
+-        CacheFileInfo fiFromDisk;
+-        QByteArray header = file.read(CacheFileInfo::size);
+-        if (!readBinaryHeader(header, &fiFromDisk) || fiFromDisk.bytesCached != fi->bytesCached) {
++            const QString entryBasename = QString::fromLatin1(baIndex.toHex());
++            MiniCacheFileInfo mcfi;
++            if (readAndValidateMcfi(baRest, entryBasename, &mcfi)) {
++                m_scoreboard.insert(CacheIndex(baIndex), mcfi);
++            }
++        }
++    }
++
++    void writeOut()
++    {
++        // write out the scoreboard
++        QFile sboard(filePath(QLatin1String("scoreboard")));
++        sboard.open(QIODevice::WriteOnly | QIODevice::Truncate);
++        QDataStream stream(&sboard);
++
++        QHash<CacheIndex, MiniCacheFileInfo>::ConstIterator it = m_scoreboard.constBegin();
++        for (; it != m_scoreboard.constEnd(); ++it) {
++            const char *indexData = reinterpret_cast<const char *>(it.key().m_index);
++            stream.writeRawData(indexData, s_hashedUrlBytes);
++
++            stream << it.value().useCount;
++            stream << it.value().lastUsedDate;
++            stream << it.value().sizeOnDisk;
++        }
++    }
++
++    bool fillInfo(const QString &baseName, MiniCacheFileInfo *mcfi)
++    {
++        QHash<CacheIndex, MiniCacheFileInfo>::ConstIterator it =
++                                       m_scoreboard.constFind(CacheIndex(baseName));
++        if (it == m_scoreboard.constEnd()) {
+             return false;
          }
++        *mcfi = it.value();
++        return true;
++    }
  
-         m_cmdend = 0;
-@@ -658,12 +653,9 @@
-         KCompletion *cmpl = ce->completionObject( m_view, text().left( m_cmdend ).trimmed() );
-         if ( cmpl )
-         {
--        // save the old completion object and use what the command provides
--        // instead. We also need to prepend the current command name + flag string
-+        // We need to prepend the current command name + flag string
-         // when completion is done
-           //kDebug(13025)<<"keypress in commandline: Setting completion object!";
--          if ( ! m_oldCompletionObject )
--            m_oldCompletionObject = completionObject();
-           setCompletionObject( cmpl );
-         }
-Index: kate/view/kateviewhelpers.h
-===================================================================
---- kate/view/kateviewhelpers.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/view/kateviewhelpers.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -416,7 +416,6 @@
-     uint m_histpos; ///< position in the history
-     uint m_cmdend; ///< the point where a command ends in the text, if we have a valid one.
-     KTextEditor::Command *m_command; ///< For completing flags/args and interactiveness
--    class KCompletion *m_oldCompletionObject; ///< save while completing command args.
-     class KateCmdLnWhatsThis *m_help;
-     QRegExp m_cmdRange;
-     QRegExp m_cmdExpr;
-Index: kate/spellcheck/spellingmenu.cpp
-===================================================================
---- kate/spellcheck/spellingmenu.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/spellcheck/spellingmenu.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (C) 2009 by Michel Ludwig (michel.ludwig@kdemail.net)
-+ * Copyright (C) 2009-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
-  *
-  *  This library is free software; you can redistribute it and/or
-  *  modify it under the terms of the GNU Library General Public
-@@ -37,7 +37,10 @@
-     m_ignoreWordAction(NULL),
-     m_addToDictionaryAction(NULL),
-     m_spellingMenu(NULL),
--    m_currentMisspelledRange(NULL),
-+    m_currentMisspelledRange(NULL), // we have to use 'm_currentMisspelledRange'
-+                                    // as QSignalMapper doesn't work with pairs of objects;
-+                                    // it just points to the object pointed to by either
-+                                    // 'm_currentMouseMisspelledRange' or 'm_currentCaretMisspelledRange'
-     m_currentMouseMisspelledRange(NULL),
-     m_currentCaretMisspelledRange(NULL),
-     m_useMouseForMisspelledRange(false),
-@@ -49,10 +52,10 @@
- KateSpellingMenu::~KateSpellingMenu()
- {
--  if(m_currentMisspelledRange) {
--    m_currentMisspelledRange->removeWatcher(this);
--    m_currentMisspelledRange = NULL;
--  }
-+  m_currentMisspelledRange = NULL; // it shouldn't be accessed anymore as it could
-+                                   // point to a non-existing object (bug 226724)
-+                                   // (for example, when it pointed to m_currentCaretMisspelledRange
-+                                   // and that range got deleted after the caret had left)
-   if(m_currentCaretMisspelledRange) {
-     m_currentCaretMisspelledRange->removeWatcher(this);
-     m_currentCaretMisspelledRange = NULL;
-Index: kate/spellcheck/ontheflycheck.cpp
-===================================================================
---- kate/spellcheck/ontheflycheck.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/spellcheck/ontheflycheck.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1,5 +1,5 @@
- /* 
-- * Copyright (C) 2008-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
-+ * Copyright (C) 2008-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
-  * Copyright (C) 2009 by Joseph Wenninger (jowenn@kde.org)
-  *
-  *  This library is free software; you can redistribute it and/or
-@@ -166,7 +166,7 @@
-   QMutexLocker smartLock(smartInterface->smartMutex());
-   // don't consider a range that is not within the document range
-   const KTextEditor::Range documentIntersection = document->documentRange().intersect(range);
--  if(documentIntersection.isEmpty()) {
-+  if(!documentIntersection.isValid()) {
-     return;
-   }
-   const QList<KTextEditor::View*>& viewList = m_document->views();
-@@ -174,7 +174,7 @@
-   for(QList<KTextEditor::View*>::const_iterator i = viewList.begin(); i != viewList.end(); ++i) {
-     KateView *view = static_cast<KateView*>(*i);
-     KTextEditor::Range visibleIntersection = documentIntersection.intersect(view->visibleRange());
--    if(visibleIntersection.isValid() && !visibleIntersection.isEmpty()) {
-+    if(visibleIntersection.isValid()) {  // allow empty intersections
-       // we don't handle this directly as the highlighting information might not be up-to-date yet
-       KTextEditor::SmartRange *smartRange = smartInterface->newSmartRange(visibleIntersection);
-       smartRange->addWatcher(this);
-@@ -273,8 +273,8 @@
-   }
-   // don't consider a range that is behind the end of the document
-   const KTextEditor::Range documentIntersection = document->documentRange().intersect(range);
--  if(documentIntersection.isEmpty()) {
--    return;
-+  if(!documentIntersection.isValid()) { // the intersection might however be empty if the last
-+    return;                             // word has been removed, for example
-   }
-   QMutexLocker smartLock(smartInterface->smartMutex());
-@@ -283,7 +283,7 @@
-   for(QList<KTextEditor::View*>::const_iterator i = viewList.begin(); i != viewList.end(); ++i) {
-     KateView *view = static_cast<KateView*>(*i);
-     KTextEditor::Range visibleIntersection = documentIntersection.intersect(view->visibleRange());
--    if(visibleIntersection.isValid() && !visibleIntersection.isEmpty()) {
-+    if(visibleIntersection.isValid()) { // see above
-       // we don't handle this directly as the highlighting information might not be up-to-date yet
-       KTextEditor::SmartRange *smartRange = smartInterface->newSmartRange(visibleIntersection);
-       smartRange->addWatcher(this);
-@@ -443,6 +443,10 @@
-                                               m_currentDecToEncOffsetList,
-                                               encToDecOffsetList);
-   ON_THE_FLY_DEBUG << "next spell checking" << text;
-+  if(text.isEmpty()) { // passing an empty string to Sonnet can lead to a bad allocation exception
-+    spellCheckDone();  // (bug 225867)
-+    return;
-+  }
-   if(m_speller.language() != language) {
-     m_speller.setLanguage(language);
-   }
-Index: kate/spellcheck/spellcheck.cpp
-===================================================================
---- kate/spellcheck/spellcheck.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/spellcheck/spellcheck.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1,5 +1,5 @@
- /* 
-- * Copyright (C) 2008-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
-+ * Copyright (C) 2008-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
-  *
-  *  This library is free software; you can redistribute it and/or
-  *  modify it under the terms of the GNU Library General Public
-@@ -174,7 +174,7 @@
-       const int start = (line == startLine) ? startColumn : 0;
-       const int end = (line == endLine) ? endColumn : kateTextLine->length();
-       const KTextEditor::Cursor startCursor();
--      for(int i = start; i < end; ++i) {
-+      for(int i = start; i < end;) { // WARNING: 'i' has to be incremented manually!
-         int attr = kateTextLine->attribute(i);
-         const KatePrefixStore& prefixStore = highlighting->getCharacterEncodingsPrefixStore(attr);
-         QString prefixFound = prefixStore.findPrefix(kateTextLine, i);
-@@ -182,6 +182,7 @@
-         if(!document->highlight()->attributeRequiresSpellchecking(attribute)
-            && prefixFound.isEmpty()) {
-           if(i == start) {
-+            ++i;
-             continue;
-           }
-           else if(inSpellCheckArea) {
-@@ -205,6 +206,9 @@
-         if(!prefixFound.isEmpty()) {
-           i += prefixFound.length();
+-        // update the whole header according to the ioslave, except for the use count, to make sure
+-        // that we actually count up.
+-        quint32 newUseCount = fiFromDisk.useCount + 1;
+-        QByteArray newHeader = cmd.mid(0, CacheFileInfo::size);
+-        {
+-            QDataStream stream(&newHeader, QIODevice::WriteOnly);
+-            stream.skipRawData(CacheFileInfo::useCountOffset);
+-            stream << newUseCount;
++    int runCommand(const QByteArray &cmd)
++    {
++        // execute the command; return number of bytes if a new file was created, zero otherwise.
++        Q_ASSERT(cmd.size() == 80);
++        CacheFileInfo fi;
++        const CacheCleanerCommand ccc = readCommand(cmd, &fi);
++        QString fileName = filePath(fi.baseName);
++
++        switch (ccc) {
++        case CreateFileNotificationCommand:
++            kDebug(7113) << "CreateNotificationCommand for" << fi.baseName;
++            if (!readBinaryHeader(cmd, &fi)) {
++                return 0;
++            }
++            break;
++
++        case UpdateFileCommand: {
++            kDebug(7113) << "UpdateFileCommand for" << fi.baseName;
++            QFile file(fileName);
++            file.open(QIODevice::ReadWrite);
++
++            CacheFileInfo fiFromDisk;
++            QByteArray header = file.read(SerializedCacheFileInfo::size);
++            if (!readBinaryHeader(header, &fiFromDisk) || fiFromDisk.bytesCached != fi.bytesCached) {
++                return 0;
++            }
++
++            // adjust the use count, to make sure that we actually count up. (slaves read the file
++            // asynchronously...)
++            const quint32 newUseCount = fiFromDisk.useCount + 1;
++            QByteArray newHeader = cmd.mid(0, SerializedCacheFileInfo::size);
++            {
++                QDataStream stream(&newHeader, QIODevice::WriteOnly);
++                stream.skipRawData(SerializedCacheFileInfo::useCountOffset);
++                stream << newUseCount;
++            }
++
++            file.seek(0);
++            file.write(newHeader);
++            file.close();
++
++            if (!readBinaryHeader(newHeader, &fi)) {
++                return 0;
++            }
++            break;
          }
-+        else {
-+          ++i;
+-        file.seek(0);
+-        file.write(newHeader);
+-        return false;
++        default:
++            kDebug(7113) << "received invalid command";
++            return 0;
 +        }
-       }
++
++        QFileInfo fileInfo(fileName);
++        fi.lastUsedDate = fileInfo.lastModified().toTime_t();
++        fi.sizeOnDisk = fileInfo.size();
++        fi.debugPrint();
++        // a CacheFileInfo is-a MiniCacheFileInfo which enables the following assignment...
++        add(fi);
++        // finally, return cache dir growth (only relevant if a file was actually created!)
++        return ccc == CreateFileNotificationCommand ? fi.sizeOnDisk : 0;
      }
-     if(inSpellCheckArea) {
-Index: kate/document/katebuffer.cpp
-===================================================================
---- kate/document/katebuffer.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/document/katebuffer.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -462,7 +462,7 @@
-  : QObject (doc),
-    editSessionNumber (0),
-    editIsRunning (false),
--   editTagLineStart (0xffffffff),
-+   editTagLineStart (INT_MAX),
-    editTagLineEnd (0),
-    editTagLineFrom (false),
-    editChangesDone (false),
-Index: kate/document/katedocument.cpp
-===================================================================
---- kate/document/katedocument.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/document/katedocument.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -364,7 +364,7 @@
-   KateTextLine::Ptr tl = const_cast<KateDocument*>(this)->kateTextLine(line);
-   col1 = tl->fromVirtualColumn(col1, config()->tabWidth());
-   col2 = tl->fromVirtualColumn(col2, config()->tabWidth());
--  
+-    default:
+-        kDebug(7113) << "received invalid command";
+-        break;
 +
-   return KTextEditor::Range(line, col1, line, col2);
- }
-@@ -2697,11 +2697,23 @@
-       if (!bracketInserted && (config()->configFlags() & KateDocumentConfig::cfAutoBrackets))
-       {
--        if (ch == '(') { bracketInserted = true; buf.append (')'); }
--        if (ch == '[') { bracketInserted = true; buf.append (']'); }
--        if (ch == '{') { bracketInserted = true; buf.append ('}'); }
--        if (ch == '"') { bracketInserted = true; buf.append ('"'); }
--        if (ch == '\'') { bracketInserted = true; buf.append ('\''); }
-+        QChar end_ch;
-+
-+        if (ch == '(') { end_ch = ')'; }
-+        if (ch == '[') { end_ch = ']'; }
-+        if (ch == '{') { end_ch = '}'; }
-+        if (ch == '"') { end_ch = '"'; }
-+        if (ch == '\'') { end_ch = '\''; }
-+
-+        if (!end_ch.isNull()) {
-+          bracketInserted = true;
-+
-+          if (view->selection()) {
-+            buf.append(view->selectionText());
-+          }
-+
-+          buf.append(end_ch);
-+        }
-       }
++    void add(const CacheFileInfo &fi)
++    {
++        m_scoreboard[CacheIndex(fi.baseName)] = fi;
      }
-   }
-@@ -4576,6 +4588,13 @@
- void KateDocument::removeTrailingSpace(int line)
- {
-+  // if undo/redo is active, never remove trailing spaces, because the undo/redo
-+  // action also sets the cursor position. If the trailing spaces are removed,
-+  // the cursor position can get invalid (i.e. it is behind the last column).
-+  // Then, moving the cursor leads to a crash, see bug #152203.
-+  if (!m_undoManager->isUndoTrackingEnabled())
-+    return;
-+
-   // remove trailing spaces from left line if required
-   if (m_blockRemoveTrailingSpaces
-       || !(config()->configFlags() & KateDocumentConfig::cfRemoveTrailingDyn))
-@@ -4758,6 +4777,7 @@
- bool KateDocument::insertTemplateTextImplementation( const KTextEditor::Cursor &c, const QString &templateString,
-                                                      const QMap<QString,QString> &initialValues, QWidget * )
- {
-+  if (templateString.isEmpty()) return false;
-   // the handler will delete itself when necessary
-   KateTemplateHandler* handler = new KateTemplateHandler(this, c, templateString, initialValues, m_undoManager);
+-    return false;
+-}
  
-@@ -5573,17 +5593,30 @@
- {
-   KateTextLine::Ptr kateLine = kateTextLine(position.line());
++    void remove(const QString &basename)
++    {
++        m_scoreboard.remove(CacheIndex(basename));
++    }
++
++    // keep memory usage reasonably low - otherwise entries of nonexistent files don't hurt.
++    void maybeRemoveStaleEntries(const QList<CacheFileInfo *> &fiList)
++    {
++        // don't bother when there are a few bogus entries
++        if (m_scoreboard.count() < fiList.count() + 100) {
++            return;
++        }
++        kDebug(7113) << "we have too many fake/stale entries, cleaning up...";
++        QSet<CacheIndex> realFiles;
++        foreach (CacheFileInfo *fi, fiList) {
++            realFiles.insert(CacheIndex(fi->baseName));
++        }
++        QHash<CacheIndex, MiniCacheFileInfo>::Iterator it = m_scoreboard.begin();
++        while (it != m_scoreboard.end()) {
++            if (realFiles.contains(it.key())) {
++                ++it;
++            } else {
++                it = m_scoreboard.erase(it);
++            }
++        }
++    }
++
++private:
++    bool readAndValidateMcfi(const QByteArray &rawData, const QString &basename, MiniCacheFileInfo *mcfi)
++    {
++        QDataStream stream(rawData);
++        stream >> mcfi->useCount;
++        // check those against filesystem
++        stream >> mcfi->lastUsedDate;
++        stream >> mcfi->sizeOnDisk;
++
++        QFileInfo fileInfo(filePath(basename));
++        if (!fileInfo.exists()) {
++            return false;
++        }
++        bool ok = true;
++        ok = ok && fileInfo.lastModified().toTime_t() == mcfi->lastUsedDate;
++        ok = ok && fileInfo.size() == mcfi->sizeOnDisk;
++        if (!ok) {
++            // size or last-modified date not consistent with entry file; reload useCount
++            // note that avoiding to open the file is the whole purpose of the scoreboard - we only
++            // open the file if we really have to.
++            QFile entryFile(fileInfo.absoluteFilePath());
++            entryFile.open(QIODevice::ReadOnly);
++            if (entryFile.size() < SerializedCacheFileInfo::size) {
++                return false;
++            }
++            QDataStream stream(&entryFile);
++            stream.skipRawData(SerializedCacheFileInfo::useCountOffset);
++
++            stream >> mcfi->useCount;
++            mcfi->lastUsedDate = fileInfo.lastModified().toTime_t();
++            mcfi->sizeOnDisk = fileInfo.size();
++            ok = true;
++        }
++        return ok;
++    }
++
++    QHash<CacheIndex, MiniCacheFileInfo> m_scoreboard;
++};
++
++
+ // Keep the above in sync with the cache code in http.cpp
+ // !END OF SYNC!
  
--  const QVector<int> & intAttrs = kateLine->attributesList();
--
--  Q_ASSERT(intAttrs.size() % 3 == 0);
--
--  for ( int i = 0; i < intAttrs.size(); i += 3 ) {
--    if ( intAttrs[i] <= position.column() && intAttrs[i] + intAttrs[i+1] > position.column() ) {
--      return KateHlManager::self()->nameForIdentifier(highlight()->hlKeyForAttrib(intAttrs[i+2]));
--    }
-+//   QVector<short>attrs=kateLine->ctxArray();
-+//   kDebug()<<"----------------------------------------------------------------------";
-+//   foreach(short a, attrs)
-+//   {
-+//     kDebug()<<a;
-+//   }
-+//   kDebug()<<"----------------------------------------------------------------------";
-+  //kDebug()<<"col: "<<position.column()<<" lastchar:"<<kateLine->lastChar()<<" length:"<<kateLine->length();
-+  int len=kateLine->length();
-+  int pos=position.column();
-+  if (pos>=len) {
-+    QVector<short>ctxs=kateLine->ctxArray();
-+    int ctxcnt=ctxs.count();
-+    if (ctxcnt==0) return mode();
-+    int ctx=ctxs[ctxcnt-1];
-+    if (ctx==0) return mode();
-+    return KateHlManager::self()->nameForIdentifier(highlight()->hlKeyForContext(ctx));
-   }
--
--  return mode();
-+  
-+  int attr=kateLine->attribute(pos);
-+  if (attr==0) return mode();
-+  
-+  return KateHlManager::self()->nameForIdentifier(highlight()->hlKeyForAttrib(attr));
-+  
- }
+@@ -353,7 +630,7 @@
  
- // kate: space-indent on; indent-width 2; replace-tabs on;
-Index: kate/document/katetextline.h
-===================================================================
---- kate/document/katetextline.h       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kate/document/katetextline.h       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -242,7 +242,7 @@
-      * @param pos position of attribute requested
-      * @return value of attribute
-      */
--    inline uchar attribute (int pos) const
-+    inline int attribute (int pos) const
+     // Delete some of the files that need to be deleted. Return true when done, false otherwise.
+     // This makes interleaved cleaning / serving ioslaves possible.
+-    bool processSlice()
++    bool processSlice(Scoreboard *scoreboard = 0)
      {
-       for (int i=0; i < m_attributesList.size(); i+=3)
-       {
-Index: kfile/kfilewidget.cpp
-===================================================================
---- kfile/kfilewidget.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kfile/kfilewidget.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -405,6 +405,7 @@
-                    KDirOperator::FileActions |
-                    KDirOperator::ViewActions);
-     KActionCollection *coll = d->ops->actionCollection();
-+    coll->addAssociatedWidget(this);
-     // add nav items to the toolbar
-     //
-Index: kfile/kdirselectdialog.cpp
-===================================================================
---- kfile/kdirselectdialog.cpp (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kfile/kdirselectdialog.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -288,6 +288,7 @@
-     hlay->setMargin(0);
-     QVBoxLayout *mainLayout = new QVBoxLayout();
-     d->m_actions=new KActionCollection(this);
-+    d->m_actions->addAssociatedWidget(this);
-     d->m_placesView = new KFilePlacesView( page );
-     d->m_placesView->setModel(new KFilePlacesModel(d->m_placesView));
-     d->m_placesView->setObjectName( QLatin1String( "speedbar" ) );
-Index: doc/common/Doxyfile.global
-===================================================================
---- doc/common/Doxyfile.global (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ doc/common/Doxyfile.global (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -649,7 +649,6 @@
-                          *unload.* \
-                          */test/* \
-                          */tests/* \
--                         *_p.h \
-                          *_p.cpp
- # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-Index: doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook
-===================================================================
---- doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -15,8 +15,8 @@
- </affiliation>
- </author>
--<date>2001-04-25</date>
--<releaseinfo>0.01.01</releaseinfo>
-+<date>2010-01-04</date>
-+<releaseinfo>1.1 (&kde; 4.4)</releaseinfo>
- </refentryinfo>
-@@ -38,7 +38,12 @@
- <group>
- <arg choice="opt">--nosignal</arg>
--<arg choice="opt">--incremental</arg>
-+<arg choice="opt">--noincremental</arg>
-+<arg choice="opt">--checkstamps</arg>
-+<arg choice="opt">--nocheckfiles</arg>
-+<arg choice="opt">--global</arg>
-+<arg choice="opt">--menutest</arg>
-+<arg choice="opt">--track <replaceable>menu-id</replaceable></arg>
- <arg choice="opt">--help</arg>
- <arg choice="opt">--help-qt</arg>
- <arg choice="opt">--help-kde</arg>
-@@ -58,9 +63,8 @@
- <command>kbuildsycoca4</command>, as part of the &kde; command line
- tools ensures the proper operation of &kde; by reading in all the
- <literal role="extension">.desktop</literal>, <literal
--role="extension">.directory</literal>, <literal
--role="extension">.kimgio</literal> and <literal
--role="extension">.protocol</literal> files to constructs a binary
-+role="extension">.xml</literal>, and <literal
-+role="extension">.protocol</literal> files to construct a binary
- database. 
- </para>
-@@ -70,7 +74,7 @@
- </para>
- <para>
--This tool is part of ksycoca, which stands for &kde; System
-+This tool is part of ksycoca4, which stands for &kde; System
- Configuration Cache
- </para>
-@@ -83,17 +87,52 @@
- <varlistentry>
- <term><option>--nosignal</option></term>
- <listitem>
--<para>Don't signal applications </para>
-+<para>Do not signal applications to update</para>
- </listitem>
- </varlistentry>
- <varlistentry>
--<term><option>--incremental</option></term>
-+<term><option>--noincremental</option></term>
- <listitem>
--<para>Incremental Update</para>
-+<para>Disable incremental update, re-read everything</para>
- </listitem>
- </varlistentry>
-+<varlistentry>
-+<term><option>--checkstamps</option></term>
-+<listitem>
-+<para>Check file timestamps</para>
-+</listitem>
-+</varlistentry>
-+
-+<varlistentry>
-+<term><option>--nocheckfiles</option></term>
-+<listitem>
-+<para>Disable checking files (dangerous)</para>
-+</listitem>
-+</varlistentry>
-+
-+<varlistentry>
-+<term><option>--global</option></term>
-+<listitem>
-+<para>Create global database</para>
-+</listitem>
-+</varlistentry>
-+
-+<varlistentry>
-+<term><option>--menutest</option></term>
-+<listitem>
-+<para>Perform menu generation test run only</para>
-+</listitem>
-+</varlistentry>
-+
-+<varlistentry>
-+<term><option>--track <replaceable>menu-id</replaceable></option></term>
-+<listitem>
-+<para>Track menu id for debug purposes</para>
-+</listitem>
-+</varlistentry>
-+
- <!-- this entire section from here to the end of the section could be an -->
- <!-- entity.. or maybe just so irrelevant as to leave it out -->
-@@ -143,7 +182,7 @@
- </varlistentry>
- <varlistentry>
--<term><option>--version</option></term>
-+<term><option>-v , --version</option></term>
- <listitem>
- <para>
- Show version information
-@@ -178,9 +217,9 @@
- <variablelist>
- <varlistentry>
--<term><filename>/tmp/kde-$USER/ksycoca</filename></term>
-+<term><filename>/var/tmp/kde-$USER/ksycoca4</filename></term>
- <listitem>
--<para>...</para>
-+<para>The default directory where the cache files are stored.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-Index: doc/sonnet/index.docbook
-===================================================================
---- doc/sonnet/index.docbook   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ doc/sonnet/index.docbook   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1,23 +1,24 @@
- <?xml version="1.0" ?>
--<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
-+<!DOCTYPE article PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
-   <!ENTITY kappname "&sonnet;">
-   <!ENTITY % English "INCLUDE" > <!-- change language only here -->
-   <!ENTITY % addindex "IGNORE">
- ]>
--<book lang="&language;">
-+<article lang="&language;">
--<bookinfo>
--<title>The &sonnet; Handbook</title>
-+<articleinfo>
-+<!--title>The &sonnet; Handbook</title-->
-+<title>Check Spelling Dialog</title>
-+
- <authorgroup>
- <author>&David.Sweet; &David.Sweet.mail;</author>
- <!-- TRANS:ROLES_OF_TRANSLATORS -->
--
- </authorgroup>
--<date>2003-02-24</date>
--<releaseinfo>1.00.00</releaseinfo>
-+<date>2010-01-19</date>
-+<releaseinfo>&kde; 4.4</releaseinfo>
- <abstract>
- <para>&sonnet; is the spelling checker used by &kde; applications such
- as &kate;, &kmail;, and &kword;. It is a &GUI;
-@@ -35,35 +36,24 @@
- <keyword>checker</keyword>
- <keyword>KDE</keyword>
- </keywordset>
--</bookinfo>
-+</articleinfo>
--<chapter id="misspelled-word-dialog">
--<title>Misspelled Word Dialog</title>
--
--<!-- This one might need a paragraph of its own) --> 
--<para>(If you do not have <application>Ispell</application> installed
--you can obtain it from the <ulink
--url="http://fmg-www.cs.ucla.edu/geoff/ispell.html">International
--ISpell home page</ulink>.  ASpell is available from the <ulink
--url="http://aspell.sourceforge.net/">ASpell home page</ulink>.)
--</para>
--
--<sect1 id="general-use">
--<title>General Use</title>
--
- <para><anchor id="spelldlg"/>
- The top line in the dialog displays a possibly misspelled word which was found in your
- document. &sonnet; attempts to find an appropriate replacement word. One or
--several may be found. The best guess is shown to the right of <guilabel>Replacement:</guilabel>.
--To accept this replacement, click on <guibutton>Replace</guibutton>. You may also select a word
--from the list of <guilabel>Suggestions</guilabel> and then click <guibutton>Replace</guibutton> to replace the
--misspelled word with the selected word.</para>
-+several may be found.</para>
-+<para>The best guess is shown to the right of <guilabel>Replace with</guilabel>.
-+To accept this replacement, click on <guibutton>Replace</guibutton>.</para> 
-+<para>You may also select a word
-+from the list of suggestions and then click <guibutton>Replace</guibutton> 
-+to replace the misspelled word with the selected word. To add more suggestions 
-+from the dictionary to the suggestions list click the <guibutton>Suggest</guibutton>
-+button.</para>
- <para>To keep your original spelling, click on <guilabel>Ignore</guilabel>.</para>
- <para>To stop the spellchecking -- keeping the changes you've already made -- click
--on <guibutton>Stop</guibutton>.</para>
--<!-- The button is actually called "&Finished" -->
-+on <guibutton>Finished</guibutton>.</para>
- <para>To stop the spellchecking and cancel the changes you've already made, click on
- <guibutton>Cancel</guibutton>.</para>
-@@ -76,90 +66,17 @@
- <para>The <guibutton>Ignore All</guibutton> button ignores this and all future occurrences of the
- misspelled word.</para>
--<para>Clicking on <guibutton>Add</guibutton> will add the misspelled word to your personal dictionary
-+<para>Clicking on <guibutton>Add to Dictionary</guibutton> will add the misspelled word to your personal dictionary
- (this is distinct from the original system dictionary, so the additions you make
- will not be seen by other users).</para>
--</sect1>
--</chapter>
--<chapter id="configuration-dialog">
--<title>Configuration Dialog </title>
--<anchor id="configuration"/>
-+<para>The drop down box <guilabel>Language</guilabel> at the bottom of this dialog
-+allows you to switch to another dictionary temporarily.</para>
--<sect1 id="dictionaries">
--<title>Dictionaries</title>
-+<para>The default configuration options are available in the &systemsettings; module 
-+<ulink url="help:kcontrol/spellchecking">Spell Checker</ulink>.</para>
--<para>You can choose the dictionary to use for spellchecking from the list of
--installed dictionaries.</para>
--</sect1>
--
--<sect1 id="encodings">
--<title>Encodings</title>
--
--<para>The most commonly used character encodings are:
--<variablelist>
--<varlistentry>
--<term>US-ASCII</term>
--<listitem>
--<para>This is the character set used for English text.</para>
--</listitem>
--</varlistentry>
--<varlistentry>
--<term>ISO-8859-1</term>
--<listitem>
--<para>This is used for Western European languages.</para>
--</listitem>
--</varlistentry>
--<varlistentry>
--<term>UTF-8</term>
--<listitem>
--<para>This is a Unicode encoding that can be used for almost any language, if 
--your system has the necessary fonts.</para>
--</listitem>
--</varlistentry>
--</variablelist>
--</para>
--
--<para>You should select the one that matches the character set you are using.
--In some cases, dictionaries will support more than one encoding.  A
--dictionary might, for example, accept accented characters when <guilabel>ISO-8859-1</guilabel> is
--selected, but accept email-style character combinations (like <literal>'a</literal> for an
--accented <literal>a</literal>) when <guilabel>US-ASCII</guilabel> is selected. Please see
--your dictionary's distribution for more information.</para>
--</sect1>
--
--<sect1 id="spell-checking-client">
--<title>Spell-checking client</title>
--
--<para>You may choose to use <application>Ispell</application> or <application>Aspell</application> as the spell-checking
--backend for &sonnet;. <application>Ispell</application> is more widely available and may
--have better international support, but <application>Aspell</application> is gaining
--popularity as it claims to give better suggestions for word replacements.</para>
--</sect1>
--
--<sect1 id="other">
--<title>Other</title>
--
--<para>It is recommend that you do not change the first two options unless you have
--read the International <application>ISpell</application> man page.</para>
--</sect1>
--</chapter>
--
--<chapter id="contact-information">
--<title>Contact Information</title>
--
--<para>For more information about &sonnet;, visit the <ulink url="http://www.chaos.umd.edu/~dsweet/KDE/Sonnet">&sonnet; 
--Home Page</ulink>. In particular, you will find information about programming the &sonnet; C++ class.</para>
--
--<para>You may email the author/maintainer with questions and/or comments at
--&David.Sweet.mail;.</para>
--
--<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
--&underFDL;
--
--</chapter>
--&documentation.index; 
--</book>
-+</article>
- <!--
- Local Variables:
- mode: sgml
-Index: nepomuk/query/query.cpp
-===================================================================
---- nepomuk/query/query.cpp    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/query/query.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -268,7 +268,11 @@
-     // restrict to files if we are a file query
-     if( d->m_isFileQuery ) {
--        term = AndTerm( term, OrTerm( ResourceTypeTerm( Vocabulary::NFO::FileDataObject() ), ResourceTypeTerm( Vocabulary::NFO::Folder() ) ) );
-+        //
-+        // we do not use ResourceTypeTerm since we do not want to use crappy inference every time. All files have nfo:FileDataObject type anyway
-+        //
-+        term = AndTerm( term, OrTerm( ComparisonTerm( Soprano::Vocabulary::RDF::type(), ResourceTerm(Vocabulary::NFO::FileDataObject()), ComparisonTerm::Equal ),
-+                                      ComparisonTerm( Soprano::Vocabulary::RDF::type(), ResourceTerm(Vocabulary::NFO::Folder()), ComparisonTerm::Equal ) ) );
-     }
-     // actually build the SPARQL query string
-Index: nepomuk/query/queryserviceclient.cpp
-===================================================================
---- nepomuk/query/queryserviceclient.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/query/queryserviceclient.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -149,6 +149,7 @@
- Nepomuk::Query::QueryServiceClient::~QueryServiceClient()
- {
-     close();
-+    delete d->queryServiceInterface;
-     delete d;
- }
-Index: nepomuk/core/dbusconnectionpool.cpp
-===================================================================
---- nepomuk/core/dbusconnectionpool.cpp        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/core/dbusconnectionpool.cpp        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -22,6 +22,9 @@
- #include "dbusconnectionpool.h"
- #include <QThreadStorage>
+         QTime t;
+         t.start();
+@@ -361,19 +638,19 @@
+         if (!m_fileNameList.isEmpty()) {
+             while (t.elapsed() < 100 && !m_fileNameList.isEmpty()) {
+                 QString baseName = m_fileNameList.takeFirst();
+-                // check if the filename is of the 40 letters, 0...f type
+-                if (baseName.length() < 40) {
++                // check if the filename is of the $s_hashedUrlNibbles letters, 0...f type
++                if (baseName.length() < s_hashedUrlNibbles) {
+                     continue;
+                 }
+                 bool nameOk = true;
+-                for (int i = 0; i < 40 && nameOk; i++) {
++                for (int i = 0; i < s_hashedUrlNibbles && nameOk; i++) {
+                     QChar c = baseName[i];
+                     nameOk = (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f');
+                 }
+                 if (!nameOk) {
+                     continue;
+                 }
+-                if (baseName.length() > 40) {
++                if (baseName.length() > s_hashedUrlNibbles) {
+                     if (g_currentDate - QFileInfo(filePath(baseName)).lastModified().toTime_t() > 15*60) {
+                         // it looks like a temporary file that hasn't been touched in > 15 minutes...
+                         QFile::remove(filePath(baseName));
+@@ -383,7 +660,19 @@
+                 }
  
-+namespace {
-+QAtomicInt s_connectionCounter;
+                 CacheFileInfo *fi = new CacheFileInfo();
+-                if (readCacheFile(baseName, fi, CleanCache)) {
++                fi->baseName = baseName;
 +
- class DBusConnectionPoolPrivate
- {
- public:
-@@ -36,14 +39,14 @@
++                bool gotInfo = false;
++                if (scoreboard) {
++                    gotInfo = scoreboard->fillInfo(baseName, fi);
++                }
++                if (!gotInfo) {
++                    gotInfo = readCacheFile(baseName, fi, CleanCache);
++                    if (gotInfo && scoreboard) {
++                        scoreboard->add(*fi);
++                    }
++                }
++                if (gotInfo) {
+                     m_fiList.append(fi);
+                     m_totalSizeOnDisk += fi->sizeOnDisk;
+                 } else {
+@@ -404,14 +693,22 @@
+         // TODO: delete files larger than allowed for a single file
+         while (t.elapsed() < 100) {
+             if (m_totalSizeOnDisk <= g_maxCacheSize || m_fiList.isEmpty()) {
++                kDebug(7113) << "total size of cache files after cleaning is" << m_totalSizeOnDisk;
++                if (scoreboard) {
++                    scoreboard->maybeRemoveStaleEntries(m_fiList);
++                    scoreboard->writeOut();
++                }
+                 qDeleteAll(m_fiList);
+-                kDebug(7113) << "total size of cache files after cleaning is" << m_totalSizeOnDisk;
++                m_fiList.clear();
+                 return true;
+             }
+             CacheFileInfo *fi = m_fiList.takeFirst();
+             QString filename = filePath(fi->baseName);
+             if (QFile::remove(filename)) {
+                 m_totalSizeOnDisk -= fi->sizeOnDisk;
++                if (scoreboard) {
++                    scoreboard->remove(fi->baseName);
++                }
+             }
+             delete fi;
+         }
+@@ -455,7 +752,7 @@
+         if (!readCacheFile(args->getOption("file-info"), &fi, mode)) {
+             return 1;
+         }
+-        printInfo(fi);
++        fi.prettyPrint();
+         return 0;
      }
  
-     QDBusConnection connection() const { return m_connection; }
--    
-+
- private:
--    int newNumber() {
--        return m_counter.fetchAndAddAcquire(1);
-+    static int newNumber() {
-+        return s_connectionCounter.fetchAndAddAcquire(1);
+@@ -504,8 +801,9 @@
+     QFile::remove(socketFileName);
+     lServer.listen(socketFileName);
+     QList<QLocalSocket *> sockets;
+-    int newFilesCounter = 1000000;  // force cleaner run on startup
++    int newBytesCounter = INT_MAX;  // force cleaner run on startup
++    Scoreboard scoreboard;
+     CacheCleaner *cleaner = 0;
+     while (true) {
+         g_currentDate = time(0);
+@@ -530,7 +828,9 @@
+         for (int i = 0; i < sockets.size(); i++) {
+             QLocalSocket *sock = sockets[i];
+             if (sock->state() != QLocalSocket::ConnectedState) {
+-                sock->waitForDisconnected();
++                if (sock->state() != QLocalSocket::UnconnectedState) {
++                    sock->waitForDisconnected();
++                }
+                 delete sock;
+                 sockets.removeAll(sock);
+                 i--;
+@@ -543,26 +843,21 @@
+                     break;
+                 }
+                 Q_ASSERT(recv.size() == 80);
+-                //### not keeping the information, for now...
+-                CacheFileInfo fi;
+-                if (dispatchCommand(recv, &fi)) {
+-                    newFilesCounter++;
+-                }
++                newBytesCounter += scoreboard.runCommand(recv);
+             }
+         }
+-        // TODO it makes more sense to keep track of cache size, which we can actually do
+         // interleave cleaning with serving ioslaves to reduce "garbage collection pauses"
+         if (cleaner) {
+-            if (cleaner->processSlice()) {
++            if (cleaner->processSlice(&scoreboard)) {
+                 // that was the last slice, done
+                 delete cleaner;
+                 cleaner = 0;
+             }
+-        } else if (newFilesCounter > 30) {
++        } else if (newBytesCounter > g_maxCacheSize / 8) {
+             cacheDir.refresh();
+             cleaner = new CacheCleaner(cacheDir);
+-            newFilesCounter = 0;
++            newBytesCounter = 0;
+         }
      }
--    QAtomicInt m_counter;
-     QDBusConnection m_connection;
- };
-+}
- QThreadStorage<DBusConnectionPoolPrivate *> s_perThreadConnection;
-Index: nepomuk/core/dbusconnectionpool.h
+     return 0;
+Index: nepomuk/query/queryserviceclient.h
 ===================================================================
---- nepomuk/core/dbusconnectionpool.h  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/core/dbusconnectionpool.h  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -34,7 +34,7 @@
-  * around in Qt) this method can be dropped.
-  */
- NEPOMUK_EXPORT QDBusConnection threadConnection();
--};
-+}
- #endif
+--- nepomuk/query/queryserviceclient.h (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ nepomuk/query/queryserviceclient.h (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1,5 +1,5 @@
+ /*
+-   Copyright (c) 2008-2009 Sebastian Trueg <trueg@kde.org>
++   Copyright (c) 2008-2010 Sebastian Trueg <trueg@kde.org>
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+@@ -97,11 +97,19 @@
+              * Result::requestProperties(). This map will be constructed automatically when using
+              * query(const Query&).
+              *
+-             * Example:
++             * \section sparql_query_examples Examples:
++             *
++             * Select a simple request property as can also be done via Query::Query:
++             *
+              * \code
+-             * QString query = "select ?r ?mtime where { ?r a nfo:FileDataObject . ?r nie:lastModified ?mtime . }";
++             * QString query = "select ?r ?mtime where { "
++             *                 "?r a nfo:FileDataObject . "
++             *                 "?r nie:lastModified ?mtime . "
++             *                 "}";
++             *
+              * QueryServiceClient::RequestPropertyMap requestPropertyMap;
+              * requestPropertyMap.insert( "mtime", Vocabulary::NIE::lastModified() );
++             *
+              * sparqlQuery( query, requestPropertyMap );
+              * \endcode
+              *
+@@ -114,6 +122,21 @@
+              *     [...]
+              * \endcode
+              *
++             * While using Query::Query restricts to request properties to diret properties of the
++             * results using a custom SPARQL query allows to use any binding as request property.
++             * The used property URI in the mapping does not even need to match anything in the query:
++             *
++             * \code
++             * QString query = "select ?r ?phone where { "
++             *                 "?r a nco:PersonContact . "
++             *                 "?r nco:hasPhoneNumber ?n . "
++             *                 "?n nco:phoneNumber ?phone . "
++             *                 "}";
++             *
++             * QueryServiceClient::RequestPropertyMap requestPropertyMap;
++             * requestPropertyMap.insert( "phone", Vocabulary::NCO::hasPhoneNumber() );
++             * \endcode
++             *
+              * \sa Query::requestPropertyMap()
+              */
+             bool sparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
+Index: nepomuk/core/resourcedata.cpp
+===================================================================
+--- nepomuk/core/resourcedata.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ nepomuk/core/resourcedata.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -641,7 +641,7 @@
+                 // Check if the kickoffUriOrId is a resource identifier or a resource URI
+                 //
+                 else {
+-                    QString query = QString::fromLatin1("select distinct ?r ?o where { { ?r %1 %2 . } UNION { %3 ?p ?o . } . }")
++                    QString query = QString::fromLatin1("select distinct ?r ?o where { { ?r %1 %2 . } UNION { %3 ?p ?o . } . } LIMIT 1")
+                                     .arg( Soprano::Node::resourceToN3(Soprano::Vocabulary::NAO::identifier()) )
+                                     .arg( Soprano::Node::literalToN3(m_kickoffId) )
+                                     .arg( Soprano::Node::resourceToN3(KUrl(m_kickoffId)) );
 Index: nepomuk/core/resourcemanager.cpp
 ===================================================================
---- nepomuk/core/resourcemanager.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/core/resourcemanager.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -129,15 +129,16 @@
-     QList<ResourceData*> l;
-     if( !type.isEmpty() ) {
--        //
--        // We need to cache both m_uriKickoffData and m_idKickoffData since they might be changed
--        // in the loop by ResourceData::type()
--        //
-         QList<ResourceData*> rdl = m_uriKickoffData.values() + m_idKickoffData.values();
-         for( QList<ResourceData*>::iterator rdIt = rdl.begin();
-              rdIt != rdl.end(); ++rdIt ) {
-             ResourceData* rd = *rdIt;
--            if( rd->type() == type ) {
-+            //
-+            // make sure we do not trigger a load here since
-+            // 1. that could result in the deletion of values from the iterated list (m_cache.clear() in ResourceData::load)
-+            // 2. We only need to check non-existing resources anyway, since the rest is queried from the db below
-+            //
-+            if( rd->constHasType( type ) ) {
-                 l.append( rd );
-             }
+--- nepomuk/core/resourcemanager.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ nepomuk/core/resourcemanager.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -478,7 +478,15 @@
+         QString uuid = QUuid::createUuid().toString();
+         uuid = uuid.mid(1, uuid.length()-2);
+         QUrl uri = QUrl( QLatin1String("nepomuk:/") + type + QLatin1String("/") + uuid );
+-        if ( !model->executeQuery( QString::fromLatin1("ask where { { <%1> ?p1 ?o1 . } UNION { ?r2 <%1> ?o2 . } UNION { ?r3 ?p3 <%1> . } }")
++        if ( !model->executeQuery( QString::fromLatin1("ask where { "
++                                                       "{ <%1> ?p1 ?o1 . } "
++                                                       "UNION "
++                                                       "{ ?s2 <%1> ?o2 . } "
++                                                       "UNION "
++                                                       "{ ?s3 ?p3 <%1> . } "
++                                                       "UNION "
++                                                       "{ graph <%1> { ?s4 ?4 ?o4 . } . } "
++                                                       "}")
+                                    .arg( QString::fromAscii( uri.toEncoded() ) ), Soprano::Query::QueryLanguageSparql ).boolValue() ) {
+             return uri;
          }
-@@ -155,9 +156,19 @@
-     //
-     // We need to cache both m_uriKickoffData and m_idKickoffData since they might be changed
--    // in the loop by ResourceData::type()
-+    // in the loop by ResourceData::load()
-     //
-     QList<ResourceData*> rdl = m_uriKickoffData.values() + m_idKickoffData.values();
-+
-+    //
-+    // make sure none of the ResourceData objects are deleted by ResourceData::load below
-+    // which would result in a crash since we have them cached.
-+    //
-+    QList<Resource> tmp;
-+    foreach( ResourceData* rd, rdl ) {
-+        tmp << Resource( rd );
-+    }
-+
-     for( QList<ResourceData*>::iterator rdIt = rdl.begin();
-          rdIt != rdl.end(); ++rdIt ) {
-         ResourceData* rd = *rdIt;
-Index: nepomuk/core/resourcedata.h
-===================================================================
---- nepomuk/core/resourcedata.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ nepomuk/core/resourcedata.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -87,6 +87,11 @@
-          */
-         bool hasType( const QUrl& uri );
+Index: nepomuk/Mainpage.dox
+===================================================================
+--- nepomuk/Mainpage.dox       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ nepomuk/Mainpage.dox       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -498,6 +498,6 @@
+ // DOXYGEN_SET_EXCLUDE += @topdir@/nepomuk/core/ui/nepomukmassupdatejob.h
+ // DOXYGEN_SET_EXCLUDE += @topdir@/nepomuk/core/ui/kautoscrollarea.h
+ // DOXYGEN_SET_EXCLUDE += @topdir@/nepomuk/core/ui/kblocklayout.h
+-// DOXYGEN_SET_EXCLUDE += @topdir@/nepomuk/query/*_p.h
++// DOXYGEN_SET_EXCLUDE_PATTERNS += @topdir@/nepomuk/query/*_p.h
+ // DOXYGEN_SET_PROJECT_NAME = Nepomuk
+ // vim:ts=4:sw=4:expandtab:filetype=doxygen
+Index: kinit/Info.plist.template
+===================================================================
+--- kinit/Info.plist.template  (.../tags/KDE/4.4.1/kdelibs)    (wersja 0)
++++ kinit/Info.plist.template  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -0,0 +1,36 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++<plist version="1.0">
++<dict>
++    <key>CFBundleDevelopmentRegion</key>
++    <string>English</string>
++    <key>CFBundleExecutable</key>
++    <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
++    <key>CFBundleGetInfoString</key>
++    <string>${MACOSX_BUNDLE_INFO_STRING}</string>
++    <key>CFBundleIconFile</key>
++    <string>${MACOSX_BUNDLE_ICON_FILE}</string>
++    <key>CFBundleIdentifier</key>
++    <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
++    <key>CFBundleInfoDictionaryVersion</key>
++    <string>6.0</string>
++    <key>CFBundleLongVersionString</key>
++    <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
++    <key>CFBundleName</key>
++    <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
++    <key>CFBundlePackageType</key>
++    <string>APPL</string>
++    <key>CFBundleShortVersionString</key>
++    <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
++    <key>CFBundleVersion</key>
++    <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
++    <key>CSResourcesFileMapped</key>
++    <true/>
++    <key>LSRequiresCarbon</key>
++    <true/>
++    <key>LSUIElement</key>
++    <string>1</string>
++    <key>NSHumanReadableCopyright</key>
++    <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
++</dict>
++</plist>
+Index: kinit/kinit.cpp
+===================================================================
+--- kinit/kinit.cpp    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kinit/kinit.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1666,6 +1666,10 @@
+    cleanup_fds();
++   // Redirect stdout to stderr. We have no reason to use stdout anyway.
++   // This minimizes our impact on commands used in pipes.
++   (void)dup2(2, 1);
++
+    if (do_fork) {
+ #ifdef Q_WS_MACX
+       mac_fork_and_reexec_self();
+Index: kinit/klauncher_main.cpp
+===================================================================
+--- kinit/klauncher_main.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kinit/klauncher_main.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -48,6 +48,10 @@
+ }
+ #endif
  
-+        /**
-+         * Check the type without loading data from the store.
-+         */
-+        bool constHasType( const QUrl& type ) const;
++#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
++#include <kkernel_mac.h>
++#endif
 +
-         Variant property( const QUrl& uri );
+ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
+ {
+ #ifndef Q_WS_WIN
+@@ -61,6 +65,10 @@
+    }
+ #endif
  
-         /**
-@@ -151,7 +156,6 @@
-         ResourceData* proxy() const { return m_proxyData; }
++#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
++   mac_initialize_dbus();
++#endif
++
+    KComponentData componentData("klauncher", "kdelibs4");
+    KGlobal::locale();
+Index: kinit/CMakeLists.txt
+===================================================================
+--- kinit/CMakeLists.txt       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kinit/CMakeLists.txt       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -36,13 +36,16 @@
+   set(kdeinit_LIBS kparts)
+ endif (WIN32)
+-if (APPLE OR WIN32)
++if (Q_WS_MAC OR WIN32)
+   # this has to be GUI on OSX because it launches GUI apps and need a quartz context
+   # and on Windows this makes kdeinit4 create separate console window
+   kde4_add_executable(kdeinit4 ${kdeinit_SRCS})
+-else (APPLE OR WIN32)
++  set_target_properties(kdeinit4 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
++  set_target_properties(kdeinit4 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.kdeinit4")
++  set_target_properties(kdeinit4 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Init")
++else (Q_WS_MAC OR WIN32)
+   kde4_add_executable(kdeinit4 NOGUI ${kdeinit_SRCS})
+-endif (APPLE OR WIN32)
++endif (Q_WS_MAC OR WIN32)
+ target_link_libraries(kdeinit4 ${KDE4_KDECORE_LIBS} ${kdeinit_LIBS} ${KINIT_SOCKET_LIBRARY} )
+ if (Q_WS_X11)
+Index: kio/kfile/kiofilemodule.desktop
+===================================================================
+--- kio/kfile/kiofilemodule.desktop    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kio/kfile/kiofilemodule.desktop    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -26,6 +26,7 @@
+ Name[kk]= filemodule
+ Name[km]=ម៉ូឌុល​ឯកសារ
+ Name[ko]=filemodule
++Name[lt]=filemodule
+ Name[lv]=filemodule
+ Name[nb]=filmodul
+ Name[nds]=Dateimoduul
+@@ -76,6 +77,7 @@
+ Comment[kk]=KIO файл модулі
+ Comment[km]=ម៉ូឌុល​ឯកសារ KIO
+ Comment[ko]=KIO 파일 모듈
++Comment[lt]=KIO failų modulis
+ Comment[lv]=KIO failu modulis
+ Comment[nb]=KIO filmodul
+ Comment[nds]=KIO-Dateimoduul
+Index: kutils/kidletime/xscreensaverbasedpoller.cpp
+===================================================================
+--- kutils/kidletime/xscreensaverbasedpoller.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kutils/kidletime/xscreensaverbasedpoller.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -22,6 +22,7 @@
  
-     private:
--        bool constHasType( const QUrl& type ) const;
-         void loadType( const QUrl& type );
-         /// Will reset this instance to 0 as if constructed without parameters
-Index: kio/kio/kdirwatch.h
-===================================================================
---- kio/kio/kdirwatch.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/kdirwatch.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -216,22 +216,6 @@
-     */
-    static void statistics();
--   /**
--    * Emits created().
--    * @param path the path of the file or directory
--    */
--   void setCreated( const QString &path );
--   /**
--    * Emits dirty().
--    * @param path the path of the file or directory
--    */
--   void setDirty( const QString &path );
--   /**
--    * Emits deleted().
--    * @param path the path of the file or directory
--    */
--   void setDeleted( const QString &path );
--
-    enum Method { FAM, INotify, DNotify, Stat };
-    /**
-     * Returns the preferred internal method to
-@@ -259,6 +243,26 @@
-     */
-    static bool exists();
-+public Q_SLOTS: 
-+
-+   /**
-+    * Emits created().
-+    * @param path the path of the file or directory
-+    */
-+   void setCreated( const QString &path );
-+    
-+   /**
-+    * Emits dirty().
-+    * @param path the path of the file or directory
-+    */
-+   void setDirty( const QString &path );
-+
-+   /**
-+    * Emits deleted().
-+    * @param path the path of the file or directory
-+    */
-+   void setDeleted( const QString &path );
-+
-  Q_SIGNALS:
-    /**
-Index: kio/kio/accessmanagerreply_p.cpp
-===================================================================
---- kio/kio/accessmanagerreply_p.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/accessmanagerreply_p.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -72,11 +72,14 @@
-     } else {
-         connect(kioJob, SIGNAL(redirection(KIO::Job*, const KUrl&)), SLOT(_k_redirection(KIO::Job*, const KUrl&)));
-         connect(kioJob, SIGNAL(percent(KJob*, unsigned long)), SLOT(_k_percent(KJob*, unsigned long)));
--        connect(kioJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
--            SLOT(appendData(KIO::Job *, const QByteArray &)));
-         connect(kioJob, SIGNAL(result(KJob *)), SLOT(jobDone(KJob *)));
--        connect(kioJob, SIGNAL(mimetype(KIO::Job *, const QString&)),
--            SLOT(setMimeType(KIO::Job *, const QString&)));
-+
-+        if (!qobject_cast<KIO::StatJob*>(kioJob)) {
-+            connect(kioJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
-+                SLOT(appendData(KIO::Job *, const QByteArray &)));
-+            connect(kioJob, SIGNAL(mimetype(KIO::Job *, const QString&)),
-+                SLOT(setMimeType(KIO::Job *, const QString&)));
+ #include <QX11Info>
++#include <X11/Xlib.h>
+ #include <X11/extensions/scrnsaver.h>
+ #ifdef HAVE_XTEST
+Index: kdecore/kernel/kcmdlineargs.cpp
+===================================================================
+--- kdecore/kernel/kcmdlineargs.cpp    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/kernel/kcmdlineargs.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -737,10 +737,6 @@
+       argument = opt.mid(j+1);
+       opt = opt.left(j);
+    }
+-#ifdef Q_WS_MACX
+-   if(opt.startsWith("psn_")) // krazy:exclude=strings
+-      opt = "psn";
+-#endif
+    bool enabled = true;
+    int result = 0;
+@@ -801,10 +797,6 @@
+    {
+       if (s->ignoreUnknown)
+          return;
+-#ifdef Q_WS_MACX
+-              if (_opt.startsWith("psn_")) // krazy:exclude=strings
+-                      return;
+-#endif
+       KCmdLineArgs::enable_i18n();
+       KCmdLineArgs::usageError( i18n("Unknown option '%1'.", QString::fromLocal8Bit(_opt)));
+    }
+@@ -821,10 +813,6 @@
+       {
+          if (s->ignoreUnknown)
+             return;
+-#ifdef Q_WS_MACX
+-                      if (_opt.startsWith("psn_")) // krazy:exclude=strings
+-                              return;
+-#endif
+          KCmdLineArgs::enable_i18n();
+          KCmdLineArgs::usageError( i18n("Unknown option '%1'.", QString::fromLocal8Bit(_opt)));
+       }
+@@ -889,6 +877,13 @@
+          {
+             KCmdLineArgs::usage(option.mid(5));
+          }
++#ifdef Q_WS_MAC
++         // skip the finder -psn_* hint
++         else if (option.startsWith("psn_")) // krazy:exclude=strings
++         {
++            continue;
++         }
++#endif
+          else if ((option == "version") || (option == "v"))
+          {
+             KCmdLineArgs::enable_i18n();
+Index: kdecore/kernel/kstandarddirs.cpp
+===================================================================
+--- kdecore/kernel/kstandarddirs.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/kernel/kstandarddirs.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1215,10 +1215,19 @@
+     QString bundle = path;
+     bundle += ".app/Contents/MacOS/" + bundle.section('/', -1);
+     info.setFile( bundle );
+-    if ( info.exists() && ( ignore || info.isExecutable() )
+-         && ( info.isFile() || info.isSymLink() ) ) {
+-        kDebug(180) << "getBundle(): returning " << bundle;
+-        return bundle;
++    FILE *file;
++    if (file = fopen(info.absoluteFilePath().toUtf8().constData(), "r")) {
++        fclose(file);
++        struct stat _stat;
++        if ((stat(info.absoluteFilePath().toUtf8().constData(), &_stat)) < 0) {
++            return QString();
++        }
++        if ( ignore || (_stat.st_mode & S_IXUSR) ) {
++            if ( ((_stat.st_mode & S_IFMT) == S_IFREG) || ((_stat.st_mode & S_IFMT) == S_IFLNK) ) {
++                kDebug(180) << "getBundle(): returning " << bundle;
++                return bundle;
++            }
 +        }
      }
+     return QString();
  }
-@@ -225,6 +228,8 @@
+@@ -1235,6 +1244,23 @@
+ #endif
+     QFileInfo info( path );
+     QFileInfo orig = info;
++#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
++    FILE *file;
++    if (file = fopen(orig.absoluteFilePath().toUtf8().constData(), "r")) {
++        fclose(file);
++        struct stat _stat;
++        if ((stat(orig.absoluteFilePath().toUtf8().constData(), &_stat)) < 0) {
++            return QString();
++        }
++        if ( ignoreExecBit || (_stat.st_mode & S_IXUSR) ) {
++            if ( ((_stat.st_mode & S_IFMT) == S_IFREG) || ((_stat.st_mode & S_IFMT) == S_IFLNK) ) {
++                orig.makeAbsolute();
++                return orig.filePath();
++            }
++        }
++    }
++    return QString();
++#else
+     if( info.exists() && info.isSymLink() )
+         info = QFileInfo( info.canonicalFilePath() );
+     if( info.exists() && ( ignoreExecBit || info.isExecutable() ) && info.isFile() ) {
+@@ -1246,6 +1272,7 @@
      }
-     setAttribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::KioError), errcode);
-+    if (errcode)
-+        emit error(error());
-     emit finished();
+     //kDebug(180) << "checkExecutable(): failed, returning empty string";
+     return QString();
++#endif
  }
  
-Index: kio/kio/ktar.cpp
+ QString KStandardDirs::findExe( const QString& appname,
+Index: kdecore/services/kmimetype.h
 ===================================================================
---- kio/kio/ktar.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/ktar.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -73,15 +73,14 @@
- }
+--- kdecore/services/kmimetype.h       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/services/kmimetype.h       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -118,7 +118,7 @@
+      *         0 if not found
+      * @see KServiceType::serviceType
+      */
+-    static Ptr mimeType( const QString& name, FindByNameOption options = DontResolveAlias );
++    static Ptr mimeType( const QString& name, FindByNameOption options = ResolveAliases );
  
- KTar::KTar( QIODevice * dev )
--    : KArchive( dev ),d(new KTarPrivate(this))
-+    : KArchive( dev ), d(new KTarPrivate(this))
- {
-     Q_ASSERT( dev );
- }
+     /**
+      * Finds a KMimeType with the given @p url.
+Index: kdecore/localization/ktranslit_p.h
+===================================================================
+--- kdecore/localization/ktranslit_p.h (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/localization/ktranslit_p.h (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -70,13 +70,13 @@
+     static QStringList fallbackList (const QString &lang);
  
--// Only called when the a filename was given
-+// Only called when a filename was given
- bool KTar::createDevice( QIODevice::OpenMode mode )
- {
--    Q_UNUSED( mode );
-     if ( d->mimetype.isEmpty() ) // Find out mimetype manually
-     {
-         if ( mode != QIODevice::WriteOnly && QFile::exists( fileName() ) )
-@@ -144,7 +143,7 @@
-         }
-     }
+     /**
+-     * Returns possible higher priority script for given language.
++     * Split given language to more basic variant plus target script.
+      *
+-     * @param lang language to check scripts for
+-     * @return higher priority script if found, empty string otherwise
++     * @param lang language to split
+      */
+-    static QString higherPriorityScript (const QString &lang,
+-                                         const KLocale *locale);
++    static void splitToBaseAndScript (const QString &lang,
++                                      const KLocale *locale,
++                                      QString &blang, QString &lscr);
  
--    if( d->mimetype == "application/x-tar" )
-+    if (d->mimetype == "application/x-tar" || mode == QIODevice::WriteOnly)
-     {
-         return KArchive::createDevice( mode );
+     /**
+      * Transliterates string to given script.
+Index: kdecore/localization/klocalizedstring.cpp
+===================================================================
+--- kdecore/localization/klocalizedstring.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/localization/klocalizedstring.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -232,25 +232,22 @@
+                               .arg(shortenMessage(QString::fromUtf8(msg)));
+     // Get raw translation.
+-    QString lang, rawtrans, lscr, ctry;
+-    if (locale != NULL)
+-    {
+-        if (!ctxt.isEmpty() && !plural.isEmpty())
+-            locale->translateRaw(ctxt, msg, plural, number, &lang, &rawtrans);
+-        else if (!plural.isEmpty())
+-            locale->translateRaw(msg, plural, number, &lang, &rawtrans);
+-        else if (!ctxt.isEmpty())
+-            locale->translateRaw(ctxt, msg, &lang, &rawtrans);
+-        else
+-            locale->translateRaw(msg, &lang, &rawtrans);
+-
++    QString rawlang, rawtrans, lang, lscr, ctry;
++    if (locale != NULL) {
++        if (!ctxt.isEmpty() && !plural.isEmpty()) {
++            locale->translateRaw(ctxt, msg, plural, number, &rawlang, &rawtrans);
++        } else if (!plural.isEmpty()) {
++            locale->translateRaw(msg, plural, number, &rawlang, &rawtrans);
++        } else if (!ctxt.isEmpty()) {
++            locale->translateRaw(ctxt, msg, &rawlang, &rawtrans);
++        } else {
++            locale->translateRaw(msg, &rawlang, &rawtrans);
++        }
+         ctry = locale->country();
+-
+-        // Find any higher priority writing script for the current language.
+-        lscr = KTranslit::higherPriorityScript(lang, locale);
+-    }
+-    else
+-    {
++        // Split language into base language and script,
++        // if such split is defined for this language.
++        KTranslit::splitToBaseAndScript(rawlang, locale, lang, lscr);
++    } else {
+         lang = KLocale::defaultLanguage();
+         ctry = 'C';
+         rawtrans = selectForEnglish();
+Index: kdecore/localization/ktranslit.cpp
+===================================================================
+--- kdecore/localization/ktranslit.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/localization/ktranslit.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -75,37 +75,25 @@
      }
-@@ -499,10 +498,11 @@
- /*
-  * Writes back the changes of the temporary file
-  * to the original file.
-- * Must only be called if in QIODevice::WriteOnly mode
-+ * Must only be called if in write mode, not in read mode
-  */
--bool KTar::KTarPrivate::writeBackTempFile( const QString & fileName ) {
--    if ( ! tmpFile )
-+bool KTar::KTarPrivate::writeBackTempFile( const QString & fileName )
-+{
-+    if ( !tmpFile )
-         return true;
-     kDebug(7041) << "Write temporary file to compressed file";
-@@ -555,7 +555,7 @@
-     // If we are in write mode and had created
-     // a temporary tar file, we have to write
-     // back the changes to the original file
--    if( mode() == QIODevice::WriteOnly) {
-+    if( mode() & QIODevice::WriteOnly) {
-         ok = d->writeBackTempFile( fileName() );
-         delete d->tmpFile;
-         d->tmpFile = 0;
-Index: kio/kio/kdirwatch.cpp
-===================================================================
---- kio/kio/kdirwatch.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/kdirwatch.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -500,6 +500,18 @@
-   return ret;
  }
  
-+QDebug operator<<(QDebug debug, const KDirWatchPrivate::Entry &entry)
-+{
-+  debug.space() << entry.path << (entry.isDir ? "dir" : "file");
-+  if (entry.m_status == KDirWatchPrivate::NonExistent)
-+    debug << "NonExistent";
-+  debug << "mode:" << entry.m_mode
-+        << entry.m_clients.count() << "clients";
-+  if (!entry.m_entries.isEmpty())
-+    debug << entry.m_entries.count() << "nonexistent entries";
-+  return debug;
-+}
-+
- KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const QString& _path)
+-QString KTranslit::higherPriorityScript (const QString &lang,
+-                                         const KLocale *locale)
++void KTranslit::splitToBaseAndScript (const QString &lang,
++                                      const KLocale *locale,
++                                      QString &blang, QString &lscr)
  {
- // we only support absolute paths
-@@ -1257,19 +1269,22 @@
-     c->pending = NoChange;
-     if (event == NoChange) continue;
-+    // Emit the signals delayed, to avoid unexpected re-entrancy from the slots (#220153)
-+    
-     if (event & Deleted) {
--      c->instance->setDeleted(path);
-+      QMetaObject::invokeMethod(c->instance, "setDeleted", Qt::QueuedConnection, Q_ARG(QString, path));
-       // emit only Deleted event...
-       continue;
-     }
+-    if (locale == NULL) {
+-        return QString();
+-    }
++    blang = lang;
++    lscr = "";
  
-     if (event & Created) {
--      c->instance->setCreated(path);
-+      QMetaObject::invokeMethod(c->instance, "setCreated", Qt::QueuedConnection, Q_ARG(QString, path));
-       // possible emit Change event after creation
+-    // Split into pure language and script part.
+-    QString ln, scr;
+-    splitLangScript(lang, ln, scr);
+-
+-    // Search through higher priority languages.
+-    QString finalScrHi;
+-    if (lang != KLocale::defaultLanguage()) {
+-        foreach (const QString &langHi, locale->languageList()) {
+-            // Don't search lower priority languages.
+-            if (langHi == lang)
+-                break;
+-
+-            // Split current spec into pure language and script parts.
+-            QString lnHi, scrHi;
+-            splitLangScript(langHi, lnHi, scrHi);
+-
+-            // Return current script if languages match.
+-            if (lnHi == ln) {
+-                finalScrHi = scrHi;
+-                break;
++    if (lang == QString::fromAscii("sr") || lang.startsWith(QString::fromAscii("sr@"))) {
++        QString langHi = lang;
++        if (locale) {
++            foreach (const QString &l, locale->languageList()) {
++                if (l.startsWith(QString::fromAscii("sr@"))) {
++                    langHi = l;
++                    break;
++                }
+             }
+         }
++        splitLangScript(langHi, blang, lscr);
      }
--    if (event & Changed)
--      c->instance->setDirty(path);
-+    if (event & Changed) {
-+      QMetaObject::invokeMethod(c->instance, "setDirty", Qt::QueuedConnection, Q_ARG(QString, path));
-+    }
-   }
+-    return finalScrHi;
  }
  
-Index: kio/kio/kdirwatch_p.h
-===================================================================
---- kio/kio/kdirwatch_p.h      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/kdirwatch_p.h      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -266,5 +266,7 @@
-   bool _isStopped;
- };
+ QString KTranslit::transliterate (const QString &str,
+@@ -341,6 +329,7 @@
+     SR_DICTI2E_ENTRY("ит", "ет");
+     SR_DICTI2E_ENTRY("јел", "ео");
+     SR_DICTI2E_ENTRY("тн", "тњ");
++    SR_DICTI2E_ENTRY("шње", "сне");
+     // derived mappings
+     for (int i = 0; i < d->dictI2Es.size(); ++i) {
+         QHash<QString, QString> &dictI2E = d->dictI2Es[i];
+Index: kdecore/network/ConfigureChecks.cmake
+===================================================================
+--- kdecore/network/ConfigureChecks.cmake      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/network/ConfigureChecks.cmake      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -8,6 +8,7 @@
+ macro_push_required_vars()
+   set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
++  set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};${QT_QTCORE_LIBRARY};${QT_QTNETWORK_LIBRARY}")
+   if (QT_USE_FRAMEWORKS)
+     set(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
+   endif (QT_USE_FRAMEWORKS)
+Index: kdecore/auth/ConfigureChecks.cmake
+===================================================================
+--- kdecore/auth/ConfigureChecks.cmake (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/ConfigureChecks.cmake (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -101,7 +101,7 @@
+         auth/backends/mac/AuthServicesBackend.cpp
+     )
+-    set(KAUTH_BACKEND_LIBS ${SECURITY_LIBRARY})
++    set(KAUTH_BACKEND_LIBS ${SECURITY_LIBRARY} ${QT_QTCORE_LIBRARY})
+ elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
+     set (KAUTH_COMPILING_POLKITQT_BACKEND TRUE)
+@@ -113,7 +113,7 @@
+        auth/backends/policykit/PolicyKitBackend.cpp
+     )
+-    set(KAUTH_BACKEND_LIBS ${POLKITQT_CORE_LIBRARY})
++    set(KAUTH_BACKEND_LIBS ${POLKITQT_CORE_LIBRARY} ${QT_QTCORE_LIBRARY})
+     set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT_POLICY_FILES_INSTALL_DIR} CACHE STRING 
+         "Where policy files generated by KAuth will be installed" FORCE)
+@@ -128,7 +128,7 @@
+         auth/backends/polkit-1/Polkit1Backend.cpp
+     )
  
-+QDebug operator<<(QDebug debug, const KDirWatchPrivate::Entry &entry);
-+
- #endif // KDIRWATCH_P_H
+-    set(KAUTH_BACKEND_LIBS ${POLKITQT-1_CORE_LIBRARY})
++    set(KAUTH_BACKEND_LIBS ${POLKITQT-1_CORE_LIBRARY} ${QT_QTCORE_LIBRARY})
  
-Index: kio/kio/kfileshare.cpp
-===================================================================
---- kio/kio/kfileshare.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/kfileshare.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -215,7 +215,7 @@
+     set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT-1_POLICY_FILES_INSTALL_DIR} CACHE STRING 
+         "Where policy files generated by KAuth will be installed" FORCE)
+@@ -136,12 +136,8 @@
+     set (KAUTH_COMPILING_FAKE_BACKEND TRUE)
  
- bool KFileShare::isDirectoryShared( const QString& _path )
+     message(STATUS "Building Fake KAuth backend")
+-    message("WARNING: KAuth will be built with Fake backend. The library will not work properly unless compiled with
++    message("WARNING: No valid KAuth backends will be built. The library will not work properly unless compiled with
+              a working backend")
+-
+-    set(KAUTH_BACKEND_SRCS ${KAUTH_BACKEND_SRCS}
+-       auth/backends/fake/FakeBackend.cpp
+-    )
+ endif()
+ # KAuth policy generator executable source probing
+@@ -159,32 +155,70 @@
+ elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
+   set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS}
+       auth/backends/polkit-1/kauth-policy-gen-polkit1.cpp )
+-else()
+-  set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS}
+-      auth/backends/fake/kauth-policy-gen-polkit.cpp )
+ endif()
+-# Helper backend
+-# No selection, we have DBus only
++########################
++# Helper backend probing
+-set (KAUTH_COMPILING_DBUS_HELPER_BACKEND TRUE)
++set(KDE4_AUTH_HELPER_BACKEND_NAME "" CACHE STRING "Specifies the KAuth helper backend to build. Current available options are
++                                   DBus, Fake. Not setting this variable will build the most appropriate backend for your system")
+-qt4_add_dbus_adaptor(kauth_dbus_adaptor_SRCS
+-                     auth/backends/dbus/org.kde.auth.xml
+-                     auth/backends/dbus/DBusHelperProxy.h
+-                     KAuth::DBusHelperProxy)
++set(KAUTH_HELPER_BACKEND ${KDE4_AUTH_HELPER_BACKEND_NAME})
+-set(KAUTH_HELPER_BACKEND_SRCS
+-   auth/backends/dbus/DBusHelperProxy.cpp
+-   ${kauth_dbus_adaptor_SRCS}
+-)
++if(NOT KAUTH_HELPER_BACKEND)
++    # No checks needed, just set the dbus backend
++    set(KAUTH_HELPER_BACKEND "DBus")
++    string(TOUPPER ${KAUTH_HELPER_BACKEND} KAUTH_HELPER_BACKEND_UPPER)
++    set (KAUTH_HELPER_BACKEND ${KAUTH_HELPER_BACKEND_UPPER})
++else(NOT KAUTH_HELPER_BACKEND)
++    # No checks needed here either
++    string(TOUPPER ${KAUTH_HELPER_BACKEND} KAUTH_HELPER_BACKEND_UPPER)
++    set (KAUTH_HELPER_BACKEND ${KAUTH_HELPER_BACKEND_UPPER})
++endif(NOT KAUTH_HELPER_BACKEND)
+-# Install some files as well
+-install( FILES auth/backends/dbus/org.kde.auth.conf
+-         DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
++set(KDE4_AUTH_HELPER_BACKEND_NAME ${KAUTH_HELPER_BACKEND} CACHE STRING "Specifies the KAuth helper backend to build. Current
++                                                            available options are DBus, Fake. Not setting this variable will
++                                                            build the most appropriate backend for your system" FORCE)
+-install( FILES auth/backends/dbus/dbus_policy.stub
+-               auth/backends/dbus/dbus_service.stub
+-         DESTINATION ${DATA_INSTALL_DIR}/kauth COMPONENT Devel)
++# Add the correct libraries/files depending on the backend
++if(KDE4_AUTH_HELPER_BACKEND_NAME STREQUAL "DBUS")
++    set (KAUTH_COMPILING_DBUS_HELPER_BACKEND TRUE)
++    qt4_add_dbus_adaptor(kauth_dbus_adaptor_SRCS
++                        auth/backends/dbus/org.kde.auth.xml
++                        auth/backends/dbus/DBusHelperProxy.h
++                        KAuth::DBusHelperProxy)
++
++    set(KAUTH_HELPER_BACKEND_SRCS
++        auth/backends/dbus/DBusHelperProxy.cpp
++        ${kauth_dbus_adaptor_SRCS}
++    )
++
++    set(KAUTH_HELPER_BACKEND_LIBS kdecore)
++
++    # Install some files as well
++    install( FILES auth/backends/dbus/org.kde.auth.conf
++             DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
++
++    install( FILES auth/backends/dbus/dbus_policy.stub
++                   auth/backends/dbus/dbus_service.stub
++             DESTINATION ${DATA_INSTALL_DIR}/kauth COMPONENT Devel)
++elseif(KDE4_AUTH_HELPER_BACKEND_NAME STREQUAL "FAKE")
++    set (KAUTH_COMPILING_FAKE_HELPER_BACKEND TRUE)
++
++    message("WARNING: No valid KAuth helper backends will be built. The library will not work properly unless compiled with
++             a working backend")
++endif()
++
++
++# Set directories for plugins
++if(NOT WIN32)
++_set_fancy(KAUTH_HELPER_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}/plugins/kauth/helper" "Where KAuth's helper plugin will be installed")
++_set_fancy(KAUTH_BACKEND_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}/plugins/kauth/backend" "Where KAuth's backend plugin will be installed")
++#set(KAUTH_OTHER_PLUGIN_DIR "${QT_PLUGINS_DIR}/kauth/plugins")
++else(NOT WIN32)
++set(KAUTH_HELPER_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}/plugins/kauth/helper")
++set(KAUTH_BACKEND_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}/plugins/kauth/backend")
++endif(NOT WIN32)
++
+ ## End
+Index: kdecore/auth/BackendsManager.cpp
+===================================================================
+--- kdecore/auth/BackendsManager.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/BackendsManager.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -21,29 +21,13 @@
+ #include "BackendsConfig.h"
+-// Here comes all the logic for compiling the chosen backends
+-#ifdef KAUTH_COMPILING_OSX_BACKEND
+-#include "backends/mac/AuthServicesBackend.h"
+-typedef KAuth::AuthServicesBackend KAuthAuthBackend;
+-#endif
+-#ifdef KAUTH_COMPILING_POLKITQT_BACKEND
+-#include "backends/policykit/PolicyKitBackend.h"
+-typedef KAuth::PolicyKitBackend KAuthAuthBackend;
+-#endif
+-#ifdef KAUTH_COMPILING_POLKITQT1_BACKEND
+-#include "backends/polkit-1/Polkit1Backend.h"
+-typedef KAuth::Polkit1Backend KAuthAuthBackend;
+-#endif
+-#ifdef KAUTH_COMPILING_FAKE_BACKEND
++// Include fake backends
+ #include "backends/fake/FakeBackend.h"
+-typedef KAuth::FakeBackend KAuthAuthBackend;
+-#endif
++#include "backends/fakehelper/FakeHelperProxy.h"
+-// Helper backends
+-#ifdef KAUTH_COMPILING_DBUS_HELPER_BACKEND
+-#include "backends/dbus/DBusHelperProxy.h"
+-typedef KAuth::DBusHelperProxy KAuthHelperBackend;
+-#endif
++#include <QPluginLoader>
++#include <QDir>
++#include <kdebug.h>
+ namespace KAuth
+ {
+@@ -55,14 +39,81 @@
  {
--    if ( ! s_shareList )
-+    if ( ! s_shareList.exists() )
-         readShareList();
-     QString path( _path );
-Index: kio/kio/scheduler.cpp
-===================================================================
---- kio/kio/scheduler.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/scheduler.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -97,7 +97,6 @@
-     SchedulerPrivate() :
-         q(new Scheduler),
--        busy( false ),
-         slaveOnHold( 0 ),
-         slaveConfig( SlaveConfig::self() ),
-         sessionData( new SessionData ),
-@@ -124,7 +123,6 @@
-     QTimer slaveTimer;
-     QTimer coSlaveTimer;
-     QTimer cleanupTimer;
--    bool busy;
-     ProtocolInfoDict protInfoDict;
-     Slave *slaveOnHold;
-@@ -190,6 +188,7 @@
-         SlaveList list (coSlaves.keys());
-         qDeleteAll(list.begin(), list.end());
-+        scheduledSlaves.clear();
-     }
-     Slave* findJobCoSlave(SimpleJob* job) const
-@@ -251,7 +250,7 @@
-         if (!host.isEmpty())
-         {
--            QListIterator<SlavePtr> it (activeSlaves);
-+            QListIterator<SlavePtr> it (scheduledSlaves);
-             while (it.hasNext())
-             {
-                 if (host == it.next()->host())
-@@ -261,7 +260,7 @@
-             QString url = job->url().url();
-             if (reserveList.contains(url)) {
--                kDebug() << "*** Removing paired request for: " << url;
-+                kDebug(7006) << "*** Removing paired request for: " << url;
-                 reserveList.removeOne(url);
-             } else {
-                 count += reserveList.count();
-@@ -274,6 +273,7 @@
-     QStringList reserveList;
-     QList<SimpleJob *> joblist;
-     SlaveList activeSlaves;
-+    SlaveList scheduledSlaves;
-     SlaveList idleSlaves;
-     CoSlaveMap coSlaves;
-     SlaveList coIdleSlaves;
-@@ -288,13 +288,13 @@
-   const int numActiveSlaves = protInfo->activeSlaveCountFor(job);
- #if 0
--    kDebug() << job->url() << ": ";
--    kDebug() << "    protocol :" << job->url().protocol()
--             << ", max :" << protInfo->maxSlaves
--             << ", max/host :" << protInfo->maxSlavesPerHost
--             << ", active :" << protInfo->activeSlaves.count()
--             << ", idle :" << protInfo->idleSlaves.count()
--             << ", active for " << job->url().host() << " = " << numActiveSlaves;
-+    kDebug(7006) << job->url() << ": ";
-+    kDebug(7006) << "    protocol :" << job->url().protocol()
-+                 << ", max :" << protInfo->maxSlaves
-+                 << ", max/host :" << protInfo->maxSlavesPerHost
-+                 << ", active :" << protInfo->scheduledSlaves.count()
-+                 << ", idle :" << protInfo->idleSlaves.count()
-+                 << ", active for " << job->url().host() << " = " << numActiveSlaves;
- #endif
-   return (protInfo->maxSlavesPerHost < 1 || protInfo->maxSlavesPerHost > numActiveSlaves);
-@@ -477,7 +477,7 @@
-     slaveTimer.start(0);
- #ifndef NDEBUG
-     if (newJobs.count() > 150)
--        kDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a QObject).";
-+        kDebug(7006) << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a QObject).";
- #endif
  }
  
-@@ -526,11 +526,22 @@
-        (void) startJobDirect();
-     }
-+    int queuedJobCount = 0;
-     QHashIterator<QString, ProtocolInfo*> it(protInfoDict);
++QList< QObject* > BackendsManager::retrieveInstancesIn(const QString& path)
++{
++    QDir pluginPath(path);
 +
-     while(it.hasNext()) {
-        it.next();
-        if (startJobScheduled(it.value())) return;
-+       queuedJobCount += it.value()->joblist.count();
-     }
++    if (!pluginPath.exists()) {
++        return QList< QObject* >();
++    }
++
++    QFileInfoList entryList = pluginPath.entryInfoList(QDir::NoDotAndDotDot | QDir::Files);
++
++    if (entryList.isEmpty()) {
++        return QList< QObject* >();
++    }
++
++    QList< QObject* > retlist;
++
++    foreach(const QFileInfo &fi, entryList) {
++        QString filePath = fi.filePath(); // file name with path
++        QString fileName = fi.fileName(); // just file name
++
++        if(!QLibrary::isLibrary(filePath)) {
++            continue;
++        }
++
++        QString errstr;
++        QPluginLoader loader(filePath);
++        QObject *instance = loader.instance();
++        if (instance) {
++            retlist.append(instance);
++        }
++    }
++
++    return retlist;
++}
++
+ void BackendsManager::init()
+ {
+-    // Beware: here comes all the logic for loading the correct backend
+-    auth = new KAuthAuthBackend;
+-    helper = new KAuthHelperBackend;
++    // Backend plugin
++    QList< QObject* > backends = retrieveInstancesIn(KAUTH_BACKEND_PLUGIN_DIR);
+-    Q_ASSERT_X(auth, __FUNCTION__, "No AuthBackend found.");
+-    Q_ASSERT_X(helper, __FUNCTION__, "No HelperBackend found.");
++    foreach (QObject *instance, backends) {
++        auth = qobject_cast< KAuth::AuthBackend* >(instance);
++        if (auth) {
++            break;
++        }
++    }
++
++    // Helper plugin
++    QList< QObject* > helpers = retrieveInstancesIn(KAUTH_HELPER_PLUGIN_DIR);
++
++    foreach (QObject *instance, helpers) {
++        helper = qobject_cast< KAuth::HelperProxy* >(instance);
++        if (helper) {
++            break;
++        }
++    }
++
++    if (!auth) {
++        // Load the fake auth backend then
++        auth = new FakeBackend;
++#ifndef KAUTH_COMPILING_FAKE_BACKEND
++        // Spit a fat warning
++        kWarning() << "WARNING: KAuth was compiled with a working backend, but was unable to load it! Check your installation!";
++#endif
++    }
 +
-+    // If we still have jobs that are waiting to be scheduled and slaveTimer is
-+    // not active, start the timer. Not that the timer is started with a 1 sec
-+    // delay to avoid pegging the CPU...
-+    if (queuedJobCount > 0 && !slaveTimer.isActive()) {
-+       //kDebug(7006) << queuedJobCount << "jobs waiting to be scheduled...";
-+       slaveTimer.start(1000);
++    if (!helper) {
++        // Load the fake helper backend then
++        helper = new FakeHelperProxy;
++#ifndef KAUTH_COMPILING_FAKE_BACKEND
++        // Spit a fat warning
++        kWarning() << "WARNING: KAuth was compiled with a working helper backend, but was unable to load it! "
++                      "Check your installation!";
++#endif
 +    }
  }
  
- void SchedulerPrivate::setupSlave(KIO::Slave *slave, const KUrl &url, const QString &protocol, const QString &proxy , bool newSlave, const KIO::MetaData *config)
-@@ -639,8 +650,6 @@
-        slave = createSlave(protInfo, job, job->url(), true);
-        if (slave)
-           newSlave = true;
--       else
--          slaveTimer.start(0);
-     }
+ AuthBackend *BackendsManager::authBackend()
+Index: kdecore/auth/BackendsManager.h
+===================================================================
+--- kdecore/auth/BackendsManager.h     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/BackendsManager.h     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -22,11 +22,12 @@
  
-     if (!slave)
-@@ -658,11 +667,12 @@
-     KUrl url = pairedRequest(job);
-     if (url.isValid())
-     {
--        kDebug() << "*** PAIRED REQUEST: " << url;
-+        kDebug(7006) << "*** PAIRED REQUEST: " << url;
-         protInfoDict.get(url.protocol())->reserveList << url.url();
-     }
+ #include "AuthBackend.h"
+ #include "HelperProxy.h"
++#include <kdecore_export.h>
  
-     protInfo->activeSlaves.append(slave);
-+    protInfo->scheduledSlaves.append(slave);
-     protInfo->idleSlaves.removeAll(slave);
-     protInfo->joblist.removeOne(job);
- //        kDebug(7006) << "scheduler: job started " << job;
-@@ -744,8 +754,7 @@
+ namespace KAuth
  {
-     Slave *slave = 0;
--    if (true /* ### temporary workaround for #224857*/ ||
--        !enforceLimits || checkLimits(protInfo, job))
-+    if (!enforceLimits || checkLimits(protInfo, job))
-     {
-         KIO::SimpleJobPrivate *const jobPriv = SimpleJobPrivate::get(job);
  
-@@ -801,7 +810,7 @@
-                                      const KUrl &url, bool enforceLimits)
+-class BackendsManager
++class KDECORE_EXPORT BackendsManager
  {
-    Slave *slave = 0;
--   const int slavesCount = protInfo->activeSlaves.count() + protInfo->idleSlaves.count();
-+   const int slavesCount = protInfo->scheduledSlaves.count() + protInfo->idleSlaves.count();
-    if (!enforceLimits ||
-        (protInfo->maxSlaves > slavesCount && checkLimits(protInfo, job)))
-@@ -843,6 +852,7 @@
-     ProtocolInfo *protInfo = protInfoDict.get(jobPriv->m_protocol);
-     slave->disconnect(job);
-     protInfo->activeSlaves.removeAll(slave);
-+    protInfo->scheduledSlaves.removeAll(slave);
-     if (slave->isAlive())
-     {
-        JobList *list = protInfo->coSlaves.value(slave);
-@@ -875,6 +885,7 @@
-     assert(!slave->isAlive());
-     ProtocolInfo *protInfo = protInfoDict.get(slave->slaveProtocol());
-     protInfo->activeSlaves.removeAll(slave);
-+    protInfo->scheduledSlaves.removeAll(slave);
-     if (slave == slaveOnHold)
-     {
-        slaveOnHold = 0;
-Index: kio/kio/accessmanager.cpp
-===================================================================
---- kio/kio/accessmanager.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kio/accessmanager.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -37,7 +37,9 @@
- #include <QtDBus/QDBusConnection>
- #include <QtDBus/QDBusReply>
+     static AuthBackend *auth;
+     static HelperProxy *helper;
+@@ -38,6 +39,7 @@
  
-+#define QL1S(x)     QLatin1String(x)
-+
- namespace KIO {
+ private:
+     static void init();
++    static QList<QObject*> retrieveInstancesIn(const QString &path);
+ };
  
- class AccessManager::AccessManagerPrivate
-@@ -96,7 +98,7 @@
-     KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar());
-     if (jar) {
-         jar->setWindowId(id);
--        d->sessionMetaData.insert(QLatin1String("window-id"), QString::number((qlonglong)id));
-+        d->sessionMetaData.insert(QL1S("window-id"), QString::number((qlonglong)id));
-     }
- }
+ } // namespace Auth
+Index: kdecore/auth/BackendsConfig.h.cmake
+===================================================================
+--- kdecore/auth/BackendsConfig.h.cmake        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/BackendsConfig.h.cmake        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -3,4 +3,7 @@
+ #cmakedefine KAUTH_COMPILING_POLKITQT1_BACKEND 1
+ #cmakedefine KAUTH_COMPILING_FAKE_BACKEND 1
+ #cmakedefine KAUTH_COMPILING_DBUS_HELPER_BACKEND 1
+-
++#cmakedefine KAUTH_COMPILING_FAKE_HELPER_BACKEND 1
++#define KAUTH_BACKEND_PLUGIN_DIR "${KAUTH_BACKEND_PLUGIN_DIR}"
++#define KAUTH_HELPER_PLUGIN_DIR "${KAUTH_HELPER_PLUGIN_DIR}"
++#define KAUTH_OTHER_PLUGIN_DIR "${KAUTH_OTHER_PLUGIN_DIR}"
+Index: kdecore/auth/backends/mac/AuthServicesBackend.cpp
+===================================================================
+--- kdecore/auth/backends/mac/AuthServicesBackend.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/backends/mac/AuthServicesBackend.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -20,6 +20,8 @@
+ #include "AuthServicesBackend.h"
+ #include <Security/Security.h>
  
-@@ -122,32 +124,36 @@
- QNetworkReply *AccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
++#include <QtCore/qplugin.h>
++
+ namespace KAuth
  {
-     KIO::SimpleJob *kioJob = 0;
-+    const QUrl reqUrl (req.url());
--    if ( !d->isRequestAllowed(req.url()) ) {
--        kDebug( 7044 ) << "Blocked: " << req.url();
-+    if ( !d->isRequestAllowed(reqUrl) ) {
-+        kDebug( 7044 ) << "Blocked: " << reqUrl;
-         /* if kioJob equals zero, the AccessManagerReply will block the request */
-         return new KDEPrivate::AccessManagerReply(op, req, kioJob, this);
-     }
-     switch (op) {
-         case HeadOperation: {
--            kDebug( 7044 ) << "HeadOperation:" << req.url();
--            kioJob = KIO::mimetype(req.url(), KIO::HideProgressInfo);
-+            kDebug( 7044 ) << "HeadOperation:" << reqUrl;
-+            kioJob = KIO::mimetype(reqUrl, KIO::HideProgressInfo);
-             break;
-         }
-         case GetOperation: {
--            kDebug( 7044 ) << "GetOperation:" << req.url();
--            kioJob = KIO::get(req.url(), KIO::NoReload, KIO::HideProgressInfo);
-+            kDebug( 7044 ) << "GetOperation:" << reqUrl;
-+            if (!reqUrl.path().isEmpty() || reqUrl.host().isEmpty())
-+                kioJob = KIO::get(reqUrl, KIO::NoReload, KIO::HideProgressInfo);
-+            else
-+                kioJob = KIO::stat(reqUrl, KIO::HideProgressInfo);
-             break;
-         }
-         case PutOperation: {
--            kDebug( 7044 ) << "PutOperation:" << req.url();
--            kioJob = KIO::put(req.url(), -1, KIO::HideProgressInfo);
-+            kDebug( 7044 ) << "PutOperation:" << reqUrl;
-+            kioJob = KIO::put(reqUrl, -1, KIO::HideProgressInfo);
-             break;
-         }
-         case PostOperation: {
--            kDebug( 7044 ) << "PostOperation:" << req.url();
--            kioJob = KIO::http_post(req.url(), outgoingData->readAll(), KIO::HideProgressInfo);
-+            kDebug( 7044 ) << "PostOperation:" << reqUrl;
-+            kioJob = KIO::http_post(reqUrl, outgoingData->readAll(), KIO::HideProgressInfo);
-             break;
-         }
-         default:
-@@ -164,11 +170,11 @@
-     if ( op == PostOperation && !kioJob->metaData().contains("content-type"))  {
-         QVariant header = req.header(QNetworkRequest::ContentTypeHeader);
-         if (header.isValid())
--          kioJob->addMetaData(QLatin1String("content-type"),
-+          kioJob->addMetaData(QL1S("content-type"),
-                               QString::fromLatin1("Content-Type: %1").arg(header.toString()));
-         else
--          kioJob->addMetaData(QLatin1String("content-type"),
--                              QLatin1String("Content-Type: application/x-www-form-urlencoded"));
-+          kioJob->addMetaData(QL1S("content-type"),
-+                              QL1S("Content-Type: application/x-www-form-urlencoded"));
-     }
-     return reply;
-@@ -197,12 +203,12 @@
-     }
  
-     if (request.hasRawHeader("Referer")) {
--        metaData.insert("referrer", request.rawHeader("Referer"));
-+        metaData.insert(QL1S("referrer"), request.rawHeader("Referer"));
-         request.setRawHeader("Referer", QByteArray());
-     }
+@@ -120,3 +122,5 @@
+ }
  
-     if (request.hasRawHeader("Content-Type")) {
--        metaData.insert("content-type", request.rawHeader("Content-Type"));
-+        metaData.insert(QL1S("content-type"), request.rawHeader("Content-Type"));
-         request.setRawHeader("Content-Type", QByteArray());
-     }
+ }; // namespace KAuth
++
++Q_EXPORT_PLUGIN2(kauth_backend, KAuth::AuthServicesBackend)
+Index: kdecore/auth/backends/polkit-1/Polkit1Backend.cpp
+===================================================================
+--- kdecore/auth/backends/polkit-1/Polkit1Backend.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/backends/polkit-1/Polkit1Backend.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -21,7 +21,7 @@
  
-@@ -239,7 +245,7 @@
- {
-     const QString scheme (url.scheme());
+ #include "Polkit1Backend.h"
  
--    return (externalContentAllowed || scheme == QLatin1String("file")  || scheme == QLatin1String("data"));
-+    return (externalContentAllowed || scheme == QL1S("file")  || scheme == QL1S("data"));
+-#include <QDebug>
++#include <QtCore/qplugin.h>
+ #include <syslog.h>
+ #include <PolkitQt1/Authority>
+ #include <PolkitQt1/Subject>
+@@ -108,3 +108,5 @@
  }
  
-Index: kio/kfile/kdiskfreespaceinfo.cpp
-===================================================================
---- kio/kfile/kdiskfreespaceinfo.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/kfile/kdiskfreespaceinfo.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -133,8 +133,9 @@
-     // Prefer mountPoint if available, so that it even works with non-existing files.
-     const QString pathArg = info.d->mountPoint.isEmpty() ? path : info.d->mountPoint;
-     if (!statvfs(QFile::encodeName(pathArg).constData(), &statvfs_buf)) {
--        info.d->available = statvfs_buf.f_bavail * statvfs_buf.f_bsize;
--        info.d->size = statvfs_buf.f_blocks * statvfs_buf.f_bsize;
-+        const quint64 blksize = quint64(statvfs_buf.f_bsize); // cast to avoid overflow
-+        info.d->available = statvfs_buf.f_bavail * blksize;
-+        info.d->size = statvfs_buf.f_blocks * blksize;
-         info.d->valid = true;
-     }
- #endif
-Index: kio/tests/kdirwatch_unittest.cpp
+ } // namespace Auth
++
++Q_EXPORT_PLUGIN2(kauth_backend, KAuth::Polkit1Backend)
+Index: kdecore/auth/backends/fake/FakeBackend.cpp
 ===================================================================
---- kio/tests/kdirwatch_unittest.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/tests/kdirwatch_unittest.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -35,14 +35,21 @@
-         m_path = m_tempDir.name();
-     }
+--- kdecore/auth/backends/fake/FakeBackend.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/backends/fake/FakeBackend.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -19,8 +19,6 @@
  
--private Q_SLOTS:
-+private Q_SLOTS: // test methods
-     void touchOneFile();
-+    void watchAndModifyOneFile();
-     void touch1000Files();
-     void removeAndReAdd();
-+    void nestedEventLoop();
-+protected Q_SLOTS: // internal slots
-+    void nestedEventLoopSlot();
-+    
- private:
-     QList<QVariantList> waitForDirtySignal(KDirWatch& dw, int expected);
--    void createFile(int num);
-+    QString createFile(int num);
-+    void appendToFile(int num);
-+    
-     KTempDir m_tempDir;
-     QString m_path;
- };
-@@ -53,15 +60,26 @@
- static const char* s_filePrefix = "This_is_a_test_file_";
+ #include "FakeBackend.h"
  
- // helper method
--void KDirWatch_UnitTest::createFile(int num)
-+QString KDirWatch_UnitTest::createFile(int num)
+-#include <syslog.h>
+-
+ namespace KAuth
  {
-     const QString fileName = s_filePrefix + QString::number(num);
-     QFile file(m_path + fileName);
--    QVERIFY(file.open(QIODevice::WriteOnly));
-+    bool ok = file.open(QIODevice::WriteOnly);
-+    Q_ASSERT(ok);
-     file.write(QByteArray("foo"));
-     file.close();
-+    return m_path + fileName;
- }
  
-+void KDirWatch_UnitTest::appendToFile(int num)
+Index: kdecore/auth/backends/fakehelper/FakeHelperProxy.cpp
+===================================================================
+--- kdecore/auth/backends/fakehelper/FakeHelperProxy.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 0)
++++ kdecore/auth/backends/fakehelper/FakeHelperProxy.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -0,0 +1,88 @@
++/*
++*   Copyright (C) 2010 Dario Freddi <drf@kde.org>
++*
++*   This program is free software; you can redistribute it and/or modify
++*   it under the terms of the GNU Lesser General Public License as published by
++*   the Free Software Foundation; either version 2.1 of the License, or
++*   (at your option) any later version.
++*
++*   This program is distributed in the hope that it will be useful,
++*   but WITHOUT ANY WARRANTY; without even the implied warranty of
++*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++*   GNU General Public License for more details.
++*
++*   You should have received a copy of the GNU Lesser General Public License
++*   along with this program; if not, write to the
++*   Free Software Foundation, Inc.,
++*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .
++*/
++
++#include "FakeHelperProxy.h"
++
++namespace KAuth {
++
++FakeHelperProxy::FakeHelperProxy()
++        : HelperProxy()
 +{
-+    const QString fileName = s_filePrefix + QString::number(num);
-+    QFile file(m_path + fileName);
-+    QVERIFY(file.open(QIODevice::Append | QIODevice::WriteOnly));
-+    file.write(QByteArray("foobar"));
-+    file.close();
++
 +}
 +
- // helper method
- QList<QVariantList> KDirWatch_UnitTest::waitForDirtySignal(KDirWatch& watch, int expected)
- {
-@@ -78,18 +96,35 @@
-     return spyDirty;
- }
--void KDirWatch_UnitTest::touchOneFile()
-+void KDirWatch_UnitTest::touchOneFile() // watch a dir, create a file in it
- {
-     KDirWatch watch;
-     watch.addDir(m_path);
-     watch.startScan();
--    createFile(0);
-+    const QString file0 = createFile(0);
-     QList<QVariantList> spy = waitForDirtySignal(watch, 1);
-     QVERIFY(spy.count() >= 1);
--    QCOMPARE(spy[0][0].toString(), m_path + s_filePrefix + "0");
-+    QCOMPARE(spy[0][0].toString(), file0);
- }
-+void KDirWatch_UnitTest::watchAndModifyOneFile() // watch a specific file, and modify it
++FakeHelperProxy::~FakeHelperProxy()
 +{
-+    KDirWatch watch;
-+    const QString file = createFile(0);
-+    watch.addFile(file);
-+    watch.startScan();
-+
-+    // Make sure KDirWatch treats the modification as one
-+    QTest::qWait(1000);
 +
-+    appendToFile(0);
++}
 +
-+    QList<QVariantList> spy = waitForDirtySignal(watch, 1);
-+    QVERIFY(spy.count() >= 1);
-+    QCOMPARE(spy[0][0].toString(), file);
++void FakeHelperProxy::sendProgressStep(const QVariantMap& step)
++{
++    Q_UNUSED(step)
 +}
 +
- void KDirWatch_UnitTest::touch1000Files()
- {
-     KDirWatch watch;
-@@ -118,10 +153,56 @@
-     // Just like KDirLister does: remove the watch, then re-add it.
-     watch.removeDir(m_path);
-     watch.addDir(m_path);
--    createFile(1);
-+    const QString file1 = createFile(1);
-     spy = waitForDirtySignal(watch, 1);
-     QVERIFY(spy.count() >= 1);
--    QCOMPARE(spy[0][0].toString(), m_path + s_filePrefix + "1");
-+    QCOMPARE(spy[0][0].toString(), file1);
- }
-+void KDirWatch_UnitTest::nestedEventLoop() // #220153: watch two files, and modify 2nd while in slot for 1st
++void FakeHelperProxy::sendProgressStep(int step)
 +{
-+    KDirWatch watch;
-+
-+    const QString file0 = createFile(0);
-+    watch.addFile(file0);
-+    const QString file1 = createFile(1);
-+    watch.addFile(file1);
-+    watch.startScan();
-+
-+    // Make sure KDirWatch treats the modification as one
-+    QTest::qWait(1000);
-+
-+    appendToFile(0);
-+
-+    // use own spy, to connect it before nestedEventLoopSlot, otherwise it reverses order
-+    QSignalSpy spyDirty(&watch, SIGNAL(dirty(QString)));
-+    connect(&watch, SIGNAL(dirty(QString)), this, SLOT(nestedEventLoopSlot()));
-+    waitForDirtySignal(watch, 1);
-+    QVERIFY(spyDirty.count() >= 2);
-+    QCOMPARE(spyDirty[0][0].toString(), file0);
-+    QCOMPARE(spyDirty[spyDirty.count()-1][0].toString(), file1);
++    Q_UNUSED(step)
 +}
 +
-+void KDirWatch_UnitTest::nestedEventLoopSlot()
++void FakeHelperProxy::sendDebugMessage(int level, const char* msg)
 +{
-+    const KDirWatch* const_watch = qobject_cast<const KDirWatch *>(sender());
-+    KDirWatch* watch = const_cast<KDirWatch *>(const_watch);
-+    // let's not come in this slot again
-+    disconnect(watch, SIGNAL(dirty(QString)), this, SLOT(nestedEventLoopSlot()));
-+
-+    appendToFile(1);
-+    kDebug() << "now waiting for signal";
-+    // The nested event processing here was from a messagebox in #220153
-+    QList<QVariantList> spy = waitForDirtySignal(*watch, 1);
-+    QVERIFY(spy.count() >= 1);
-+    const QString file1 = m_path + s_filePrefix + "1";
-+    QCOMPARE(spy[spy.count()-1][0].toString(), file1);
-+    kDebug() << "done";
-+
-+    // Now the user pressed reload...
-+    const QString file0 = m_path + s_filePrefix + "0";
-+    watch->removeFile(file0);
-+    watch->addFile(file0);
++    Q_UNUSED(level)
++    Q_UNUSED(msg)
 +}
 +
- #include "kdirwatch_unittest.moc"
-Index: kio/tests/karchivetest.cpp
-===================================================================
---- kio/tests/karchivetest.cpp (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/tests/karchivetest.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -19,6 +19,7 @@
- #include "karchivetest.h"
-+#include <kmimetype.h>
- #include "karchivetest.moc"
- #include <ktar.h>
- #include <kzip.h>
-@@ -200,6 +201,12 @@
-     QVERIFY(e && e->isDirectory());
- }
-+static void testReadWrite( KArchive* archive )
++bool FakeHelperProxy::hasToStopAction()
 +{
-+    bool ok = archive->writeFile( "newfile", "dfaure", "users", "New File", 8, 0100440 );
-+    QVERIFY(ok);
++    return false;
 +}
 +
- static void testCopyTo( KArchive* archive )
- {
-     const KArchiveDirectory* dir = archive->directory();
-@@ -268,6 +275,12 @@
- void KArchiveTest::testCreateTar()
- {
-+    // With    tempfile: 0.7-0.8 ms, 994236 instr. loads
-+    // Without tempfile:    0.81 ms, 992541 instr. loads
-+    // Note: use ./karchivetest 2>&1 | grep ms
-+    //       to avoid being slowed down by the kDebugs.
-+    QBENCHMARK {
-+
-     KTar tar( s_tarFileName );
-     bool ok = tar.open( QIODevice::WriteOnly );
-@@ -282,10 +295,15 @@
-     QVERIFY( fileInfo.exists() );
-     // We can't check for an exact size because of the addLocalFile, whose data is system-dependent
-     QVERIFY( fileInfo.size() > 450 );
-+    }
- }
- void KArchiveTest::testCreateTarGz()
- {
-+    // With    tempfile: 1.3-1.7 ms, 2555089 instr. loads
-+    // Without tempfile:    0.87 ms,  987915 instr. loads
-+    QBENCHMARK {
++void FakeHelperProxy::setHelperResponder(QObject* o)
++{
++    Q_UNUSED(o)
++}
 +
-     KTar tar( s_tarGzFileName );
-     bool ok = tar.open( QIODevice::WriteOnly );
-@@ -300,11 +318,20 @@
-     QVERIFY( fileInfo.exists() );
-     // We can't check for an exact size because of the addLocalFile, whose data is system-dependent
-     QVERIFY( fileInfo.size() > 350 );
++bool FakeHelperProxy::initHelper(const QString& name)
++{
++    Q_UNUSED(name)
++    return false;
++}
 +
-+    }
- }
--void KArchiveTest::testReadTar()
-+void KArchiveTest::testReadTar() // testCreateTarGz must have been run first.
- {
--    // testCreateTar must have been run first.
-+    kDebug() << "START";
-+    // 1.6-1.7 ms per interaction, 2908428 instruction loads
-+    // After the "no tempfile when writing fix" this went down
-+    // to 0.9-1.0 ms, 1689059 instruction loads.
-+    // I guess it finds the data in the kernel cache now that no KTempFile is
-+    // used when writing.
-+    QBENCHMARK {
-+
-     KTar tar( s_tarGzFileName );
-     bool ok = tar.open( QIODevice::ReadOnly );
-@@ -348,6 +375,7 @@
-     ok = tar.close();
-     QVERIFY( ok );
-+    }
- }
- // This tests the decompression using kfilterdev, basically.
-@@ -403,6 +431,33 @@
-     QVERIFY( ok );
- }
-+void KArchiveTest::testTarReadWrite()
++void FakeHelperProxy::stopAction(const QString& action, const QString& helperID)
 +{
-+    // testCreateTar must have been run first.
-+    KTar tar( s_tarGzFileName );
-+    bool ok = tar.open( QIODevice::ReadWrite );
-+    QVERIFY( ok );
++    Q_UNUSED(action)
++    Q_UNUSED(helperID)
++}
 +
-+    testReadWrite( &tar );
-+    testFileData( &tar );
++KAuth::ActionReply FakeHelperProxy::executeAction(const QString& action, const QString& helperID, const QVariantMap& arguments)
++{
++    Q_UNUSED(action)
++    Q_UNUSED(helperID)
++    Q_UNUSED(arguments)
++    return KAuth::ActionReply::NoSuchActionReply;
++}
 +
-+    ok = tar.close();
-+    QVERIFY( ok );
++bool FakeHelperProxy::executeActions(const QList< QPair< QString, QVariantMap > >& list, const QString& helperID)
++{
++    Q_UNUSED(list)
++    Q_UNUSED(helperID)
++    return false;
++}
 +
-+    // Reopen it and check it
-+    {
-+        KTar tar( s_tarGzFileName );
-+        bool ok = tar.open( QIODevice::ReadOnly );
-+        QVERIFY( ok );
-+        testFileData( &tar );
-+        const KArchiveDirectory* dir = tar.directory();
-+        const KArchiveEntry* e = dir->entry( "newfile" );
-+        QVERIFY( e && e->isFile() );
-+        const KArchiveFile* f = (KArchiveFile*)e;
-+        QCOMPARE( f->data().size(), 8 );
-+    }
 +}
+Index: kdecore/auth/backends/fakehelper/FakeHelperProxy.h
+===================================================================
+--- kdecore/auth/backends/fakehelper/FakeHelperProxy.h (.../tags/KDE/4.4.1/kdelibs)    (wersja 0)
++++ kdecore/auth/backends/fakehelper/FakeHelperProxy.h (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -0,0 +1,49 @@
++/*
++*   Copyright (C) 2010 Dario Freddi <drf@kde.org>
++*
++*   This program is free software; you can redistribute it and/or modify
++*   it under the terms of the GNU Lesser General Public License as published by
++*   the Free Software Foundation; either version 2.1 of the License, or
++*   (at your option) any later version.
++*
++*   This program is distributed in the hope that it will be useful,
++*   but WITHOUT ANY WARRANTY; without even the implied warranty of
++*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++*   GNU General Public License for more details.
++*
++*   You should have received a copy of the GNU Lesser General Public License
++*   along with this program; if not, write to the
++*   Free Software Foundation, Inc.,
++*   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .
++*/
++
++#ifndef FAKEHELPERPROXY_H
++#define FAKEHELPERPROXY_H
++
++#include "HelperProxy.h"
++
++namespace KAuth {
++
++class FakeHelperProxy : public HelperProxy
++{
++    Q_OBJECT
++    Q_INTERFACES(KAuth::HelperProxy)
++
++    public:
++        FakeHelperProxy();
++        virtual ~FakeHelperProxy();
++
++        virtual void sendProgressStep(const QVariantMap& step);
++        virtual void sendProgressStep(int step);
++        virtual void sendDebugMessage(int level, const char* msg);
++        virtual bool hasToStopAction();
++        virtual void setHelperResponder(QObject* o);
++        virtual bool initHelper(const QString& name);
++        virtual void stopAction(const QString& action, const QString& helperID);
++        virtual ActionReply executeAction(const QString& action, const QString& helperID, const QVariantMap& arguments);
++        virtual bool executeActions(const QList< QPair< QString, QVariantMap > >& list, const QString& helperID);
++};
 +
- void KArchiveTest::testTarMaxLength()
- {
-     KTar tar( s_tarGzMaxLengthFileName );
-@@ -437,6 +492,7 @@
-     QCOMPARE( listing[  3], QString("mode=100644 user=testu group=testg path=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000101 type=file size=3") );
-     QCOMPARE( listing[  4], QString("mode=100644 user=testu group=testg path=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000102 type=file size=3") );
-+    // TODO:
-     // ################################################# BUG! ###########################
-     // There seems to be a bug (which is in kde3 too), we miss 512 and 513.
-     // But note that tar tvzf says "skipping next header" (and it skips 511),
-@@ -667,4 +723,7 @@
-         QVERIFY(false);
-     }
- #endif
++}
 +
-+    // For better benchmarks: initialize KMimeTypeFactory magic here
-+    KMimeType::findByContent(QByteArray("hello"));
++#endif // FAKEHELPERPROXY_H
+Index: kdecore/auth/backends/policykit/PolicyKitBackend.cpp
+===================================================================
+--- kdecore/auth/backends/policykit/PolicyKitBackend.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/backends/policykit/PolicyKitBackend.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -20,6 +20,7 @@
+ #include "PolicyKitBackend.h"
++#include <QtCore/qplugin.h>
+ #include <syslog.h>
+ #include <polkit-qt/context.h>
+ #include <polkit-qt/auth.h>
+@@ -98,3 +99,5 @@
  }
-Index: kio/tests/ktartest.cpp
+ } // namespace Auth
++
++Q_EXPORT_PLUGIN2(kauth_backend, KAuth::PolicyKitBackend)
+Index: kdecore/auth/backends/dbus/DBusHelperProxy.cpp
 ===================================================================
---- kio/tests/ktartest.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/tests/ktartest.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -40,6 +40,8 @@
-   }
+--- kdecore/auth/backends/dbus/DBusHelperProxy.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/auth/backends/dbus/DBusHelperProxy.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -20,6 +20,7 @@
+ #include "DBusHelperProxy.h"
++#include <QtCore/qplugin.h>
+ #include <QObject>
+ #include <QMap>
+ #include <QtDBus/QDBusMessage>
+@@ -170,8 +171,7 @@
+     if (type == ActionStarted) {
+         emit actionStarted(action);
+     } else if (type == ActionPerformed) {
+-        ActionReply reply;
+-        stream >> reply;
++        ActionReply reply = ActionReply::deserialize(blob);
+         m_actionsInProgress.removeOne(action);
+         emit actionPerformed(action, reply);
+@@ -329,3 +329,5 @@
  }
  
-+// See karchivetest.cpp for the unittest that coverts KTar.
+ } // namespace Auth
 +
- int main( int argc, char** argv )
- {
-     if (argc != 2)
-Index: kio/tests/karchivetest.h
-===================================================================
---- kio/tests/karchivetest.h   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kio/tests/karchivetest.h   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -34,6 +34,7 @@
-     void testUncompress();
-     void testTarFileData();
-     void testTarCopyTo();
-+    void testTarReadWrite();
-     void testTarMaxLength();
-     void testCreateZip();
-Index: kdecore/auth/kauthactionreply.h
-===================================================================
---- kdecore/auth/kauthactionreply.h    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdecore/auth/kauthactionreply.h    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -209,6 +209,7 @@
-  The piece of code that calls the action of the previous example is located in example/mainwindow.cpp in the on_readAction_triggered() slot. It looks like this:
-  @code
-  Action readAction = "org.kde.auth.example.read";
-+ readAction.setHelperID("org.kde.auth.example");
-  readAction.arguments()["filename"] = filename;
-  ActionReply reply = readAction.execute();
-@@ -221,7 +222,9 @@
-  First of all, it creates the action object specifying the action id. Then it loads the filename (we want to read a forbidden file) into the arguments() QVariantMap, which will be directly passed to the
-  helper in the read() slot's parameter. This example code uses a synchronous call to execute the action and retrieve the reply. If the reply succeeded, the reply data is retrieved from the returned QVariantMap
-  object. Please note that, although the execute() method will return only when the action is completed, the GUI will remain responsive because an internal event loop is entered. This means you should be
-- prepared to receive other events in the meanwhile.
-+ prepared to receive other events in the meanwhile. Also, notice that you have to set explicitely the helper ID to the action: this is done for an added safety, to prevent the caller from accidentally invoking
-+ an helper, and also because KAuth actions may be used without an helper attached (the default). In this case, action.execute() will return ActionSuccess if the authentication went well. This is quite useful 
-+ if you want your user to authenticate before doing something, which however needs no privileged permissions implementation-wise.
-  @section kauth_async Asynchronous calls, data reporting, and action termination
++Q_EXPORT_PLUGIN2(kauth_helper_backend, KAuth::DBusHelperProxy)
+Index: kdecore/tests/kmimetypetest.cpp
+===================================================================
+--- kdecore/tests/kmimetypetest.cpp    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/tests/kmimetypetest.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -193,9 +193,13 @@
+     QTest::newRow("doesn't exist but has known extension") << "IDontExist.txt" << "text/plain";
+     // Can't use KIconLoader since this is a "without GUI" test.
+-    QString fh = KStandardDirs::locate( "icon", "oxygen/22x22/places/folder.png" );
+-    QVERIFY( !fh.isEmpty() ); // if the file doesn't exist, please fix the above to point to an existing icon
+-    QTest::newRow("png image") << fh << "image/png";
++    if (!KStandardDirs::locate("icon", "oxygen/").isEmpty()) {
++        QString fh = KStandardDirs::locate("icon", "oxygen/22x22/places/folder.png");
++        QVERIFY(!fh.isEmpty()); // if the file doesn't exist, please fix the above to point to an existing icon
++        QTest::newRow("png image") << fh << "image/png";
++    } else {
++        kWarning() << "oxygen icon theme not found";
++    }
+     QString exePath = KStandardDirs::findExe( "kioexec" );
+     if ( exePath.isEmpty() )
+@@ -466,7 +470,7 @@
+     const KMimeType::Ptr canonical = KMimeType::mimeType( "application/xml" );
+     QVERIFY( canonical );
+-    KMimeType::Ptr alias = KMimeType::mimeType( "text/xml" );
++    KMimeType::Ptr alias = KMimeType::mimeType("text/xml", KMimeType::DontResolveAlias);
+     QVERIFY( !alias );
+     alias = KMimeType::mimeType( "text/xml", KMimeType::ResolveAliases );
+     QVERIFY( alias );
+Index: kdecore/tests/kurltest.cpp
+===================================================================
+--- kdecore/tests/kurltest.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/tests/kurltest.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -322,7 +322,7 @@
+   //NOTE this test should be ran in UTF8 locale
+   KUrl percentEncodedQuery( "http://mail.yandex.ru/message_part/%D0%9A%D1%80%D0%B8%D1%82%D0%B5%D1%80%D0%B8%D0%B8%20%D0%BE%D1%86%D0%B5%D0%BD%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%BE%D1%80%D0%BB%D0%BE%D0%B2%D0%BE%D0%B9.rar?hid=1.1&mid=391.56424458.99241672611486679803334485488&name=%D0%9A%D1%80%D0%B8%D1%82%D0%B5%D1%80%D0%B8%D0%B8%20%D0%BE%D1%86%D0%B5%D0%BD%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%BE%D1%80%D0%BB%D0%BE%D0%B2%D0%BE%D0%B9.rar" );
+-  QCOMPARE( percentEncodedQuery.prettyUrl(), QString::fromUtf8("http://mail.yandex.ru/message_part/Критерии оценивания орловой.rar?hid=1.1&mid=391.56424458.99241672611486679803334485488&name=Критерии оценивания орловой.rar"));
++  QCOMPARE( percentEncodedQuery.prettyUrl(), QString::fromUtf8("http://mail.yandex.ru/message_part/Критерии оценивания орловой.rar?hid=1.1&mid=391.56424458.99241672611486679803334485488&name=%D0%9A%D1%80%D0%B8%D1%82%D0%B5%D1%80%D0%B8%D0%B8%20%D0%BE%D1%86%D0%B5%D0%BD%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%BE%D1%80%D0%BB%D0%BE%D0%B2%D0%BE%D0%B9.rar"));
+ #ifdef Q_WS_WIN
+ #ifdef Q_CC_MSVC
+@@ -701,6 +701,11 @@
+   QCOMPARE( url15581.prettyUrl(), QString("http://alain.knaff.linux.lu/bug-reports/kde/spaces in url.html") );
+   QCOMPARE( url15581.url(), QString("http://alain.knaff.linux.lu/bug-reports/kde/spaces%20in%20url.html") );
++  KUrl newLineInQuery("http://localhost/?a=foo%0A%0Abar%20baz&b=foo%0Abar%21%3F");
++  QCOMPARE( newLineInQuery.prettyUrl(), QString("http://localhost/?a=foo%0A%0Abar%20baz&b=foo%0Abar%21%3F") );
++  KUrl nonUtf8Query("http://kde.org/?a=test%C2%A0foo%A0%A0%A0%A0bar");
++  QCOMPARE( nonUtf8Query.prettyUrl(), QString("http://kde.org/?a=test%C2%A0foo%A0%A0%A0%A0bar") );
++
+   // KDE3 test was for parsing "percentage%in%url.html", but this is not supported; too broken.
+   KUrl url15581bis("http://alain.knaff.linux.lu/bug-reports/kde/percentage%25in%25url.html");
+   QCOMPARE( url15581bis.prettyUrl(), QString("http://alain.knaff.linux.lu/bug-reports/kde/percentage%25in%25url.html") );
+Index: kdecore/tests/ktimezonestest.cpp
+===================================================================
+--- kdecore/tests/ktimezonestest.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/tests/ktimezonestest.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -22,6 +22,7 @@
+ #include <QtCore/QDir>
+ #include <QtCore/QDate>
+ #include <QtDBus/QtDBus>
++#include "config.h" // for HAVE_TM_GMTOFF
+ #include "ksystemtimezone.h"
+ #include "ktzfiletimezone.h"
+ #include "ktimezonestest.moc"
+@@ -283,7 +284,7 @@
+     // Find the current offset of a time zone
+     time_t now = time(0);
+     tm *tnow = localtime(&now);
+-#ifndef _WIN32
++#if defined(HAVE_TM_GMTOFF)
+     int offset = tnow->tm_gmtoff;
+ #else
+     int offset = 0;
 Index: kdecore/all_languages.desktop
 ===================================================================
---- kdecore/all_languages.desktop      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdecore/all_languages.desktop      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -359,7 +359,7 @@
- Name[tg]=Африкоӣ
- Name[th]=ภาษาแอฟริคานส์
- Name[tr]=Afrika Dili
--Name[uk]=Південноафриканська
-+Name[uk]=Африкаанс
- Name[uz]=Afrikancha
- Name[uz@cyrillic]=Африканча
- Name[vi]=Hoà Nam Phi
-Index: kdecore/util/kshell_unix.cpp
-===================================================================
---- kdecore/util/kshell_unix.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdecore/util/kshell_unix.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -128,7 +128,7 @@
-                         ret += args.mid(pos - 1);
-                         goto okret;
-                     }
--                    cc = args[pos2++];
-+                    cc = args.unicode()[pos2++];
-                 } while (cc == QLatin1Char('_') ||
-                        (cc >= QLatin1Char('A') && cc <= QLatin1Char('Z')) ||
-                        (cc >= QLatin1Char('a') && cc <= QLatin1Char('z')) ||
-@@ -170,7 +170,8 @@
-                         goto metaerr;
-                     cret += c;
-                 }
--            } else if (c == QLatin1Char('$') && args[pos] == QLatin1Char('\'')) {
-+            } else if (c == QLatin1Char('$') && pos < args.length() &&
-+                       args.unicode()[pos] == QLatin1Char('\'')) {
-                 pos++;
-                 for (;;) {
-                     if (pos >= args.length())
-@@ -192,14 +193,20 @@
-                         case 't': cret += QLatin1Char('\t'); break;
-                         case '\\': cret += QLatin1Char('\\'); break;
-                         case '\'': cret += QLatin1Char('\''); break;
--                        case 'c': cret += args[pos++].toAscii() & 31; break;
-+                        case 'c':
-+                            if (pos >= args.length())
-+                                goto quoteerr;
-+                            cret += args.unicode()[pos++].toAscii() & 31;
-+                            break;
-                         case 'x':
-                           {
--                            int hv = fromHex( args[pos] );
--                            if (hv < 0) {
--                                cret += QLatin1String("\\x");
--                            } else {
--                                int hhv = fromHex( args[++pos] );
-+                            if (pos >= args.length())
-+                                goto quoteerr;
-+                            int hv = fromHex( args.unicode()[pos++] );
-+                            if (hv < 0)
-+                                goto quoteerr;
-+                            if (pos < args.length()) {
-+                                int hhv = fromHex( args.unicode()[pos] );
-                                 if (hhv > 0) {
-                                     hv = hv * 16 + hhv;
-                                     pos++;
-@@ -213,7 +220,9 @@
-                                 char cAscii = c.toAscii();
-                                 int hv = cAscii - '0';
-                                 for (int i = 0; i < 2; i++) {
--                                    c = args[pos];
-+                                    if (pos >= args.length())
-+                                        break;
-+                                    c = args.unicode()[pos];
-                                     if (c.toAscii() < '0' || c.toAscii() > '7')
-                                         break;
-                                     hv = hv * 8 + (c.toAscii() - '0');
-Index: kdecore/util/krandomsequence.h
-===================================================================
---- kdecore/util/krandomsequence.h     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdecore/util/krandomsequence.h     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -107,12 +107,14 @@
-    * @note modifies the list in place
-    */
-   template<typename T> void randomize(QList<T>& list) {
--      QList<T> l;
-+      if (!list.isEmpty()) {
-+            QList<T> l;
--      l.append(list.takeFirst());
--      while (list.count())
--              l.insert(int(getLong(l.count()+1)), list.takeFirst());
--      list = l;
-+            l.append(list.takeFirst());
-+            while (list.count())
-+                    l.insert(int(getLong(l.count()+1)), list.takeFirst());
-+            list = l;
-+      }
+--- kdecore/all_languages.desktop      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/all_languages.desktop      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -2006,6 +2006,7 @@
+ Name[km]=វ៉ាឡេហ្សង់ (កាតាឡាំង​ភាគ​ខាង​ត្បូង)
+ Name[kn]=ವಲೆನ್ಸಿಯನ್ (ದಕ್ಷಿಣ ಕಟಲನ್)
+ Name[ko]=발렌시아어
++Name[lt]=Valensijos (pietų katalonų)
+ Name[lv]=Venecuēliešu (dienvidu Katalāņu)
+ Name[ml]=വലന്‍ഷ്യന്‍ (തെക്കന്‍ കറ്റാലന്‍)
+ Name[ms]=Valencian (Catalan selatan)
+Index: kdecore/io/ksavefile.cpp
+===================================================================
+--- kdecore/io/ksavefile.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/io/ksavefile.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -114,13 +114,17 @@
+     
+     // if we're overwriting an existing file, ensure temp file's
+     // permissions are the same as existing file so the existing
+-    // file's permissions are preserved. this will succeed only if we
+-    // are the same owner and group - or allmighty root.
++    // file's permissions are preserved. this will succeed completely
++    // only if we are the same owner and group - or allmighty root.
+     QFileInfo fi ( d->realFileName );
+     if (fi.exists()) {
+         //Qt apparently has no way to change owner/group of file :(
+-        if (!fchown(tempFile.handle(), fi.ownerId(), fi.groupId()))
+-            tempFile.setPermissions(fi.permissions());
++        if (fchown(tempFile.handle(), fi.ownerId(), fi.groupId())) {
++            // failed to set user and group => try to restore group only.
++            fchown(tempFile.handle(), -1, fi.groupId());
++        }
++
++        tempFile.setPermissions(fi.permissions());
+     }
+     else {
+         mode_t umsk = KGlobal::umask();
+Index: kdecore/io/kurl.cpp
+===================================================================
+--- kdecore/io/kurl.cpp        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/io/kurl.cpp        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -1083,7 +1083,7 @@
+   if (hasQuery()) {
+     result += QLatin1Char('?');
+-    result += QUrl::fromPercentEncoding(encodedQuery());
++    result += encodedQuery();
    }
  
-Index: knewstuff/knewstuff3/downloaddialog.cpp
+   if (hasFragment()) {
+Index: kdecore/CMakeLists.txt
 ===================================================================
---- knewstuff/knewstuff3/downloaddialog.cpp    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ knewstuff/knewstuff3/downloaddialog.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -23,10 +23,10 @@
- #include "downloaddialog.h"
- #include "downloaddialog_p.h"
+--- kdecore/CMakeLists.txt     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdecore/CMakeLists.txt     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -111,11 +111,6 @@
+    )
+ endif (UNIX)
  
+-# Add KAuth backend sources
+-set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} ${KAUTH_BACKEND_SRCS} ${KAUTH_HELPER_BACKEND_SRCS})
+-# Add KAuth backend libraries
+-set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${KAUTH_BACKEND_LIBS})
 -
-+#include <QtCore/QTimer>
- #include <QtGui/QSortFilterProxyModel>
--#include <QtCore/QTimer>
- #include <QtGui/QScrollBar>
-+#include <QtGui/QKeyEvent>
- #include <kmessagebox.h>
- #include <kcomponentdata.h>
-@@ -72,6 +72,9 @@
-     d->ui.closeButton->setGuiItem(KStandardGuiItem::Close);
-     connect(d->ui.closeButton, SIGNAL(clicked()), SLOT(accept()));
-+    // let the search line edit trap the enter key, otherwise it closes the dialog
-+    d->ui.m_searchEdit->setTrapReturnKey(true);
-+
-     d->init(configFile);
-     // load the last size from config
-@@ -109,4 +112,5 @@
-     return entries;
+ add_subdirectory( kconfig_compiler )
+ add_subdirectory( tests )
+ add_subdirectory( sonnet/tests )
+@@ -191,6 +186,8 @@
+    auth/BackendsManager.cpp
+    auth/HelperProxy.cpp
+    auth/kauthhelpersupport.cpp
++   auth/backends/fake/FakeBackend.cpp
++   auth/backends/fakehelper/FakeHelperProxy.cpp
+    services/kfoldermimetype.cpp
+    services/kmimetypefactory.cpp
+    services/kmimemagicrule.cpp
+@@ -336,16 +333,49 @@
+ # KAuth policy generator executable
+-# KAUTH_POLICY_GEN_SRCS has been generated from auth/ConfigureChecks.cmake
+-kde4_add_executable(kauth-policy-gen NOGUI ${KAUTH_POLICY_GEN_SRCS})
++# Compile only if fake backend has not been selected
+-# KAUTH_POLICY_GEN_LIBRARIES has been generated from auth/ConfigureChecks.cmake
+-target_link_libraries( kauth-policy-gen ${KAUTH_POLICY_GEN_LIBRARIES} )
++if (NOT "${KDE4_AUTH_BACKEND_NAME}" STREQUAL "FAKE")
++    # KAUTH_POLICY_GEN_SRCS has been generated from auth/ConfigureChecks.cmake
++    kde4_add_executable(kauth-policy-gen NOGUI ${KAUTH_POLICY_GEN_SRCS})
+-install( TARGETS kauth-policy-gen EXPORT kdelibsToolsTargets DESTINATION ${LIBEXEC_INSTALL_DIR})
++    # KAUTH_POLICY_GEN_LIBRARIES has been generated from auth/ConfigureChecks.cmake
++    target_link_libraries( kauth-policy-gen ${KAUTH_POLICY_GEN_LIBRARIES} )
++    install( TARGETS kauth-policy-gen EXPORT kdelibsToolsTargets DESTINATION ${LIBEXEC_INSTALL_DIR})
++endif (NOT "${KDE4_AUTH_BACKEND_NAME}" STREQUAL "FAKE")
++
+ ########### next target ###############
++# KAuth backend plugin
++
++if (NOT "${KDE4_AUTH_BACKEND_NAME}" STREQUAL "FAKE")
++    set(KAUTH_BACKEND_SRCS ${KAUTH_BACKEND_SRCS} auth/AuthBackend.cpp)
++    kde4_add_plugin(kauth_backend_plugin ${KAUTH_BACKEND_SRCS})
++    target_link_libraries(kauth_backend_plugin ${KAUTH_BACKEND_LIBS})
++    install(TARGETS kauth_backend_plugin
++            LIBRARY DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR}
++            ARCHIVE DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR}
++            RUNTIME DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR}
++    )
++endif (NOT "${KDE4_AUTH_BACKEND_NAME}" STREQUAL "FAKE")
++
++########### next target ###############
++
++# KAuth helper plugin
++
++if (NOT "${KDE4_AUTH_HELPER_BACKEND_NAME}" STREQUAL "FAKE")
++    kde4_add_plugin(kauth_helper_plugin ${KAUTH_HELPER_BACKEND_SRCS} auth/HelperProxy.cpp)
++    target_link_libraries(kauth_helper_plugin ${KAUTH_HELPER_BACKEND_LIBS})
++    install(TARGETS kauth_helper_plugin
++            LIBRARY DESTINATION ${KAUTH_HELPER_PLUGIN_DIR}
++            ARCHIVE DESTINATION ${KAUTH_HELPER_PLUGIN_DIR}
++            RUNTIME DESTINATION ${KAUTH_HELPER_PLUGIN_DIR}
++    )
++endif (NOT "${KDE4_AUTH_HELPER_BACKEND_NAME}" STREQUAL "FAKE")
++
++########### next target ###############
++
+ configure_file(all_languages.desktop ${CMAKE_CURRENT_BINARY_DIR}/all_languages @ONLY)
+ kde4_add_executable(kde4-config NOGUI kde-config.cpp )
+Index: knewstuff/knewstuff3/uploaddialog.h
+===================================================================
+--- knewstuff/knewstuff3/uploaddialog.h        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ knewstuff/knewstuff3/uploaddialog.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -25,7 +25,6 @@
+ #include <kurl.h>
+ #include <knewstuff3/knewstuff_export.h>
+-#include <attica/provider.h>
+ class KComboBox;
+ class KLineEdit;
+@@ -34,6 +33,7 @@
+ namespace Attica {
+     class BaseJob;
++    class Provider;
  }
  
+ namespace KNS3
+Index: plasma/dataengine.cpp
+===================================================================
+--- plasma/dataengine.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/dataengine.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -75,10 +75,13 @@
+ Service *DataEngine::serviceForSource(const QString &source)
+ {
+     if (d->script) {
+-        return d->script->serviceForSource(source);
+-    } else {
+-        return new NullService(source, this);
++        Service * s = d->script->serviceForSource(source);
++        if (s) {
++            return s;
++        }
+     }
 +
- #include "downloaddialog.moc"
-Index: knewstuff/knewstuff3/staticxml/staticxmlprovider.cpp
++    return new NullService(source, this);
+ }
+ void DataEngine::connectSource(const QString &source, QObject *visualization,
+Index: plasma/scripting/appletscript.cpp
 ===================================================================
---- knewstuff/knewstuff3/staticxml/staticxmlprovider.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ knewstuff/knewstuff3/staticxml/staticxmlprovider.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -297,7 +297,6 @@
-                 entry.setStatus(cacheEntry.status());
-             }
-             cacheEntry = entry;
--            entries << cacheEntry;
-         }
-         d->cachedEntries.append(entry);
+--- plasma/scripting/appletscript.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/scripting/appletscript.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -127,7 +127,9 @@
+ void AppletScript::showConfigurationInterface()
+ {
+     if (applet()) {
+-        applet()->d->generateGenericConfigDialog()->show();
++        KConfigDialog *dialog = applet()->d->generateGenericConfigDialog();
++        applet()->d->addStandardConfigurationPages(dialog);
++        dialog->show();
+     }
+ }
  
-Index: plasma/popupapplet.cpp
+Index: plasma/package.cpp
 ===================================================================
---- plasma/popupapplet.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/popupapplet.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -358,7 +358,10 @@
-                 //emulate the same kind of behavior as Qt::Popup (close when you click somewhere
-                 //else.
+--- plasma/package.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/package.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -105,11 +105,15 @@
+         return QString();
+     }
  
--                q->setMinimumSize(QSize(0, 0));
-+                if (icon) {
-+                    q->setMinimumSize(QSize(0, 0));
-+                }
+-    QString path = d->structure->path(fileType);
++    QString path;
+-    if (path.isEmpty()) {
+-        kDebug() << "no matching path came of it, while looking for" << fileType << filename;
+-        return QString();
++    if (qstrlen(fileType) != 0) {
++        path = d->structure->path(fileType);
 +
-                 if (gWidget) {
-                     Corona *corona = qobject_cast<Corona *>(gWidget->scene());
++        if (path.isEmpty()) {
++            kDebug() << "no matching path came of it, while looking for" << fileType << filename;
++            return QString();
++        }
+     }
  
-@@ -392,7 +395,9 @@
-                 lay->addItem(icon);
-             }
+     path.prepend(d->structure->path() + d->structure->contentsPrefix());
+Index: plasma/dialog.cpp
+===================================================================
+--- plasma/dialog.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/dialog.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -109,9 +109,9 @@
  
--            q->setMinimumSize(0,0);
-+            if (icon) {
-+                q->setMinimumSize(0,0);
-+            }
-         }
+     //kDebug() << leftWidth << topHeight << rightWidth << bottomHeight;
+     if (Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) {
++        q->clearMask();
++    } else {
+         q->setMask(background->mask());
+-    } else {
+-        q->setMask(QRect(QPoint(0, 0), q->size()));
+     }
+     FrameSvg::EnabledBorders borders = FrameSvg::AllBorders;
+@@ -583,6 +583,7 @@
      }
  
-Index: plasma/widgets/webview.h
+     emit dialogVisible(true);
++    WindowEffects::overrideShadow(winId(), true);
+ }
+ void Dialog::focusInEvent(QFocusEvent *event)
+Index: plasma/widgets/iconwidget.cpp
 ===================================================================
---- plasma/widgets/webview.h   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/widgets/webview.h   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -211,6 +211,7 @@
-         void dragLeaveEvent(QGraphicsSceneDragDropEvent * event);
-         void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
-         void dropEvent(QGraphicsSceneDragDropEvent * event);
-+        QVariant itemChange(GraphicsItemChange change, const QVariant &value);
-         QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
+--- plasma/widgets/iconwidget.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/widgets/iconwidget.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -795,7 +795,7 @@
  
-     private:
-Index: plasma/widgets/webview.cpp
+     if (size.width() > constraints.width() || size.height() > constraints.height()) {
+         if (action) {
+-            q->setToolTip(action->text());
++            q->setToolTip(action->toolTip());
+         }
+         const QString elided = elidedText(layout, option, constraints);
+         return layoutText(layout, elided, constraints.width());
+Index: plasma/widgets/svgwidget.h
 ===================================================================
---- plasma/widgets/webview.cpp (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/widgets/webview.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -22,6 +22,7 @@
- #include <QtGui/QGraphicsSceneDragDropEvent>
- #include <QtGui/QGraphicsSceneMouseEvent>
- #include <QtGui/QGraphicsSceneWheelEvent>
-+#include <QtGui/QGraphicsView>
- #include <QtGui/QKeyEvent>
- #include <QtGui/QStyleOptionGraphicsItem>
-@@ -35,10 +36,10 @@
- #include <kio/accessmanager.h>
- #include <accessmanager.h>
--#include "plasma/widgets/webview.h"
-+#include "animator.h"
-+#include "plasma.h"
-+#include "widgets/webview.h"
--#include "plasma/animator.h"
--
+--- plasma/widgets/svgwidget.h (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/widgets/svgwidget.h (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -28,15 +28,19 @@
  namespace Plasma
  {
+-
+ class Svg;
+ class SvgWidgetPrivate;
++}
  
-@@ -201,6 +202,10 @@
-     }
-     d->page = page;
-+    //FIXME: QWebPage _requires_ a QWidget view to not crash in places such as 
-+    // WebCore::PopupMenu::show() due to hostWindow()->platformPageClient() == NULL
-+    // because QWebPage::d->client is NULL
-+    d->page->setView(viewFor(this));
-     if (d->page) {
-         connect(d->page, SIGNAL(loadProgress(int)),
-@@ -290,6 +295,7 @@
-     QMouseEvent me(QEvent::MouseButtonPress, event->pos().toPoint(), 
-             event->button(), event->buttons(), event->modifiers());
-+//    d->page->event(event);
-     d->page->event(&me);
-     if (me.isAccepted() && !d->dragToScroll) {
-         event->accept();
-@@ -477,6 +483,18 @@
-     }
- }
-+QVariant WebView::itemChange(GraphicsItemChange change, const QVariant &value)
++Q_DECLARE_METATYPE(Plasma::Svg*)
++
++namespace Plasma
 +{
-+    if (change == QGraphicsItem::ItemSceneHasChanged && d->page) {
-+        //FIXME: QWebPage _requires_ a QWidget view to not crash in places such as 
-+        // WebCore::PopupMenu::show() due to hostWindow()->platformPageClient() == NULL
-+        // because QWebPage::d->client is NULL
-+        d->page->setView(viewFor(this));
+ class PLASMA_EXPORT SvgWidget : public QGraphicsWidget
+ {
+     Q_OBJECT
+-    Q_PROPERTY(Svg *svg READ svg WRITE setSvg)
++    Q_PROPERTY(Plasma::Svg *svg READ svg WRITE setSvg)
+     Q_PROPERTY(QString elementID READ elementID WRITE setElementID)
+     public:
+Index: plasma/widgets/label.cpp
+===================================================================
+--- plasma/widgets/label.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/widgets/label.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -116,7 +116,6 @@
+     QLabel *native = new QLabel;
+     //disabled for now: triggers Qt bug 7254
+     //native->setWindowFlags(native->windowFlags()|Qt::BypassGraphicsProxyWidget);
+-    native->setTextInteractionFlags(Qt::TextBrowserInteraction);
+     d->textSelectable = false;
+     connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
+     connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
+@@ -191,6 +190,12 @@
+ void Label::setTextSelectable(bool enable)
+ {
++    if (enable) {
++        nativeWidget()->setTextInteractionFlags(Qt::TextBrowserInteraction);
++    } else {
++        nativeWidget()->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
 +    }
 +
-+    return QGraphicsWidget::itemChange(change, value);
-+}
-+
- void WebView::setGeometry(const QRectF &geometry)
- {
-     QGraphicsWidget::setGeometry(geometry);
+     d->textSelectable = enable;
+ }
 Index: plasma/applet.cpp
 ===================================================================
---- plasma/applet.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/applet.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1712,6 +1712,7 @@
-         return;
+--- plasma/applet.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/applet.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -352,15 +352,22 @@
+     d->failed = failed;
+     prepareGeometryChange();
++
+     foreach (QGraphicsItem *item, childItems()) {
+         if (!dynamic_cast<AppletHandle *>(item)) {
+             delete item;
+         }
      }
++
++    d->messageOverlay = 0;
++    if (d->messageDialog) {
++        d->messageDialog.data()->deleteLater();
++        d->messageDialog.clear();
++    }
++
+     setLayout(0);
  
-+    d->publishUI.publishCheckbox = 0;
-     if (d->package && d->configLoader) {
-         KConfigDialog *dialog = 0;
+     if (failed) {
+-        d->destroyMessageOverlay();
+         setBackgroundHints(d->backgroundHints|StandardBackground);
  
-@@ -1878,29 +1879,31 @@
-     }
+         QGraphicsLinearLayout *failureLayout = new QGraphicsLinearLayout(this);
+@@ -1158,15 +1165,15 @@
+         if (closeApplet) {
+             closeApplet->setEnabled(unlocked);
+             closeApplet->setVisible(unlocked);
+-            connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy()));
++            connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy()), Qt::UniqueConnection);
+         }
  
- #ifdef ENABLE_REMOTE_WIDGETS
--    q->config().writeEntry("Share", publishUI.publishCheckbox->isChecked());
-+    if (publishUI.publishCheckbox) {
-+        q->config().writeEntry("Share", publishUI.publishCheckbox->isChecked());
--    if (publishUI.publishCheckbox->isChecked()) {
--        QString resourceName =
--        i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
--              "%1 on %2", q->name(), QHostInfo::localHostName());
--        q->publish(Plasma::ZeroconfAnnouncement, resourceName);
--        if (publishUI.allUsersCheckbox->isChecked()) {
--            if (!AuthorizationManager::self()->d->matchingRule(resourceName, Credentials())) {
--                AuthorizationRule *rule = new AuthorizationRule(resourceName, "");
--                rule->setPolicy(AuthorizationRule::Allow);
--                rule->setTargets(AuthorizationRule::AllUsers);
--                AuthorizationManager::self()->d->rules.append(rule);
-+        if (publishUI.publishCheckbox->isChecked()) {
-+            QString resourceName =
-+                i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
-+                        "%1 on %2", q->name(), QHostInfo::localHostName());
-+            q->publish(Plasma::ZeroconfAnnouncement, resourceName);
-+            if (publishUI.allUsersCheckbox->isChecked()) {
-+                if (!AuthorizationManager::self()->d->matchingRule(resourceName, Credentials())) {
-+                    AuthorizationRule *rule = new AuthorizationRule(resourceName, "");
-+                    rule->setPolicy(AuthorizationRule::Allow);
-+                    rule->setTargets(AuthorizationRule::AllUsers);
-+                    AuthorizationManager::self()->d->rules.append(rule);
-+                }
-+            } else {
-+                AuthorizationRule *matchingRule =
-+                    AuthorizationManager::self()->d->matchingRule(resourceName, Credentials());
-+                if (matchingRule) {
-+                    AuthorizationManager::self()->d->rules.removeAll(matchingRule);
-+                }
+         QAction *configAction = d->actions->action("configure");
+         if (configAction) {
+             if (d->isContainment) {
+-                connect(configAction, SIGNAL(triggered()), this, SLOT(requestConfiguration()));
++                connect(configAction, SIGNAL(triggered(bool)), this, SLOT(requestConfiguration()), Qt::UniqueConnection);
+             } else {
+-                connect(configAction, SIGNAL(triggered(bool)), this, SLOT(showConfigurationInterface()));
++                connect(configAction, SIGNAL(triggered(bool)), this, SLOT(showConfigurationInterface()), Qt::UniqueConnection);
              }
-         } else {
--            AuthorizationRule *matchingRule =
--                AuthorizationManager::self()->d->matchingRule(resourceName, Credentials());
--            if (matchingRule) {
--                AuthorizationManager::self()->d->rules.removeAll(matchingRule);
--            }
-+            q->unpublish();
+             bool canConfig = unlocked || KAuthorized::authorize("plasma/allow_configure_when_locked");
+@@ -1176,13 +1183,13 @@
+         QAction *runAssociatedApplication = d->actions->action("run associated application");
+         if (runAssociatedApplication) {
+-            connect(runAssociatedApplication, SIGNAL(triggered(bool)), this, SLOT(runAssociatedApplication()));
++            connect(runAssociatedApplication, SIGNAL(triggered(bool)), this, SLOT(runAssociatedApplication()), Qt::UniqueConnection);
          }
--    } else {
--        q->unpublish();
-     }
- #endif
  
-Index: plasma/private/desktoptoolbox.cpp
-===================================================================
---- plasma/private/desktoptoolbox.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/private/desktoptoolbox.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -566,7 +566,9 @@
-             (viewTransform().m11() == Plasma::scalingFactor(Plasma::DesktopZoom) ||
-             icon->action() == d->containment->action("add sibling containment") ||
-             icon->action() == d->containment->action("add widgets"))) {
--            icon->setText(icon->action()->text());
-+            if (icon->action()) {
-+                icon->setText(icon->action()->text());
-+            }
-         } else {
-             icon->setText(QString());
+         d->updateShortcuts();
+         Corona * corona = qobject_cast<Corona*>(scene());
+         if (corona) {
+-            connect(corona, SIGNAL(shortcutsChanged()), this, SLOT(updateShortcuts()));
++            connect(corona, SIGNAL(shortcutsChanged()), this, SLOT(updateShortcuts()), Qt::UniqueConnection);
          }
-Index: plasma/private/extender_p.h
-===================================================================
---- plasma/private/extender_p.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/private/extender_p.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -47,7 +47,7 @@
-         ~ExtenderPrivate();
-         void addExtenderItem(ExtenderItem *item, const QPointF &pos = QPointF(-1, -1));
--        void extenderItemDestroyed(QObject *object);
-+        void extenderItemDestroyed(ExtenderItem *item);
-         void removeExtenderItem(ExtenderItem *item);
-         int insertIndexFromPos(const QPointF &pos) const;
-         void loadExtenderItems();
-Index: plasma/runnercontext.cpp
-===================================================================
---- plasma/runnercontext.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/runnercontext.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -128,6 +128,10 @@
-         components.pop_back();
      }
  
-+    if (components.isEmpty()) {
-+        return true;
-+    }
-+
-     QString correctPath;
-     const unsigned initialComponents = components.size();
-     for (unsigned i = 0; i < initialComponents - 1; i ++) {
-Index: plasma/extenders/extender.cpp
+Index: plasma/private/extenderitemmimedata.cpp
 ===================================================================
---- plasma/extenders/extender.cpp      (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/extenders/extender.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -209,7 +209,14 @@
-         return 0;
    }
+--- plasma/private/extenderitemmimedata.cpp    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/private/extenderitemmimedata.cpp    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -51,6 +51,16 @@
+     m_extenderItem = item;
+ }
  
--    foreach (Containment *c, containment->corona()->containments()) {
-+    QList<Containment *> containments;
-+    if (containment->corona()) {
-+        containments = containment->corona()->containments();
-+    } else {
-+        containments << containment;
-+    }
++void ExtenderItemMimeData::setPointerOffset(const QPoint &p)
++{
++    m_offset = p;
++}
 +
-+    foreach (Containment *c, containments) {
-         foreach (Applet *applet, c->applets()) {
-             if (applet->d->extender) {
-                 if (applet->d->extender.data() == this) {
-@@ -550,7 +557,7 @@
-         return;
-     }
++QPoint ExtenderItemMimeData::pointerOffset() const
++{
++    return m_offset;
++}
++
+ ExtenderItem *ExtenderItemMimeData::extenderItem() const
+ {
+     return m_extenderItem;
+Index: plasma/private/extenderitemmimedata_p.h
+===================================================================
+--- plasma/private/extenderitemmimedata_p.h    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/private/extenderitemmimedata_p.h    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -21,6 +21,7 @@
+ #define EXTENDERITEMMIMEDATA_H
  
--    QObject::connect(item, SIGNAL(destroyed(QObject *)), q, SLOT(extenderItemDestroyed(QObject *)));
-+    QObject::connect(item, SIGNAL(destroyed(ExtenderItem*)), q, SLOT(extenderItemDestroyed(ExtenderItem*)));
-     attachedExtenderItems.append(item);
-     q->itemHoverLeaveEvent(item);
-     q->itemAddedEvent(item, pos);
-@@ -721,9 +728,8 @@
-     return 0;
- }
+ #include <QMimeData>
++#include <QPoint>
  
--void ExtenderPrivate::extenderItemDestroyed(QObject *object)
-+void ExtenderPrivate::extenderItemDestroyed(ExtenderItem *item)
+ namespace Plasma
  {
--    ExtenderItem *item = qobject_cast<ExtenderItem *>(object);
-     if (item && attachedExtenderItems.contains(item)) {
-         removeExtenderItem(item);
-     }
-Index: plasma/extenders/extenderitem.h
-===================================================================
---- plasma/extenders/extenderitem.h    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/extenders/extenderitem.h    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -254,6 +254,13 @@
-          */
-         void hideCloseButton();
+@@ -44,9 +45,13 @@
+         ExtenderItem *extenderItem() const;
  
-+    Q_SIGNALS:
-+        /**
-+         * Emitted when the extender item is destroyed
-+         * @since 4.4.1
-+         */
-+        void destroyed(ExtenderItem *item);
-+
-     protected:
-         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+         static QString mimeType();
++        
++        void setPointerOffset(const QPoint &p);
++        QPoint pointerOffset() const;
  
-Index: plasma/extenders/extender.h
-===================================================================
---- plasma/extenders/extender.h        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/extenders/extender.h        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -303,7 +303,7 @@
      private:
-         ExtenderPrivate *const d;
--        Q_PRIVATE_SLOT(d, void extenderItemDestroyed(QObject *object))
-+        Q_PRIVATE_SLOT(d, void extenderItemDestroyed(ExtenderItem *item))
+         ExtenderItem *m_extenderItem;
++        QPoint m_offset;
+ };
  
-         friend class ExtenderPrivate;
-         friend class ExtenderGroup;
-Index: plasma/extenders/extenderitem.cpp
+ } // namespace Plasma
+Index: plasma/private/tooltip.cpp
 ===================================================================
---- plasma/extenders/extenderitem.cpp  (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ plasma/extenders/extenderitem.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -141,6 +141,7 @@
- ExtenderItem::~ExtenderItem()
- {
-+    emit destroyed(this);
-     //make sure the original mousepointer always get's restored.
-     if (d->mouseOver) {
-         QApplication::restoreOverrideCursor();
-Index: khtml/khtmlview.cpp
-===================================================================
---- khtml/khtmlview.cpp        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ khtml/khtmlview.cpp        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -604,6 +604,12 @@
-         setWidget( new QWidget(this) );
-     widget()->setAttribute( Qt::WA_NoSystemBackground );
-+    // Do *not* remove this attribute frivolously.
-+    // You might not notice a change of behaviour in Debug builds
-+    // but removing opaque events will make QWidget::scroll fail horribly
-+    // in Release builds.
-+    widget()->setAttribute( Qt::WA_OpaquePaintEvent );
-+
-     verticalScrollBar()->setCursor( Qt::ArrowCursor );
-     horizontalScrollBar()->setCursor( Qt::ArrowCursor );
-Index: khtml/rendering/bidi.cpp
-===================================================================
---- khtml/rendering/bidi.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ khtml/rendering/bidi.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1389,10 +1389,10 @@
-         RenderObject *o = first( this, 0, false );
-         while ( o ) {
-             invalidateVerticalPosition();
--            if (o->markedForRepaint()) {
-+            if (!fullLayout && o->markedForRepaint()) {
-                 o->repaintDuringLayout();
-                 o->setMarkedForRepaint(false);
--             }
-+            }
-             if (o->isReplaced() || o->isFloating() || o->isPositioned()) {
-                 if ((!o->isPositioned() || o->isPosWithStaticDim()) && 
-@@ -1411,8 +1411,10 @@
-                 }
-             }
-             else {
--                if (fullLayout || o->selfNeedsLayout())
-+                if (fullLayout || o->selfNeedsLayout()) {
-                     o->dirtyInlineBoxes(fullLayout);
-+                    o->setMarkedForRepaint(false);
-+                }
-                 o->setNeedsLayout(false);
-             }
-             o = Bidinext( this, o, 0, false );
-Index: khtml/rendering/render_replaced.cpp
-===================================================================
---- khtml/rendering/render_replaced.cpp        (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ khtml/rendering/render_replaced.cpp        (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -883,7 +883,10 @@
-         keyPressEvent(static_cast<QKeyEvent *>(e));
-         break;
-     case QEvent::KeyRelease:
--        keyReleaseEvent(static_cast<QKeyEvent *>(e));
-+        if (qobject_cast<QLineEdit*>(this))
-+            event(e);
-+        else
-+            keyReleaseEvent(static_cast<QKeyEvent *>(e));
-         break;
-     case QEvent::FocusIn:
-         focusInEvent(static_cast<QFocusEvent *>(e));
-Index: khtml/xml/dom_textimpl.cpp
-===================================================================
---- khtml/xml/dom_textimpl.cpp (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ khtml/xml/dom_textimpl.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -564,16 +564,36 @@
-         return string();
+--- plasma/private/tooltip.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/private/tooltip.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -222,6 +222,7 @@
+     checkSize();
+     QWidget::showEvent(e);
+     d->preview->setInfo();
++    WindowEffects::overrideShadow(winId(), true);
  }
  
-+static bool textNeedsEscaping( const NodeImpl *n )
-+{
-+    // Exceptions based on "Serializing HTML fragments" section of
-+    // HTML 5 specification (with some adaptions to reality)
-+    const NodeImpl *p = n->parentNode();
-+    if ( !p )
-+        return true;
-+    switch ( p->id() ) {
-+    case ID_IFRAME:
-+        // follow deviating examples of FF 3.5.6 and Opera 9.6
-+        // case ID_NOEMBED:
-+        // case ID_NOFRAMES:
-+    case ID_NOSCRIPT:
-+    case ID_PLAINTEXT:
-+    case ID_SCRIPT:
-+    case ID_STYLE:
-+    case ID_XMP:
-+        return false;
-+    default:
-+        return true;
-+    }
-+}
-+
- DOMString TextImpl::toString() const
+ void ToolTip::hideEvent(QHideEvent *e)
+@@ -355,7 +356,11 @@
  {
--    // FIXME: substitute entity references as needed!
--    return escapeHTML( nodeValue() );
-+    return textNeedsEscaping( this ) ? escapeHTML( nodeValue() ) : nodeValue();
- }
+     QWidget::resizeEvent(e);
+     d->background->resizeFrame(size());
+-    setMask(d->background->mask());
++    if (Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) {
++        clearMask();
++    } else {
++        setMask(d->background->mask());
++    }
+     d->preview->setInfo();
+     if (isVisible()) {
+Index: plasma/tests/packagemetadatatest.desktop
+===================================================================
+--- plasma/tests/packagemetadatatest.desktop   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/tests/packagemetadatatest.desktop   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -101,6 +101,7 @@
+ Comment[kn]=PackageMetaData ವರ್ಗವನ್ನು ಪರೀಕ್ಷಿಸಲು ಒಂದು ಪರೀಕ್ಷಾರ್ಥ ಗಣಕತೆರೆ ಕಡತ.
+ Comment[ko]=PackageMetaData 클래스를 테스트하는 데스크톱 파일.
+ Comment[ku]=Pela ceribandina sermasê ku beşên SerDanayêPakêtê diceribîne.
++Comment[lt]=Bandomasis desktop failas skirtas PackageMetaData klasei.
+ Comment[lv]=Testa .dekstop fails, lai pārbaudītu PackageMetaData klasi.
+ Comment[mai]=PackageMetaData वर्गक जाँचबाक लेल एकटा जाँचि डेस्कटाप फाइल.
+ Comment[ml]=പാക്കേജ്മെറ്റാഡാറ്റാ ക്ലാസ് പരിശോധിയ്ക്കാനുള്ള പരിശോധനാ പണിയിട ഫയല്‍.
+Index: plasma/data/servicetypes/plasma-applet-popupapplet.desktop
+===================================================================
+--- plasma/data/servicetypes/plasma-applet-popupapplet.desktop (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/data/servicetypes/plasma-applet-popupapplet.desktop (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -31,6 +31,7 @@
+ Comment[km]=អាប់ភ្លេត​លេចឡើង​របស់​ស្គ្រីប​ប្លាស្មា
+ Comment[kn]=ಪ್ಲಾಸ್ಮಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ವಿಕಸನ ಪುಟಿಕೆ (ಪಾಪಪ್) ಅನ್ವಯಾಂಶ (ಆಪ್ಲೆಟ್)
+ Comment[ko]=Plasma 스크립팅 팝업 애플릿
++Comment[lt]=Plasma scenarijų iškylantis įskiepis
+ Comment[lv]=Plasma skriptu uznirstošais logs
+ Comment[ml]=പ്ലാസ്മ സ്ക്രിപ്റ്റിങ്ങിന്റെ പൊങ്ങിവരുന്ന ലഘുപ്രയോഗം
+ Comment[nb]=Oppsprett-miniprogram for Plasma-skripting
+Index: plasma/data/servicetypes/plasma-containmentactions.desktop
+===================================================================
+--- plasma/data/servicetypes/plasma-containmentactions.desktop (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/data/servicetypes/plasma-containmentactions.desktop (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -24,6 +24,7 @@
+ Comment[it]=ContainmentActions di Plasma
+ Comment[km]=ប្លាស្មា ContainmentActions
+ Comment[ko]=Plasma ContainmentActions
++Comment[lt]=Plasma konteinerių veiksmai
+ Comment[nb]=Plasma ContainmentActions
+ Comment[nds]=Plasma-Gelaatsakschonen
+ Comment[nl]=Plasma Containeracties
+Index: plasma/data/servicetypes/plasma-applet-extenderapplet.desktop
+===================================================================
+--- plasma/data/servicetypes/plasma-applet-extenderapplet.desktop      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/data/servicetypes/plasma-applet-extenderapplet.desktop      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -33,6 +33,7 @@
+ Name[km]=សម្រាំង
+ Name[kn]=ಸಮೂಹ
+ Name[ko]=모음집
++Name[lt]=Kolekcija
+ Name[lv]=Kolekcija
+ Name[ml]=കൂട്ടം
+ Name[ms]=Koleksi
+Index: plasma/kcm_remotewidgets.actions
+===================================================================
+--- plasma/kcm_remotewidgets.actions   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/kcm_remotewidgets.actions   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -21,6 +21,7 @@
+ Name[it]=Salva regole elementi remoti
+ Name[km]=រក្សា​ទុក​គោលនយោបាយ​ធាតុក្រាហ្វិក​ពី​ចម្ងាយ
+ Name[ko]=원격 위젯 정책 저장
++Name[lt]=Įrašyti nutolusių valdiklių politiką
+ Name[lv]=Saglabāt attālināto sīkrīku politikas
+ Name[nb]=Lagre praksis for nettverkselementer
+ Name[nds]=Regeln för feern Lüttprogrammen sekern
+@@ -65,6 +66,7 @@
+ Description[it]=Impedisce al sistema di salvare le regole degli elementi plasma remoti
+ Description[km]=ការ​ពារ​​ប្រព័ន្ធ​​កុំ​ឲ្យ​រក្សាទុក​គោលការណ៍​ធាតុ​ក្រាហ្វិក​ប្លាស្មា​ពីចម្ងាយ
+ Description[ko]=Plasma 원격 위젯 정책을 저장하지 못하도록 합니다
++Description[lt]=Apsaugo sistemą nuo plazmos nutolusių valdiklių politikos įrašymo
+ Description[lv]=Liedz sistēmai saglabāt plasma attālināto sīkrīku politikas
+ Description[nb]=Hindrer at systemet lagrer praksiser for plasmaelementer på nettverket
+ Description[nds]=Höllt dat Systeem vun't Sekern vun de Regeln för feern Plasma-Lüttprogrammen af
+Index: plasma/extenders/extender.cpp
+===================================================================
+--- plasma/extenders/extender.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/extenders/extender.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -566,7 +566,7 @@
  
- DOMString TextImpl::toString(long long startOffset, long long endOffset) const
+ void ExtenderPrivate::removeExtenderItem(ExtenderItem *item)
  {
--    // FIXME: substitute entity references as needed!
--
-     DOMString str = nodeValue();
-     if(endOffset >=0 || startOffset >0)
-       str = str.copy(); //we are going to modify this, so make a copy.  I hope I'm doing this right.
-@@ -581,7 +601,7 @@
-         str.truncate(endOffset); 
-     if(startOffset > 0)    //note the order of these 2 'if' statements so that it works right when n==m_startContainer==m_endContainer
-         str.remove(0, startOffset);
--    return escapeHTML( str );
-+    return textNeedsEscaping( this ) ? escapeHTML( str ) : str;
- }
+-    attachedExtenderItems.removeOne(item);
++    attachedExtenderItems.removeAll(item);
  
- // ---------------------------------------------------------------------------
-@@ -614,7 +634,6 @@
+     //collapse the popupapplet if the last item is removed.
+     if (!q->attachedItems().count()) {
+Index: plasma/extenders/extenderitem.cpp
+===================================================================
+--- plasma/extenders/extenderitem.cpp  (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ plasma/extenders/extenderitem.cpp  (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -263,10 +263,11 @@
+     //and notify the applet of the item being detached, after the config has been moved.
+     emit d->extender->itemDetached(this);
++    setParentItem(extender);
++    setParent(extender);
+     d->extender = extender;
+     //change parent.
+-    setParentItem(extender);
+     extender->d->addExtenderItem(this, pos);
+     //cancel the timer.
+@@ -587,7 +588,7 @@
+     pixmap.fill(Qt::transparent);
+     QPainter p(&pixmap);
+-    //the following is necesarry to avoid having an offset when rendering the widget into the
++    //the following is necessary to avoid having an offset when rendering the widget into the
+     //pixmap.
+     view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+     view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+@@ -598,9 +599,10 @@
+     view.setSceneRect(sceneBoundingRect());
+     view.render(&p, QRectF(QPointF(0, 0), pixmap.size()), QRect(QPoint(0, 0), screenSize));
+-    //create the necesarry mimedata.
++    //create the necessary mimedata.
+     ExtenderItemMimeData *mimeData = new ExtenderItemMimeData();
+     mimeData->setExtenderItem(this);
++    mimeData->setPointerOffset(d->mousePos);
+     //Hide empty internal extender containers when we drag the last item away. Avoids having
+     //an ugly empty applet on the desktop temporarily.
+@@ -610,10 +612,6 @@
+         extenderApplet->formFactor() != Plasma::Vertical) {
+         kDebug() << "leaving the internal extender container, so hide the applet and it's handle.";
+         extenderApplet->hide();
+-        AppletHandle *handle = dynamic_cast<AppletHandle*>(extenderApplet->parentItem());
+-        if (handle) {
+-            handle->hide();
+-        }
+     }
  
- DOMString CDATASectionImpl::toString() const
- {
--    // FIXME: substitute entity references as needed!
-     return DOMString("<![CDATA[") + nodeValue() + "]]>";
- }
+     ExtenderGroup *group = qobject_cast<ExtenderGroup*>(this);
+@@ -632,17 +630,24 @@
+     Qt::DropAction action = drag->exec();
  
-Index: khtml/xml/dom_stringimpl.cpp
-===================================================================
---- khtml/xml/dom_stringimpl.cpp       (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ khtml/xml/dom_stringimpl.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -523,6 +523,7 @@
- static const unsigned short amp[] = {'&', 'a', 'm', 'p', ';'};
- static const unsigned short lt[] =  {'&', 'l', 't', ';'};
- static const unsigned short gt[] =  {'&', 'g', 't', ';'};
-+static const unsigned short nbsp[] =  {'&', 'n', 'b', 's', 'p', ';'};
+     corona->removeOffscreenWidget(this);
++    d->dragStarted = false;
  
- DOMStringImpl *DOMStringImpl::escapeHTML()
- {
-@@ -532,6 +533,8 @@
-             outL += 5; //&amp;
-         else if (s[i] == '<' || s[i] == '>')
-             outL += 4; //&gt;/&lt;
-+        else if (s[i] == QChar::Nbsp)
-+            outL += 6; //&nbsp;
-         else
-             ++outL;
+     if (!action || !drag->target()) {
+         //we weren't moved, so reinsert the item in our current layout.
++        //TODO: make it into a stand-alone window?
++        d->themeChanged();
+         d->extender->itemAddedEvent(this, curPos);
++        if (extenderApplet) {
++            extenderApplet->show();
++        }
++
++        d->extender->itemAddedEvent(this, curPos);
      }
-@@ -554,6 +557,9 @@
-         } else if (s[i] == '>') {
-             memcpy(&toRet->s[outP], gt, sizeof(gt));
-             outP += 4;
-+        } else if (s[i] == QChar::Nbsp) {
-+            memcpy(&toRet->s[outP], nbsp, sizeof(nbsp));
-+            outP += 6;
-         } else {
-             toRet->s[outP] = s[i];
-             ++outP;
-Index: kjs/regexp.cpp
-===================================================================
---- kjs/regexp.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kjs/regexp.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -44,6 +44,8 @@
- RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown;
-+static bool sanitizePatternExtensions(UString &p, WTF::Vector<int>* parenIdx = 0);
-+
- // JS regexps can contain Unicode escape sequences (\uxxxx) which
- // are rather uncommon elsewhere. As our regexp libs don't understand
- // them we do the unescaping ourselves internally.
-@@ -51,11 +53,13 @@
- // expects null termination..
- static UString sanitizePattern(const UString &p)
- {
--  UString newPattern;
-+  UString np;
-+  bool changed = false;
-   const char* const nil = "\\x00";
-   if (p.find("\\u") >= 0 || p.find(KJS::UChar('\0')) >= 0) {
-     bool escape = false;
-+    changed = true;
-     for (int i = 0; i < p.size(); ++i) {
-       UChar c = p[i];
-       if (escape) {
-@@ -81,13 +85,13 @@
-         if (j < 4) {
-           // sequence was incomplete. treat \u as u which IE always
-           // and FF sometimes does.
--           newPattern.append(UString('u'));
-+           np.append(UString('u'));
-         } else {
-             c = UChar(u);
-             switch (u) {
-             case 0:
-             // Make sure to encode 0, to avoid terminating the string
--             newPattern += UString(nil);
-+             np += UString(nil);
-             break;
-             case '^':
-             case '$':
-@@ -101,35 +105,87 @@
-             case '[': case ']':
-             case '|':
-             // escape pattern characters have to remain escaped
--             newPattern.append(UString('\\'));
-+             np.append(UString('\\'));
-             // intentional fallthrough
-             default:
--            newPattern += UString(&c, 1);
-+            np += UString(&c, 1);
-             break;
-           }
-           }
-           continue;
-         }
--        newPattern += UString('\\');
--        newPattern += UString(&c, 1);
-+        np += UString('\\');
-+        np += UString(&c, 1);
-       } else {
-         if (c == '\\')
-           escape = true;
-         else if (c == '\0')
--          newPattern += UString(nil);
-+          np += UString(nil);
-         else
--          newPattern += UString(&c, 1);
-+          np += UString(&c, 1);
-       }
+     if (isGroup() && !collapsedGroup) {
+         group->expandGroup();
      }
--    return newPattern;
--  } else {
--    return p;
-   }
-+  // Rewrite very inefficient RE formulation:
-+  // (.|\s)+ is often used instead of the less intuitive, but vastly preferable [\w\W]+
-+  // The first wording needs to recurse at each character matched in libPCRE, leading to rapid exhaustion of stack space.
-+  if (p.find(".|\\s)")>=0) {
-+      if (np.isEmpty())
-+          np = p;
-+      bool didRewrite = false;
-+      WTF::Vector<int> parenIdx;
-+      sanitizePatternExtensions(np, &parenIdx);
-+      Vector<int>::const_iterator end = parenIdx.end();
-+      int previdx = 0;
-+      UString tmp;
-+      bool nonCapturing = false;
-+      for (Vector<int>::const_iterator it = parenIdx.begin(); it != end; ++it) {
-+          int idx = *it;
-+          if (np.size() < idx+6)
-+              break;
-+          if (np[idx+1] == '?' && np[idx+2] == ':') {
-+              nonCapturing = true;
-+              idx += 3;
-+          } else {
-+             ++idx;
-+          }
-+          if (!(np[idx] == '.' && np[idx+1] == '|' && np[idx+2] == '\\' && np[idx+3] == 's'))
-+              continue;
-+          if (np.size() >= idx+6 && (np[idx+5] == '+' || (np[idx+5] == '*')) &&
-+              // no need to do anything if the pattern is minimal e.g. (.|\s)+?
-+              !(np.size() > idx+6 && np[idx+6] == '?')) {
-+                  didRewrite = true;
-+                  if (nonCapturing) {               // trivial case: (?:.|\s)+ => [\w\W]+
-+                      tmp.append(np, previdx, idx-previdx-3);
-+                      tmp.append("[\\w\\W]");
-+                      tmp.append(np[idx+5]);
-+                  } else if (np[idx+5] == '*') {    // capture zero of one or more: (.|\s)* => (?:[\w\W]*([\w\W])|[\w\W]?)
-+                      tmp.append(np, previdx, idx-previdx-1);
-+                      tmp.append("(?:[\\w\\W]*([\\w\\W])|[\\w\\W]?)");
-+                  } else {                          // capture last of one or more: (.|\s)+ => [\w\W]*([\w\W])
-+                      assert(np[idx+5] == '+');
-+                      tmp.append(np, previdx, idx-previdx-1);
-+                      tmp.append("[\\w\\W]*([\\w\\W])");
-+                  }
-+          } else {
-+              tmp.append(np, previdx, idx-previdx+5);
-+          }
-+          previdx = idx+6;
-+      }
-+      if (didRewrite) {
-+          tmp.append(np, previdx);
-+          fprintf(stderr, "Pattern: %s ", np.ascii());
-+          fprintf(stderr, "was rewritten to: %s\n", tmp.ascii());
-+          np = tmp;
-+          changed = true;
-+      }
-+  }
-+  return (changed ? np : p);
+-    d->dragStarted = false;
  }
  
- // For now, the only 'extension' to standard we are willing to deal with is
- // a non-escaped closing bracket, outside of a character class. e.g. /.*]/
--static bool sanitizePatternExtensions(UString &p)
-+static bool sanitizePatternExtensions(UString &p, WTF::Vector<int>* parenIdx)
+ void ExtenderItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+@@ -845,12 +850,9 @@
  {
-   UString newPattern;
-@@ -138,6 +194,7 @@
-   bool escape = false;
-   int state = StateNominal;
-+  int escapedSinceLastParen = 0;
-   for (int i = 0; i < p.size(); ++i) {
-       UChar c = p[i];
-       if (escape) {
-@@ -150,13 +207,20 @@
-                 state = StateNominal;
-             } else if (state == StateNominal) {
-                 v.append(i);
-+                ++escapedSinceLastParen;
-             }
-         } else if (c == '[') {
-             if (state == StateOpenBracket) {
-                 v.append(i);
-+                ++escapedSinceLastParen;
-             } else if (state == StateNominal) {
-                 state = StateOpenBracket;
-             }
-+        } else if (c == '(') {
-+            if (parenIdx && state == StateNominal) {
-+                parenIdx->append(i+escapedSinceLastParen);
-+                escapedSinceLastParen = 0;
-+            }
-         }
+     if (dragStarted) {
+         background->setImagePath("opaque/widgets/extender-background");
++        background->setEnabledBorders(FrameSvg::AllBorders);
+     } else {
+         background->setImagePath("widgets/extender-background");
+-    }
+-    if (dragStarted) {
+-        background->setEnabledBorders(FrameSvg::AllBorders);
+-    } else {
+         background->setEnabledBorders(extender->enabledBordersForItem(q));
      }
-   }
-@@ -176,7 +240,7 @@
-       p = newPattern;
-       return true;
-   } else {
--    return false;
-+      return false;
-   }
+     background->getMargins(bgLeft, bgTop, bgRight, bgBottom);
+Index: khtml/html/html_formimpl.cpp
+===================================================================
+--- khtml/html/html_formimpl.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ khtml/html/html_formimpl.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -2429,7 +2429,7 @@
+         HTMLOptionElementImpl* const option = static_cast<HTMLOptionElementImpl*>(items[0]);
+         encoded_values += enc_name;
+         if (option->value().isNull())
+-            encoded_values += fixUpfromUnicode(codec, option->text().string().trimmed());
++            encoded_values += fixUpfromUnicode(codec, option->text().string());
+         else
+             encoded_values += fixUpfromUnicode(codec, option->value().string());
+         successful = true;
+@@ -2711,7 +2711,7 @@
+     if ( !m_value.isNull() )
+         return m_value;
+     // Use the text if the value wasn't set.
+-    return text().string().simplified();
++    return text().string();
  }
  
-Index: kdoctools/customization/nl/user.entities
-===================================================================
---- kdoctools/customization/nl/user.entities   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdoctools/customization/nl/user.entities   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -39,6 +39,7 @@
- <!ENTITY Jordy.Ritico      '<othercredit role="translator"><firstname>Jordy</firstname><surname>Ritico</surname><affiliation><address><email>jordyritico@hotmail.com</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
- <!ENTITY Kristof.Bal      '<othercredit role="translator"><firstname>Kristof</firstname><surname>Bal</surname><affiliation><address><email>kristof.bal@gmail.com</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
- <!ENTITY Wendy.Van.Craen      '<othercredit role="translator"><firstname>Wendy</firstname><surname>Van Craen</surname><affiliation><address><email>wendy.vancraen@kde.org</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
-+<!ENTITY Freek.de.Kruijf      '<othercredit role="translator"><firstname>Freek</firstname><surname>de Kruijf</surname><affiliation><address><email>f.de.kruijf@gmail.com</email></address></affiliation><contrib>Vertaler/Nalezer</contrib></othercredit>'>
- <!ENTITY kde.nl.groep       "<email>i18n@kde.nl</email>">
- <!-- Tekstschema's -->
-@@ -76,6 +77,7 @@
- <!ENTITY vertaling.jordy        "<para>Dit document is vertaald in het Nederlands door &Jordy.Ritico;.</para>">
- <!ENTITY vertaling.kristof      "<para>Dit document is vertaald in het Nederlands door &Kristof.Bal;.</para>">
- <!ENTITY vertaling.wendy        "<para>Dit document is vertaald in het Nederlands door &Wendy.Van.Craen;.</para>">
-+<!ENTITY vertaling.freek        "<para>Dit document is vertaald in het Nederlands door &Freek.de.Kruijf;.</para>">
- <!-- Gebruiken als template voor nieuwe vertalers/nalezers
-@@ -114,6 +116,7 @@
- <!ENTITY nagelezen.jordy      "<para>De vertaling werd nagelezen door &Jordy.Ritico;.</para>">
- <!ENTITY nagelezen.kristof    "<para>De vertaling werd nagelezen door &Kristof.Bal;.</para>">
- <!ENTITY nagelezen.wendy      "<para>De vertaling werd nagelezen door &Wendy.Van.Craen;.</para>">
-+<!ENTITY nagelezen.freek      "<para>De vertaling werd nagelezen door &Freek.de.Kruijf;.</para>">
- <!-- Algemene afkortingen -->
- <!ENTITY Alt     "<keycap>Alt</keycap>">
-Index: README
-===================================================================
---- README     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ README     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -193,7 +193,7 @@
- ----------------
- Often, KDE compile failures are not KDE's fault, but the fault of the
- compiler or the distribution used. For that reason, please have a look at
--http://developer.kde.org/build/compilationfaq.html for known issues in certain
-+http://techbase.kde.org/Getting_Started/Build/FAQ for known issues in certain
- OS environments before reporting bugs or going mad :).
- KDE 4 requires gcc 3.3 or better as the compiler.
-Index: kdeui/dialogs/kcupsoptionswidget_p.cpp
-===================================================================
---- kdeui/dialogs/kcupsoptionswidget_p.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdeui/dialogs/kcupsoptionswidget_p.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -44,15 +44,18 @@
- bool KCupsOptionsWidget::cupsAvailable()
- {
-+#ifdef Q_WS_X11
-     // Ideally we would have access to the private Qt method
--    // QCUPSSupport::cupsAvailable() to do this as it is very complex routine,
--    // instead just take the simplest case of if we can connect to port 631
--    // then assume CUPS must be running and used by Qt.
--    QTcpSocket qsock;
--    qsock.connectToHost("localhost", 631);
--    bool rtn = qsock.waitForConnected() && qsock.isValid();
--    qsock.abort();
--    return rtn;
-+    // QCUPSSupport::cupsAvailable() to do this as it is very complex routine.
-+    // However, if CUPS is available then QPrinter::numCopies() will always return 1
-+    // whereas if CUPS is not available it will return the real number of copies.
-+    // This behaviour is guaranteed never to change, so we can use it as a reliable substitute.
-+    QPrinter testPrinter;
-+    testPrinter.setNumCopies( 2 );
-+    return ( testPrinter.numCopies() == 1 );
-+#else
-+    return false;
-+#endif
+ void HTMLOptionElementImpl::setValue(DOMStringImpl* value)
+Index: khtml/rendering/render_image.cpp
+===================================================================
+--- khtml/rendering/render_image.cpp   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ khtml/rendering/render_image.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -383,8 +383,6 @@
+     if (inside && element()) {
+         int tx = _tx + m_x;
+         int ty = _ty + m_y;
+-        if (isRelPositioned())
+-            relativePositionOffset(tx, ty);
+         HTMLImageElementImpl* i = element()->id() == ID_IMG ? static_cast<HTMLImageElementImpl*>(element()) : 0;
+         HTMLMapElementImpl* map;
+Index: khtml/khtml_global.cpp
+===================================================================
+--- khtml/khtml_global.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ khtml/khtml_global.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -28,6 +28,7 @@
+ #include "html/html_imageimpl.h"
+ #include "rendering/render_style.h"
+ #include "rendering/break_lines.h"
++#include "misc/htmlnames.h"
+ #include "misc/loader.h"
+ #include "misc/arena.h"
+ #include "misc/paintbuffer.h"
+@@ -69,7 +70,7 @@
+     khtml::LocalNameFactory::initIdTable();
+     DOM::emptyLocalName = DOM::LocalName::fromId(0);
+     DOM::emptyPrefixName = DOM::PrefixName::fromId(0);
+-    DOM::emptyNamespaceName = DOM::NamespaceName::fromId(0);
++    DOM::emptyNamespaceName = DOM::NamespaceName::fromId(DOM::emptyNamespace);
+     WebCore::SVGNames::init();
  }
  
- void KCupsOptionsWidget::setupPrinter()
-Index: kdeui/itemviews/kselectionproxymodel.cpp
+Index: kjs/object.cpp
 ===================================================================
---- kdeui/itemviews/kselectionproxymodel.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdeui/itemviews/kselectionproxymodel.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -304,9 +304,6 @@
- {
-   Q_Q(KSelectionProxyModel);
+--- kjs/object.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kjs/object.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -42,7 +42,7 @@
+ // If we improve our stack usage, we can bump this number.
+ #define KJS_MAX_STACK 100
+ #else
+-#define KJS_MAX_STACK 900
++#define KJS_MAX_STACK 700 // ### set system specific
+ #endif
  
--  if (!m_selectionModel->hasSelection())
--    return;
--
-   // Deselecting an index in the selectionModel will cause it to
-   // be removed from m_rootIndexList, so we don't need to clear
-   // the list here manually.
-@@ -325,13 +322,12 @@
- {
-   Q_Q(KSelectionProxyModel);
  
--  if (!m_selectionModel->hasSelection())
--    return;
--
-   // No need to try to refill this. When the model is reset it doesn't have a meaningful selection anymore,
-   // but when it gets one we'll be notified anyway.
-   resetInternalData();
-+  m_selectionModel->clearSelection();
-   m_resetting = false;
-+  createProxyChain();
-   q->endResetModel();
- }
+@@ -61,8 +61,9 @@
  
-@@ -372,11 +368,14 @@
-     parentPosition--;
+   if (++depth > KJS_MAX_STACK) {
+     depth -= 11; //Give the debugger some room..
+-    return throwError(exec, RangeError, "Maximum call stack size exceeded.");
++    JSValue *ret = throwError(exec, RangeError, "Maximum call stack size exceeded.");
+     depth += 10; //Put it back..
++    return ret;
+   }
+ #endif
  
-     parentAbove = m_rootIndexList.at(parentPosition);
-+    Q_ASSERT(parentAbove.isValid());
+Index: kdoctools/docbook/xsl/common/nl.xml
+===================================================================
+--- kdoctools/docbook/xsl/common/nl.xml        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdoctools/docbook/xsl/common/nl.xml        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -180,6 +180,9 @@
+    <l:gentext key="hyphenation-character" text="-" lang="en"/>
+    <l:gentext key="hyphenation-push-character-count" text="2" lang="en"/>
+    <l:gentext key="hyphenation-remain-character-count" text="2" lang="en"/>
++   <l:gentext key="footer-doc-comment" text="Wilt u een opmerking maken of  een bijdragen leveren aan deze pagina?"/>
++   <l:gentext key="footer-doc-feedback" text="Stuur uw bericht aan het "/>
++   <l:gentext key="footer-doc-teamname" text="KDE Documentatieteam"/>
+    <l:context name="styles">
+       <l:template name="person-name" text="first-last"/>
+Index: kdoctools/customization/fr/user.entities
+===================================================================
+--- kdoctools/customization/fr/user.entities   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdoctools/customization/fr/user.entities   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -14,6 +14,9 @@
+ <!ENTITY traducteurPierreAuckenthaler      '<othercredit role="translator"><firstname>Pierre</firstname><surname>Auckenthaler</surname><affiliation><address><email>pierre.auckenthaler@polytechnique.org</email></address></affiliation><contrib>Traduction française&nbsp;</contrib></othercredit>'>
+ <!ENTITY relecteurPierreAuckenthaler         '<othercredit role="reviewer"><firstname>Pierre</firstname><surname>Auckenthaler</surname><affiliation><address><email>pierre.auckenthaler@polytechnique.org</email></address></affiliation><contrib>Relecture de la documentation française&nbsp;</contrib></othercredit>'>
++<!ENTITY traducteurKeziahAzad      '<othercredit role="translator"><firstname>Keziah</firstname><surname>Azad</surname><affiliation><address><email>kydeza@yahoo.fr</email></address></affiliation><contrib>Traduction française&nbsp;</contrib></othercredit>'>
++<!ENTITY relecteurKeziahAzad         '<othercredit role="reviewer"><firstname>Keziah</firstname><surname>Azad</surname><affiliation><address><email>kydeza@yahoo.fr</email></address></affiliation><contrib>Relecture de la documentation française&nbsp;</contrib></othercredit>'>
++
+ <!ENTITY traducteurEricBischoff       '<othercredit role="translator"><firstname>Éric</firstname><surname>Bischoff</surname><affiliation><address><email>e.bischoff@noos.fr</email></address></affiliation><contrib>Traduction française&nbsp;</contrib></othercredit>'>
+ <!ENTITY relecteurEricBischoff        '<othercredit role="reviewer"><firstname>Éric</firstname><surname>Bischoff</surname><affiliation><address><email>e.bischoff@noos.fr</email></address></affiliation><contrib>Relecture de la documentation française&nbsp;</contrib></othercredit>'>
+@@ -247,6 +250,7 @@
+ <!ENTITY DavidAmmouial     'David Ammouial <email></email>'>
+ <!ENTITY PierreAuckenthaler 'Pierre Auckenthaler <email>pierre.auckenthaler@polytechnique.org</email>'>
++<!ENTITY KeziahAzad        'Keziah Azad <email>kydeza@yahoo.fr</email>'>
+ <!ENTITY EricBischoff      'Éric Bischoff <email>e.bischoff@noos.fr</email>'>
+ <!ENTITY JeromeBlanc       'Jérôme Blanc <email>01246774@brookes.ac.uk</email>'>
+ <!ENTITY CyrilleBieuzent    'Cyrille Bieuzent <email>bieuzent@gmail.com</email>'>
+Index: kparts/statusbarextension.cpp
+===================================================================
+--- kparts/statusbarextension.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kparts/statusbarextension.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -47,7 +47,7 @@
  
-     int rows = q->sourceModel()->rowCount(parentAbove);
-     if ( rows > 0 )
+     void ensureItemShown( KStatusBar * sb )
      {
--      QModelIndex proxyChildAbove = q->mapFromSource(q->sourceModel()->index(rows - 1, 0, parentAbove));
-+      QModelIndex sourceIndexAbove = q->sourceModel()->index(rows - 1, 0, parentAbove);
-+      Q_ASSERT(sourceIndexAbove.isValid());
-+      QModelIndex proxyChildAbove = q->mapFromSource(sourceIndexAbove);
-       Q_ASSERT(proxyChildAbove.isValid());
-       return proxyChildAbove.row() + 1;
+-      if ( !m_visible )
++      if ( m_widget && !m_visible )
+       {
+         if ( m_permanent )
+             sb->addPermanentWidget( m_widget, m_stretch );
+@@ -59,7 +59,7 @@
      }
-@@ -618,6 +617,7 @@
+     void ensureItemHidden( KStatusBar * sb )
      {
-       // The easy case.
-       bool allowMove = q->beginMoveRows(q->mapFromSource(srcParent), srcStart, srcEnd, q->mapFromSource(destParent), destRow);
-+      Q_UNUSED( allowMove ); // prevent warning in release builds.
-       Q_ASSERT( allowMove );
-     } else {
-       // source is in the proxy, but dest isn't.
-@@ -1112,17 +1112,16 @@
-           q->beginInsertRows(QModelIndex(), startRow, startRow + rowCount - 1);
-         Q_ASSERT(newIndex.isValid());
-         m_rootIndexList.insert(rootListRow, newIndex);
-+        emit q->rootIndexAdded(newIndex);
-         if (!m_resetting)
-         {
--          emit q->rootIndexAdded(newIndex);
-           q->endInsertRows();
-         }
-       } else {
-         // Even if the newindex doesn't have any children to put into the model yet,
-         // We still need to make sure it's future children are inserted into the model.
-         m_rootIndexList.insert(rootListRow, newIndex);
--        if (!m_resetting)
--          emit q->rootIndexAdded(newIndex);
-+        emit q->rootIndexAdded(newIndex);
-       }
-     } else {
-       QModelIndexList list = toNonPersistent(m_rootIndexList);
-@@ -1132,9 +1131,9 @@
-         q->beginInsertRows(QModelIndex(), row, row);
-       Q_ASSERT(newIndex.isValid());
-       m_rootIndexList.insert(row, newIndex);
-+      emit q->rootIndexAdded(newIndex);
-       if (!m_resetting)
+-      if ( m_visible )
++      if ( m_widget && m_visible )
        {
--        emit q->rootIndexAdded(newIndex);
-         q->endInsertRows();
+         sb->removeWidget( m_widget );
+         m_visible = false;
+@@ -67,7 +67,7 @@
        }
      }
-@@ -1415,7 +1414,21 @@
-       d->m_map.insert(sourceIndex.internalPointer(), QPersistentModelIndex(sourceIndex));
-       return createIndex( row, sourceIndex.column(), sourceIndex.internalPointer() );
+   private:
+-    QWidget * m_widget;
++    QPointer<QWidget> m_widget;
+     int m_stretch;
+     bool m_permanent;
+     bool m_visible;  // true when the item has been added to the statusbar
+Index: sonnet/plugins/hunspell/kspell_hunspell.desktop
+===================================================================
+--- sonnet/plugins/hunspell/kspell_hunspell.desktop    (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ sonnet/plugins/hunspell/kspell_hunspell.desktop    (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -38,6 +38,7 @@
+ Name[kk]=Hunspell
+ Name[km]=Hunspell
+ Name[ko]=Hunspell
++Name[lt]=Hunspell
+ Name[lv]=Hunspell
+ Name[ms]=Hunspell
+ Name[nb]=Hunspell
+Index: kded/kbuildmimetypefactory.cpp
+===================================================================
+--- kded/kbuildmimetypefactory.cpp     (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/kbuildmimetypefactory.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -267,7 +267,13 @@
+             const QString parentTypeName = line.mid(pos+1);
+             Q_ASSERT(!aliasTypeName.isEmpty());
+             Q_ASSERT(!parentTypeName.isEmpty());
+-            aliasMap.insert(aliasTypeName, parentTypeName);
++
++            const KMimeType::Ptr realMimeType =
++                findMimeTypeByName(aliasTypeName, KMimeType::DontResolveAlias);
++            if (realMimeType)
++                kDebug(7021) << "Ignoring alias" << aliasTypeName << "because also defined as a real mimetype";
++            else
++                aliasMap.insert(aliasTypeName, parentTypeName);
+         }
      }
--    return QModelIndex();
-+    QModelIndex sourceParent = sourceIndex.parent();
-+    int parentRow = d->m_rootIndexList.indexOf( sourceParent );
-+    if ( parentRow == -1 )
-+      return QModelIndex();
-+
-+    int proxyRow = sourceIndex.row();
-+    while (parentRow > 0)
-+    {
-+      --parentRow;
-+      QModelIndex selectedIndexAbove = d->m_rootIndexList.at( parentRow );
-+      proxyRow += sourceModel()->rowCount(selectedIndexAbove);
-+    }
-+
-+    d->m_map.insert(sourceIndex.internalPointer(), QPersistentModelIndex(sourceIndex));
-+    return createIndex( proxyRow, sourceIndex.column(), sourceIndex.internalPointer() );
-   } else if ( d->isInModel( sourceIndex ) )
-   {
-     int targetRow = sourceIndex.row();
-@@ -1662,7 +1675,7 @@
-   QModelIndexList list;
-   QModelIndex proxyIndex;
--  foreach(const QModelIndex idx, sourceModel()->match(mapToSource(start), role, value, hits, flags))
-+  foreach(const QModelIndex &idx, sourceModel()->match(mapToSource(start), role, value, hits, flags))
-   {
-     proxyIndex = mapFromSource(idx);
-     if (proxyIndex.isValid())
-Index: kdewebkit/kdewebkit.qrc
-===================================================================
---- kdewebkit/kdewebkit.qrc    (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/kdewebkit.qrc    (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -1,6 +0,0 @@
--<RCC>
--    <qresource prefix="/" >
--        <file>resources/parseForms.js</file>
--        <file>resources/parseFormNames.js</file>
--    </qresource>
--</RCC>
-Index: kdewebkit/kwebwallet.cpp
-===================================================================
---- kdewebkit/kwebwallet.cpp   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/kwebwallet.cpp   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -30,6 +30,8 @@
- #include <QtCore/QPointer>
- #include <QtWebKit/QWebPage>
- #include <QtWebKit/QWebFrame>
-+#include <QtWebKit/QWebElement>
-+#include <QtWebKit/QWebElementCollection>
- #include <qwindowdefs.h>
- #define QL1S(x)   QLatin1String(x)
-@@ -39,14 +41,11 @@
-  * Creates key used to store and retrieve form data.
-  *
-  */
--static QString walletKey(KWebWallet::WebForm form, bool useIndexOnEmptyName = false)
-+static QString walletKey(KWebWallet::WebForm form)
- {
-     QString key = form.url.toString(QUrl::RemoveQuery|QUrl::RemoveFragment);
-     key += QL1C('#');
--    if (form.name.isEmpty() && useIndexOnEmptyName)
--        key += form.index;
--    else
--        key += form.name;
-+    key += form.name;
-     return key;
- }
-@@ -59,6 +58,22 @@
-     return value;
  }
+Index: kded/Info.plist.template
+===================================================================
+--- kded/Info.plist.template   (.../tags/KDE/4.4.1/kdelibs)    (wersja 0)
++++ kded/Info.plist.template   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -0,0 +1,36 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++<plist version="1.0">
++<dict>
++    <key>CFBundleDevelopmentRegion</key>
++    <string>English</string>
++    <key>CFBundleExecutable</key>
++    <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
++    <key>CFBundleGetInfoString</key>
++    <string>${MACOSX_BUNDLE_INFO_STRING}</string>
++    <key>CFBundleIconFile</key>
++    <string>${MACOSX_BUNDLE_ICON_FILE}</string>
++    <key>CFBundleIdentifier</key>
++    <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
++    <key>CFBundleInfoDictionaryVersion</key>
++    <string>6.0</string>
++    <key>CFBundleLongVersionString</key>
++    <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
++    <key>CFBundleName</key>
++    <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
++    <key>CFBundlePackageType</key>
++    <string>APPL</string>
++    <key>CFBundleShortVersionString</key>
++    <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
++    <key>CFBundleVersion</key>
++    <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
++    <key>CSResourcesFileMapped</key>
++    <true/>
++    <key>LSRequiresCarbon</key>
++    <true/>
++    <key>LSUIElement</key>
++    <string>1</string>
++    <key>NSHumanReadableCopyright</key>
++    <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
++</dict>
++</plist>
+Index: kded/tests/kmimeassociationstest.cpp
+===================================================================
+--- kded/tests/kmimeassociationstest.cpp       (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/tests/kmimeassociationstest.cpp       (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -18,6 +18,7 @@
+     Boston, MA 02110-1301, USA.
+ */
++#include <kmimetypefactory.h>
+ #include <kprocess.h>
+ #include <kconfiggroup.h>
+ #include <kdesktopfile.h>
+@@ -163,6 +164,8 @@
+                                "text/html=kde4-kfmclient_html.desktop;\n"
+                                // konsole.desktop is without kde4- to test fallback lookup
+                                "text/plain=kde4-kate.desktop;kde4-kwrite.desktop;konsole.desktop;idontexist.desktop;\n"
++                               // test alias resolution
++                               "application/x-pdf=fakejpegapplication.desktop;\n"
+                                "[Added KParts/ReadOnlyPart Associations]\n"
+                                "text/plain=katepart.desktop;\n"
+                                "[Removed Associations]\n"
+@@ -170,6 +173,7 @@
+                                "text/html=kde4-dolphin.desktop;kde4-kwrite.desktop;\n";
+         // Expected results
+         preferredApps["image/jpeg"] << "fakejpegapplication.desktop";
++        preferredApps["application/pdf"] << "fakejpegapplication.desktop";
+         preferredApps["text/plain"] << "kde4-kate.desktop" << "kde4-kwrite.desktop";
+         preferredApps["text/html"] << "kde4-kfmclient_html.desktop";
+         removedApps["image/jpeg"] << "firefox.desktop";
+@@ -189,7 +193,7 @@
+     void testParseSingleFile()
+     {
+         KOfferHash offerHash;
+-        KMimeAssociations parser(offerHash);
++        KMimeAssociations parser(offerHash, KMimeTypeFactory::self());
+         KTemporaryFile tempFile;
+         QVERIFY(tempFile.open());
+@@ -230,7 +234,7 @@
+     void testGlobalAndLocalFiles()
+     {
+         KOfferHash offerHash;
+-        KMimeAssociations parser(offerHash);
++        KMimeAssociations parser(offerHash, KMimeTypeFactory::self());
  
-+static int getWebFields(const QWebElement &formElement,
-+                        const QString& selector, QList<KWebWallet::WebForm::WebField> &fields)
-+{
-+    QWebElementCollection collection = formElement.findAll(selector);
-+    const int count = collection.count();
-+
-+    for(int i = 0; i < count; ++i) {
-+        QWebElement element = collection.at(i);
-+        const QString value = element.evaluateJavaScript(QL1S("this.value")).toString();
-+        if (!value.isEmpty())
-+            fields << qMakePair(element.attribute(QL1S("name")), value);
-+    }
-+
-+    return count;
-+}
-+
- class KWebWallet::KWebWalletPrivate
- {  
+         // Write global file
+         KTemporaryFile tempFileGlobal;
+Index: kded/kbuildservicefactory.cpp
+===================================================================
+--- kded/kbuildservicefactory.cpp      (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/kbuildservicefactory.cpp      (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -286,7 +286,7 @@
+     }
+     // Read user preferences (added/removed associations) and add/remove serviceoffers to m_offerHash
+-    KMimeAssociations mimeAssociations(m_offerHash);
++    KMimeAssociations mimeAssociations(m_offerHash, m_mimeTypeFactory);
+     mimeAssociations.parseAllMimeAppsList();
+     // Now for each mimetype, collect services from parent mimetypes
+Index: kded/kmimeassociations.h
+===================================================================
+--- kded/kmimeassociations.h   (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/kmimeassociations.h   (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -25,6 +25,7 @@
+ #include <QStringList>
+ #include <QHash>
+ #include <kserviceoffer.h>
++class KMimeTypeFactory;
+ class KConfigGroup;
+ struct ServiceTypeOffersData {
+@@ -61,7 +62,7 @@
+ class KMimeAssociations
+ {
  public:
-@@ -96,35 +111,50 @@
-     Q_ASSERT(frame);
-     KWebWallet::WebFormList list;
--    const QString fileName = (fillform ? QL1S(":/resources/parseFormNames.js"):QL1S(":/resources/parseForms.js"));
--    QFile file(fileName);
-+    QWebElementCollection formElements = frame->findAllElements(QL1S("form[method=post]"));
-+    const int formElementCount = formElements.count();
--    if (file.open(QFile::ReadOnly)) {
--        const QVariant r = frame->evaluateJavaScript(file.readAll());
--        QListIterator<QVariant> formIt (r.toList());
--        while (formIt.hasNext()) {
-+    if (fillform) {
-+        for ( int i = 0; i < formElementCount; ++i ) {
-+            const QWebElement formElement = formElements.at(i);
-+
-             KWebWallet::WebForm form;
-             form.url = frame->url();
--            const QVariantMap map = formIt.next().toMap();
--            form.name = map.value(QL1S("name")).toString();
--            form.index = map.value(QL1S("index")).toString();
--            QListIterator<QVariant> elementIt (map.value(QL1S("elements")).toList());
--            while (elementIt.hasNext()) {
--                const QVariantMap elementMap = elementIt.next().toMap();
--                if ((fillform && elementMap[QL1S("autocomplete")].toString() == QL1S("off")) ||
--                    (ignorepasswd && elementMap.value(QL1S("type")).toString() == QL1S("password"))) {
--                    continue;
--                } else {
--                    KWebWallet::WebForm::WebField field = qMakePair(elementMap.value(QL1S("name")).toString(),
--                                                                    elementMap.value(QL1S("value")).toString());
--                    form.fields << field;
--                }
--            }
-+            form.index = QString::number(i);
-+            form.name = formElement.attribute(QL1S("name"));
-+            if (q->hasCachedFormData(form))
-+                list << form;
-+        }
-+    } else {
-+        int numPasswdFields = 0;
-+        QString passwdSelector;
+-    explicit KMimeAssociations(KOfferHash& offerHash);
++    explicit KMimeAssociations(KOfferHash& offerHash, KMimeTypeFactory* mimeTypeFactory);
  
--            if ((fillform && q->hasCachedFormData(form)) || !form.fields.isEmpty())
-+        if (!ignorepasswd)
-+            passwdSelector = QL1S("input[type=password]:not([autocomplete=off])");
-+
-+        for (int i = 0; i < formElementCount; ++i) {
-+            const QWebElement formElement = formElements.at(i);
-+
-+            KWebWallet::WebForm form;
-+            form.url = frame->url();
-+            form.index = QString::number(i);
-+            form.name = formElement.attribute(QL1S("name"));
-+
-+            // Get all <input> elements of type 'password'
-+            numPasswdFields = getWebFields(formElement, passwdSelector, form.fields);
-+
-+            // Get all <input> elements of type 'text'
-+            getWebFields(formElement, QL1S("input[type=text]:not([autocomplete=off])"), form.fields);
-+
-+            // Get all <input> elements without a type attribute.
-+            getWebFields(formElement, QL1S("input:not([type])"), form.fields);
-+
-+            // Add the form the list if it contains a password field...
-+            if ((ignorepasswd || numPasswdFields == 1) && !form.fields.isEmpty())
-                 list << form;
-         }
-     }
-+
-     return list;
- }
+     // Read mimeapps.list files
+     bool parseAllMimeAppsList();
+@@ -73,6 +74,7 @@
+     void parseRemovedAssociations(const KConfigGroup& group, const QString& file);
  
-@@ -239,7 +269,6 @@
-         // Delete the wallet if opening the wallet failed or we were unable
-         // to change to the folder we wanted to change to.
-         delete wallet;
--        kWarning() << "Deleted KWallet instance because it cannot be set to use its form data folder!";
-     }
- }
+     KOfferHash& m_offerHash;
++    KMimeTypeFactory* m_mimeTypeFactory;
+ };
  
-@@ -400,10 +429,8 @@
-             QListIterator<WebForm::WebField> fieldIt (form.fields);
-             while (fieldIt.hasNext()) {
-                 const WebForm::WebField field = fieldIt.next();
--                const QString script = QString (QL1S("if(document.forms[\"%1\"].elements[\"%2\"] && "
--                                                     "!document.forms[\"%1\"].elements[\"%2\"].disabled && "
--                                                     "!document.forms[\"%1\"].elements[\"%2\"].readonly) "
--                                                     "document.forms[\"%1\"].elements[\"%2\"].value=\"%3\";"))
-+                const QString script = QString::fromLatin1("var e = document.forms[\"%1\"].elements[\"%2\"];"
-+                                                           "if(e && !e.disabled  && !e.readonly) e.value=\"%3\";")
-                                        .arg(formName).arg(field.first).arg(escapeValue(field.second));
-                 frame->evaluateJavaScript(script);
-             }
-Index: kdewebkit/kwebview.cpp
+ #endif /* KMIMEASSOCIATIONS_H */
+Index: kded/CMakeLists.txt
 ===================================================================
---- kdewebkit/kwebview.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/kwebview.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -80,18 +80,21 @@
- }
- void KWebView::mouseReleaseEvent(QMouseEvent *event)
--{
-+{    
-     if (d->mouseReleased(event->pos())) {
-         event->accept();
-         return;
-     }
+--- kded/CMakeLists.txt        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/CMakeLists.txt        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -13,6 +13,12 @@
  
--    if (d->handleUrlPasteFromClipboard()) {
--        event->accept();
-+    // WORKAROUND: Let the page handle the event first so that middle clicking
-+    // on scroll bars does not result in navigation to url from the selection
-+    // clipboard.
-+    page()->event(event);
-+    if (event->isAccepted())
-         return;
--    }
+ kde4_add_kdeinit_executable(kded4  ${kded_KDEINIT_SRCS})
  
--    QWebView::mouseReleaseEvent(event);
-+    if (d->handleUrlPasteFromClipboard())
-+        event->accept();
- }
++if (Q_WS_MAC)
++    set_target_properties(kded4 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
++    set_target_properties(kded4 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kded.kded4")
++    set_target_properties(kded4 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Daemon")
++endif (Q_WS_MAC)
++
+ target_link_libraries(kdeinit_kded4  ${KDE4_KIO_LIBS} ${X11_LIBRARIES})
  
- #include "kwebview.moc"
-Index: kdewebkit/kgraphicswebview.cpp
+ install(TARGETS kdeinit_kded4 ${INSTALL_TARGETS_DEFAULT_ARGS})
+Index: kded/kmimeassociations.cpp
 ===================================================================
---- kdewebkit/kgraphicswebview.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/kgraphicswebview.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -89,12 +89,15 @@
-         return;
-     }
--    if (d->handleUrlPasteFromClipboard()) {
--        event->accept();
-+    // WORKAROUND: Let the page handle the event first so that middle clicking
-+    // on scroll bars does not result in navigation to url from the selection
-+    // clipboard.
-+    page()->event(event);
-+    if (event->isAccepted())
-         return;
--    }
+--- kded/kmimeassociations.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kded/kmimeassociations.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -19,6 +19,8 @@
+  */
  
--    QGraphicsWebView::mouseReleaseEvent(event);
-+    if (d->handleUrlPasteFromClipboard())
-+        event->accept();
+ #include "kmimeassociations.h"
++#include <kmimetype.h>
++#include <kmimetypefactory.h>
+ #include <kservice.h>
+ #include <kconfiggroup.h>
+ #include <kconfig.h>
+@@ -26,8 +28,8 @@
+ #include <kglobal.h>
+ #include <kstandarddirs.h>
+-KMimeAssociations::KMimeAssociations(KOfferHash& offerHash)
+-    : m_offerHash(offerHash)
++KMimeAssociations::KMimeAssociations(KOfferHash& offerHash, KMimeTypeFactory* mimeTypeFactory)
++    : m_offerHash(offerHash), m_mimeTypeFactory(mimeTypeFactory)
+ {
  }
  
- #include "kgraphicswebview.moc"
-Index: kdewebkit/kwebpage.cpp
-===================================================================
---- kdewebkit/kwebpage.cpp     (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/kwebpage.cpp     (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -111,7 +111,7 @@
-     action(Back)->setShortcut(KStandardShortcut::back().primary());
-     action(Forward)->setShortcut(KStandardShortcut::forward().primary());
-     action(Reload)->setShortcut(KStandardShortcut::reload().primary());
--    action(Stop)->setShortcut(Qt::Key_Escape);
-+    action(Stop)->setShortcut(QKeySequence(Qt::Key_Escape));
-     action(Cut)->setShortcut(KStandardShortcut::cut().primary());
-     action(Copy)->setShortcut(KStandardShortcut::copy().primary());
-     action(Paste)->setShortcut(KStandardShortcut::paste().primary());
-@@ -259,7 +259,7 @@
-     return userAgent;
- }
+@@ -80,16 +82,22 @@
  
--bool KWebPage::acceptNavigationRequest(QWebFrame * frame, const QNetworkRequest & request, NavigationType type)
-+bool KWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
+ void KMimeAssociations::parseAddedAssociations(const KConfigGroup& group, const QString& file, int basePreference)
  {
-     kDebug() << "url: " << request.url() << ", type: " << type << ", frame: " << frame;
-Index: kdewebkit/CMakeLists.txt
+-    Q_FOREACH(const QString& mime, group.keyList()) {
++    Q_FOREACH(const QString& mimeName, group.keyList()) {
++        const QStringList services = group.readXdgListEntry(mimeName);
++        KMimeType::Ptr mime = m_mimeTypeFactory->findMimeTypeByName(mimeName, KMimeType::ResolveAliases);
++        if (!mime) {
++            kDebug(7021) << file << "specifies unknown mimetype" << mimeName;
++            continue;
++        }
++        const QString resolvedMimeName = mime->name();
+         int pref = basePreference;
+-        const QStringList services = group.readXdgListEntry(mime);
+         Q_FOREACH(const QString &service, services) {
+             KService::Ptr pService = KService::serviceByStorageId(service);
+             if (!pService) {
+                 kDebug(7021) << file << "specifies unknown service" << service << "in" << group.name();
+             } else {
+-                //kDebug(7021) << "adding mime" << mime << "to service" << pService->entryPath() << "pref=" << pref;
+-                m_offerHash.addServiceOffer(mime, KServiceOffer(pService, pref, 0, pService->allowAsDefault()));
++                //kDebug(7021) << "adding mime" << resolvedMimeName << "to service" << pService->entryPath() << "pref=" << pref;
++                m_offerHash.addServiceOffer(resolvedMimeName, KServiceOffer(pService, pref, 0, pService->allowAsDefault()));
+                 --pref;
+             }
+         }
+Index: kdeui/kernel/kuniqueapplication.cpp
 ===================================================================
---- kdewebkit/CMakeLists.txt   (.../tags/KDE/4.4.0/kdelibs)    (wersja 1091888)
-+++ kdewebkit/CMakeLists.txt   (.../branches/KDE/4.4/kdelibs)  (wersja 1091888)
-@@ -14,13 +14,8 @@
-     kwebpluginfactory.cpp
- )
+--- kdeui/kernel/kuniqueapplication.cpp        (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdeui/kernel/kuniqueapplication.cpp        (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -66,7 +66,7 @@
+ #  endif
+ #endif
  
--qt4_add_resources(kdewebkit_RC_SRCS
--    kdewebkit.qrc
--)
+-#ifdef Q_WS_MAC
++#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
+ #include <kkernel_mac.h>
+ #endif
+@@ -117,16 +117,10 @@
+   s_kuniqueapplication_startCalled = true;
+   addCmdLineOptions(); // Make sure to add cmd line options
+-#ifdef Q_WS_WIN
++#if defined(Q_WS_WIN) || defined(Q_WS_MACX)
+   Private::s_nofork = true;
+ #else
+   KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kuniqueapp");
+-#ifdef Q_WS_MACX
+-  // avoid focus loss caused by extra fork when launched from Finder
+-  if(args->isSet("psn"))
+-     Private::s_nofork = true;
+-  else
+-#endif
+   Private::s_nofork = !args->isSet("fork");
+ #endif
+@@ -141,14 +135,15 @@
+         appName.prepend(s);
+      }
+-#ifdef Q_WS_MAC
+-  mac_initialize_dbus();
+-#endif
 -
- kde4_add_library(kdewebkit SHARED 
-     ${kdewebkit_LIB_SRCS} 
--    ${kdewebkit_RC_SRCS}
- )
+   bool forceNewProcess = Private::s_multipleInstances || flags & NonUniqueInstance;
+   if (Private::s_nofork)
+   {
++
++#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
++     mac_initialize_dbus();
++#endif
++
+      QDBusConnectionInterface* dbusService = tryToInitDBusConnection();
+      QString pid = QString::number(getpid());
+@@ -182,7 +177,7 @@
+      // We'll call newInstance in the constructor. Do nothing here.
+      return true;
  
- target_link_libraries(kdewebkit
+-#ifdef Q_WS_MACX
++#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
+   } else {
+     mac_fork_and_reexec_self();
+ #endif
+Index: kdeui/windowmanagement/kwindowinfo_x11.cpp
+===================================================================
+--- kdeui/windowmanagement/kwindowinfo_x11.cpp (.../tags/KDE/4.4.1/kdelibs)    (wersja 1104125)
++++ kdeui/windowmanagement/kwindowinfo_x11.cpp (.../branches/KDE/4.4/kdelibs)  (wersja 1104125)
+@@ -67,6 +67,8 @@
+         properties |= NET::WMStrut; // will be used as fallback
+     if( properties & NET::WMWindowType )
+         properties2 |= NET::WM2TransientFor; // will be used when type is not set
++    if( ( properties & NET::WMDesktop ) && KWindowSystem::mapViewport() )
++      properties |= NET::WMGeometry; // for viewports, the desktop (workspace) is determined from the geometry
+     properties |= NET::XAWMState; // force to get error detection for valid()
+     unsigned long props[ 2 ] = { properties, properties2 };
+     d->info = new NETWinInfo( QX11Info::display(), _win, QX11Info::appRootWindow(), props, 2 );
+@@ -298,13 +300,7 @@
+     if( KWindowSystem::mapViewport()) {
+         if( onAllDesktops())
+             return true;
+-        Window dummy;
+-        int x, y;
+-        unsigned int w, h, b, dp;
+-        XGetGeometry( QX11Info::display(), d->win_, &dummy, &x, &y, &w, &h, &b, &dp );
+-        // get global position
+-        XTranslateCoordinates( QX11Info::display(), d->win_, QX11Info::appRootWindow(), 0, 0, &x, &y, &dummy );
+-        return KWindowSystem::viewportWindowToDesktop( QRect( x, y, w, h )) == _desktop;
++        return KWindowSystem::viewportWindowToDesktop( d->geometry_ ) == _desktop;
+     }
+     return d->info->desktop() == _desktop || d->info->desktop() == NET::OnAllDesktops;
+ }
+@@ -333,11 +329,7 @@
+     if( KWindowSystem::mapViewport()) {
+         if( onAllDesktops())
+             return NET::OnAllDesktops;
+-        Window r;
+-        int x, y;
+-        unsigned int w, h, b, dp;
+-        XGetGeometry( QX11Info::display(), d->win_, &r, &x, &y, &w, &h, &b, &dp );
+-        return KWindowSystem::viewportWindowToDesktop( QRect( x, y, w, h ));
++        return KWindowSystem::viewportWindowToDesktop( d->geometry_ );
+     }
+     return d->info->desktop();
+ }
 
 Zmiany atrybutów dla: .
 ___________________________________________________________________
index 7ac38fa52f61c1d73609a305ca620ed844d995ed..0bdfffb7bb906d0f930e221203bdd583875614d7 100644 (file)
@@ -19,7 +19,7 @@ Summary(ru.UTF-8):    K Desktop Environment - Библиотеки
 Summary(uk.UTF-8):     K Desktop Environment - Бібліотеки
 Name:          kde4-kdelibs
 Version:       4.4.1
-Release:       1
+Release:       2
 License:       LGPL
 Group:         X11/Libraries
 Source0:       ftp://ftp.kde.org/pub/kde/%{_state}/%{version}/src/%{orgname}-%{version}.tar.bz2
@@ -204,7 +204,7 @@ KDE.
 
 %prep
 %setup -q -n %{orgname}-%{version}
-#%patch100 -p0
+%patch100 -p0
 #%patch0 -p0
 #%patch1 -p0
 %patch2 -p0
This page took 0.278472 seconds and 4 git commands to generate.