Change in kio[master]: WIP! Adding SlaveBase newEntry and insertEntryProperty for b...

2015-01-31 Thread Mark Gaiser (Code Review)
Mark Gaiser has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/348

Change subject: WIP! Adding SlaveBase newEntry and insertEntryProperty for big 
speed improvement in listDir calls.
..

WIP! Adding SlaveBase newEntry and insertEntryProperty for big speed 
improvement in listDir calls.

WIP because the tests:
- copyjob
- testtrash

still fail.. I don't know why yet.

This commit adds adds the following functions:
- newEntry()
- insertEntryProperty(uint field, const QString value)
- insertEntryProperty(uint field, const long long value)

The existing listEntry function (that was introduced in KIO 5.0) is now 
deprecated. Internally it is
now using the new functions.

These methods are introduced to completely phase out a need for UDSEntry on the 
slave side.
Slaves can now - with those function - directly insert stat data in a buffer.
This is much faster then going through QDataStream which does all kinds of 
magic to be cross platform compatible.

Since QDataStream is dropped, the byte order management (that it did to be 
cross platform usable) is obviously
gone as well. It shouldn't be an issue since KIO isn't used over the network. 
It's all living on the
same machine thus the same byte order anyway.

Some numbers for performance comparision.
Running KIO::listDir on a folder with 500.000 files.
Before this patch: ~1300ms
After this patch: ~800ms

Native speed (without KIO, just C++ and storing the stat data in a vector): 
~300ms

Change-Id: Ibb61f0c3a406337c54d066cac169ca534ec1d8b2
CHANGELOG: Introduce newEntry and insertEntryProperty for better listdir 
performance. Deprecate listEntry.
---
M autotests/udsentrytest.cpp
M src/core/slavebase.cpp
M src/core/slavebase.h
M src/core/udsentry.cpp
M src/core/udsentry.h
M src/ioslaves/file/file.cpp
M src/ioslaves/file/file.h
M src/ioslaves/file/file_unix.cpp
8 files changed, 267 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/48/348/1

diff --git a/autotests/udsentrytest.cpp b/autotests/udsentrytest.cpp
index 04e072e..066fd86 100644
--- a/autotests/udsentrytest.cpp
+++ b/autotests/udsentrytest.cpp
@@ -183,17 +183,21 @@
 {
 QDataStream stream(data, QIODevice::WriteOnly);
 foreach (const QVectorUDSTestField testCase, testCases) {
-stream  testCase.count();
+const int size = testCase.count();
+stream.writeRawData(reinterpret_castconst char*(size), 
sizeof(int));
 
 foreach (const UDSTestField field, testCase) {
 uint uds = field.m_uds;
-stream  uds;
+stream.writeRawData(reinterpret_castconst char*(uds), 
sizeof(uint));
 
 if (uds  KIO::UDSEntry::UDS_STRING) {
-stream  field.m_string;
+const QString str = field.m_string;
+int size = str.size();
+stream.writeRawData(reinterpret_castconst char*(size), 
sizeof(int));
+stream.writeRawData(reinterpret_castconst 
char*(str.utf16()), sizeof(ushort) * size);
 } else {
 Q_ASSERT(uds  KIO::UDSEntry::UDS_NUMBER);
-stream  field.m_long;
+stream.writeRawData(reinterpret_castconst 
char*(field.m_long), sizeof(long long));
 }
 }
 }
diff --git a/src/core/slavebase.cpp b/src/core/slavebase.cpp
index db1c2ee..2e0333c 100644
--- a/src/core/slavebase.cpp
+++ b/src/core/slavebase.cpp
@@ -37,7 +37,6 @@
 #include QtCore/QDateTime
 #include QtCore/QElapsedTimer
 #include QtCore/QCoreApplication
-#include QtCore/QDataStream
 
 #include kconfig.h
 #include kconfiggroup.h
@@ -74,6 +73,59 @@
 namespace KIO
 {
 
+// This class is a small QByteArray wrapper which provides some convenience 
functions.
+class EntryBuffer
+{
+public:
+EntryBuffer()
+: m_buffer()
+, m_pos(0)
+{
+// Initialize m_buffer with 8KB. That should be enough room for small 
folders (lets say ~ 70 entries).
+m_buffer.resize(8192);
+}
+
+// Return the raw QByteArray buffer. The user should only use this 
function to get a buffer of the written bytes.
+// That would be a call like: buffer().left(pos()).
+QByteArray buffer()
+{
+return m_buffer;
+}
+
+int pos()
+{
+return m_pos;
+}
+
+void seek(int pos)
+{
+m_pos = pos;
+}
+
+void reset()
+{
+m_pos = 0;
+}
+
+// This function writes the provided data in the internam m_buffer. The 
user should not write more then 4096 bytes at once!
+qint64 write(const char *data, qint64 len)
+{
+// Increment the m_buffer in chunks of 4KB.
+// Realistically this should only happen for larger folders (70 
entries).
+if ((m_pos + len)  m_buffer.size()) {
+m_buffer.resize(m_buffer.size() + 

Re: Review Request 122330: Associate *.qmltypes and *.qmlproject files with the text/x-qml mime type

2015-01-31 Thread Denis Steckelmacher

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122330/
---

(Updated Jan. 31, 2015, 6:48 p.m.)


Review request for KDE Frameworks, kdelibs and KDevelop.


Repository: kcoreaddons


Description
---

The KDevelop QML/JS plugin sometimes needs to parse .qmltypes files (in order 
to list the content of installed QML modules, for instance), but KDevelop 
requires that files parsed using the QML/JS plugin have the text/x-qml mime 
type.

Because .qmltypes and .qmlproject files are valid QML files (they follow the 
standard QML syntax), this patch proposes to add these extensions to the ones 
associated with the text/x-qml mime type.


Diffs
-

  src/mimetypes/kde5.xml cc9f71e 

Diff: https://git.reviewboard.kde.org/r/122330/diff/


Testing
---

Installing kcoreaddons and updating the system MIME database allows KDevelop to 
detect that files with the .qmltypes and .qmlproject extensions have to be 
parsed using the QML/JS language support plugin. This allows QML files to use 
QML modules installed system-wide (and fixes the unit tests of kdev-qmljs).


Thanks,

Denis Steckelmacher

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Build failed in Jenkins: kde-baseapps_master_qt5 #213

2015-01-31 Thread Vishesh Handa
On Wed, Jan 28, 2015 at 4:24 PM, David Faure fa...@kde.org wrote:

 On Wednesday 28 January 2015 14:41:04 KDE CI System wrote:
  [ 74%] Building CXX object
 
 dolphin/src/CMakeFiles/kcm_dolphinnavigation.dir/dolphin_generalsettings.cp
  p.o
  
 http://build.kde.org/job/kde-baseapps_master_qt5/ws/dolphin/src/search/dol
  phinsearchbox.cpp:42:44: fatal error: Baloo/NaturalFileQueryParser: No
 such
  file or directory #include Baloo/NaturalFileQueryParser
  ^
  compilation terminated.

 Hi Vishesh,

 Any idea what changed in baloo that causes this CI error?

 Missing dependency maybe?


Yes. I moved the file from baloo to baloo-widgets. Let me try to fix it.


-- 
Vishesh Handa
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Build failed in Jenkins: kde-baseapps_master_qt5 #218

2015-01-31 Thread KDE CI System
See http://build.kde.org/job/kde-baseapps_master_qt5/218/changes

Changes:

[emmanuelpescosta099] Port away from KGlobalSettings::naturalSorting() by 
moving it to Dolphin's GeneralSettings

--
[...truncated 3048 lines...]
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:489:20:
 warning: ‘bool QTest::kWaitForSignal(QObject*, const char*, int)’ is 
deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/qtest_kde.h:48)
 [-Wdeprecated-declarations]
 QVERIFY(QTest::kWaitForSignal(view, SIGNAL(viewCompleted(KonqView*)), 
1));
^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:489:80:
 warning: ‘bool QTest::kWaitForSignal(QObject*, const char*, int)’ is 
deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/qtest_kde.h:48)
 [-Wdeprecated-declarations]
 QVERIFY(QTest::kWaitForSignal(view, SIGNAL(viewCompleted(KonqView*)), 
1));

^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:
 In member function ‘void ViewMgrTest::testAddTabs()’:
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:510:17:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
 ^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:510:60:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:
 In member function ‘void ViewMgrTest::testSaveProfile()’:
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:704:19:
 warning: ‘KUrl’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/kurl.h:109)
 [-Wdeprecated-declarations]
 const KUrl url(data:text/html, pHello World/p);
   ^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:708:20:
 warning: ‘KUrl’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/kurl.h:109)
 [-Wdeprecated-declarations]
 const KUrl url2(data:text/html, pview2/p);
^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:710:17:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
 ^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:710:60:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:
 In member function ‘void ViewMgrTest::testCloseOtherTabs()’:
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:762:17:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
 ^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/konqueror/src/tests/konqviewmgrtest.cpp:762:60:
 warning: ‘KTabWidget’ is deprecated (declared at 
/srv/jenkins/install/linux/x86_64/g++/kf5-qt5/frameworks/kdelibs4support/inst/include/KF5/KDELibs4Support/ktabwidget.h:44)
 [-Wdeprecated-declarations]
 KTabWidget* tabWidget = mainWindow.findChildKTabWidget*();
^
http://build.kde.org/job/kde-baseapps_master_qt5/ws/build/dolphin/src/dolphin_searchsettings.h:0:
 Note: No relevant classes found. No 

Re: [Kde-games-devel] Freeze in 6 weeks

2015-01-31 Thread Jeremy Whiting
Albert, Frameworks developers/maintainers,

On Thu, Jan 29, 2015 at 12:43 PM, Albert Astals Cid aa...@kde.org wrote:

 El Dijous, 29 de gener de 2015, a les 10:05:01, Inge Wallin va escriure:
  On Wednesday, January 28, 2015 20:47:44 Albert Astals Cid wrote:
   El Dimecres, 28 de gener de 2015, a les 14:04:14, Inge Wallin va
 escriure:
On Wednesday, January 28, 2015 07:38:23 laurent Montel wrote:
 I am agree with Albert if there is a problem with
 network-transparency
 on
 MacOsX it's better to fix it that remove it.
   
That is not the issue. The issue is that it was promised that if you
developed your program with KDE Frameworks 5 instead of KDElibs, you
would
get a more lightweight program that did not need any daemons to run.
   
Now this turns out to be not true.   *That* is what we want, not to
remove
network transparency per se. But if the promise from frameworks 5 is
 not
kept, what is there to be done?
  
   Really? Who promised you that? That's never been the promise, the
 promise
   of KF5 is that it's more modular, and yes there's some libs that don't
   need extra daemons and some that do need them.
 
  I actually tried to do some research to find this promise in writing but
  except for pointing it out as a problem in an article on the dot I
 couldn't
  find any written promise.

 The list on http://api.kde.org/frameworks-api/frameworks5-apidocs/ has
 three
 items, functional, solution, integration.

 As far as i remember, functional means you can use it standalone, solution
 means it needs a daemon and integraion means it needs more stuff (more
 daemons?


Is this categorization correct? Has it been checked with a dependency
analysis to see that each functional framework is usable standalone? I
understood the tiers concept but never did get my head around the
functional/integration/solution concept yet, but would like to. At any
rate, I think KNewStuff which I'm very familiar with doesn't seem to be
usable standalone as the functional status it has implies. It depends on
and uses KIO for all network downloads and uploads, which requires a daemon
as far as I can tell (and is a solution) so should KNewStuff be changed to
a solution also probably?


  But I do remember bringing up this problem in a
  number of conversations with frameworks developers early in the
 development
  cycle.  One of those times was in a frameworks meeting at Akademy in
  Tampere.
 
  And the developers did say that bringing down the amount of
 infrastructure
  that the first KDE application on an alien platform started was one of
 the
  motivations for frameworks. Not the only one, of course, but still an
  important one.
 
 And this problem will be in other application.
 It's not just a problem with kdegames so fix it for kdegames will
 fix
 for
 all application.

 We can't remove feature each time we need to fix on a specific
 platform
 no
 ?
   
Yes, it will be in other applications.  But that is the price you
 have
to
pay for platform portability sometimes.
   
I never thought it was reasonable to have to start the full KDE
 desktop
infrastructure just to run an application from the KDE on, say,
 Gnome.
But
that's what we had to do back in the kdelibs days. Frameworks 5 was
supposed to get rid of that but now it turns out that it doesn't.
 The
question is: is this just not yet implemented or was this design goal
abandoned?
  
   What is the full KDE desktop infraestructure for you?
 
  Let's skip the word full, since I don't really know every nook and
 crannie
  of the kde infrastructure.  But to start several daemons to be able to
  access a file on another server seems like overkill.  Even one, in fact.

 Why starting a program to do something is an overkill? If i want to
 convert a
 pdf to a ps, running pdftops seems totally legit to me.

 Cheers,
   Albert

 
  I understand (or at least I think I do) that kded is an optimisation that
  loads all the shared libraries once so that all the subsequent kde
  applications don't have to do it. Instead they are forked off from kded
 with
  the libraries already loaded.  This is a good idea if you know for sure
  that you will be running a whole slew of such applications. But this is
 not
  a very strong guess on non-KDE platforms and even less so on non-linux
  platforms.
 
-Inge
 
   Cheers,
  
 Albert
  
This is what we need to focus on. Network transparency is *not* the
issue.
   
  Cheers,
 
Albert
 
   Cheers, Ian W.
  
   ___
   kde-games-devel mailing list
   kde-games-de...@kde.org
   https://mail.kde.org/mailman/listinfo/kde-games-devel
 
  ___
  kde-games-devel mailing list
  kde-games-de...@kde.org
  https://mail.kde.org/mailman/listinfo/kde-games-devel
   

Change in kio[master]: UDSEntry documentation fix.

2015-01-31 Thread Mark Gaiser (Code Review)
Mark Gaiser has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/349

Change subject: UDSEntry documentation fix.
..

UDSEntry documentation fix.

Change-Id: I57151f76bf086b7d8108391c97dbdaf548e41251
---
M src/core/udsentry.h
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/49/349/1

diff --git a/src/core/udsentry.h b/src/core/udsentry.h
index 13d50ea..e42ef23 100644
--- a/src/core/udsentry.h
+++ b/src/core/udsentry.h
@@ -100,14 +100,14 @@
 void reserve(int size);
 
 /**
- * insert field with numeric value
+ * insert field with string value
  * @param field numeric field id
- * @param value
+ * @param value to set
  */
 void insert(uint field, const QString value);
 
 /**
- * insert field with string value
+ * insert field with numeric value
  * @param field numeric tield id
  * @param l value to set
  */

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/349
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57151f76bf086b7d8108391c97dbdaf548e41251
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: Mark Gaiser mark...@gmail.com
Gerrit-Reviewer: David Faure fa...@kde.org
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Jenkins build is back to stable : plasma-framework_master_qt5 » All,LINBUILDER #984

2015-01-31 Thread KDE CI System
See 
http://build.kde.org/job/plasma-framework_master_qt5/Variation=All,label=LINBUILDER/984/changes

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel