diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-08-12 14:11:00 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-08-12 14:16:51 (GMT) |
commit | 44265f30fb40baaecd4cda1b5aca0efeed6abc20 (patch) | |
tree | 64d08be182c0d99ec4218408f97f01b0d6a2d351 /src/3rdparty/phonon/mmf/utils.cpp | |
parent | 4cd7180ad3365c0e8eef8a22c825f3289a799ab0 (diff) | |
download | Qt-44265f30fb40baaecd4cda1b5aca0efeed6abc20.zip Qt-44265f30fb40baaecd4cda1b5aca0efeed6abc20.tar.gz Qt-44265f30fb40baaecd4cda1b5aca0efeed6abc20.tar.bz2 |
Commit patch by Gareth.
The patch originally contained all changed done to MMF Phonon, but this
commit contains the changes only Gareth did.
Diffstat (limited to 'src/3rdparty/phonon/mmf/utils.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/utils.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp new file mode 100644 index 0000000..aa87310 --- /dev/null +++ b/src/3rdparty/phonon/mmf/utils.cpp @@ -0,0 +1,46 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library 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 or 3 of the License. + +This library 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "utils.h" +#include <e32std.h> + +using namespace Phonon; +using namespace Phonon::MMF; + +_LIT(PanicCategory, "Phonon::MMF"); + +void MMF::Utils::panic(PanicCode code) + { + User::Panic(PanicCategory, code); + } + +QHBufC MMF::Utils::symbianFilename(const QString& qtFilename) +{ + _LIT(ForwardSlash, "/"); + _LIT(BackwardSlash, "\\"); + + QHBufC result(qtFilename); + TInt pos = result->Find(ForwardSlash); + while(pos != KErrNotFound) + { + result->Des().Replace(pos, 1, BackwardSlash); + pos = result->Find(ForwardSlash); + } + + return result; +} |