summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oglobal.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oglobal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oglobal.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp
index 1aa206e..ea02058 100644
--- a/libopie2/opiecore/oglobal.cpp
+++ b/libopie2/opiecore/oglobal.cpp
@@ -35,12 +35,14 @@
#include <qpe/qpeapplication.h>
#include <qpe/storage.h>
#include <unistd.h>
#include <sys/types.h>
+using namespace Opie::Core;
+
static const char Base64EncMap[64] =
{
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
@@ -309,24 +311,24 @@ QByteArray OGlobal::decodeBase64( const QByteArray& in) {
return out;
}
bool OGlobal::isAppLnkFileName( const QString& str )
{
- if (str.length()==0||str.at(str.length()-1)==QDir::separator()) return false;
+ if (str.isEmpty()||str.at(str.length()-1)==QDir::separator()) return false;
return str.startsWith(MimeType::appsFolderName()+QDir::separator());
}
/* ToDo:
* This fun should check the document-path value for the mounted media
* which has to be implemented later. this moment we just check for a
* mounted media name.
*/
bool OGlobal::isDocumentFileName( const QString& file )
{
- if (file.length()==0||file.at(file.length()-1)==QDir::separator()) return false;
+ if (file.isEmpty()||file.at(file.length()-1)==QDir::separator()) return false;
if (file.startsWith(QPEApplication::documentDir()+QDir::separator())) return true;
StorageInfo si;
QList< FileSystem > fl = si.fileSystems();
FileSystem*fs;
for (fs = fl.first();fs!=0;fs=fl.next()) {
if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator()))