summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qclipboard_s60.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-08-20 16:09:00 +0200
committerShane Kearns <shane.kearns@sosco.com>2009-08-20 16:09:00 +0200
commitd4c0be3b5758b37ef9da6fcbce4c5a6d84f3a52b (patch)
tree9557e933bc640009f587c7b58062d57f8ada9f34 /src/gui/kernel/qclipboard_s60.cpp
parent06524f769fec76fa7ebcc39ac88ac9e08c720677 (diff)
downloadqt4-tools-d4c0be3b5758b37ef9da6fcbce4c5a6d84f3a52b.tar.gz
performance: refactored use of RFs so corelib and gui share one session
Opening and closing sessions has a performance impact on Symbian, so all users of RFs now share a single session. If a native file engine is written for Symbian (instead of the posix one currently in use) then that could own the global data instead of QCoreApplication. Task-number: 247617 Reviewed-by: jbarron
Diffstat (limited to 'src/gui/kernel/qclipboard_s60.cpp')
-rw-r--r--src/gui/kernel/qclipboard_s60.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp
index fe3f579ecc..ca14d78080 100644
--- a/src/gui/kernel/qclipboard_s60.cpp
+++ b/src/gui/kernel/qclipboard_s60.cpp
@@ -49,6 +49,7 @@
#include "qbuffer.h"
#include "qwidget.h"
#include "qevent.h"
+#include "private/qapplication_p.h"
#include <QtDebug>
// Symbian's clipboard
@@ -83,23 +84,16 @@ public:
private:
QMimeData* src;
- RFs iFs;
bool connection;
};
QClipboardData::QClipboardData():src(0),connection(true)
{
clear();
- if (KErrNone != iFs.Connect())
- {
- qWarning("QClipboardData::fileserver connnect failed");
- connection = false;
- }
}
QClipboardData::~QClipboardData()
{
- iFs.Close();
connection = false;
delete src;
}
@@ -110,10 +104,6 @@ void QClipboardData::clear()
delete src;
src = newSrc;
}
-RFs QClipboardData::fsSession()
-{
- return iFs;
-}
static QClipboardData *internalCbData = 0;
@@ -207,7 +197,7 @@ const QMimeData* QClipboard::mimeData(Mode mode) const
{
//###fixme when exceptions are added to Qt
TRAPD(err,{
- RFs fs = d->fsSession();
+ RFs& fs = QCoreApplicationPrivate::fsSession();
CClipboard* cb = CClipboard::NewForReadingLC(fs);
Q_ASSERT(cb);
RStoreReadStream stream;