Commit 93cb30d7 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Pass more QChar args as value

parent 861230e3
...@@ -73,13 +73,13 @@ ...@@ -73,13 +73,13 @@
#include <QTextDocument> #include <QTextDocument>
namespace KDevelop { namespace KDevelop {
QString joinWithEscaping(const QStringList& input, const QChar& joinchar, const QChar& escapechar) QString joinWithEscaping(const QStringList& input, QChar joinchar, QChar escapechar)
{ {
QStringList tmp = input; QStringList tmp = input;
return tmp.replaceInStrings(joinchar, QString(joinchar) + QString(escapechar)).join(joinchar); return tmp.replaceInStrings(joinchar, QString(joinchar) + QString(escapechar)).join(joinchar);
} }
QStringList splitWithEscaping(const QString& input, const QChar& splitchar, const QChar& escapechar) QStringList splitWithEscaping(const QString& input, QChar splitchar, QChar escapechar)
{ {
enum State { Normal, SeenEscape } state; enum State { Normal, SeenEscape } state;
......
...@@ -29,10 +29,10 @@ class QStringList; ...@@ -29,10 +29,10 @@ class QStringList;
class QVariant; class QVariant;
namespace KDevelop { namespace KDevelop {
KDEVPLATFORMUTIL_EXPORT QStringList splitWithEscaping(const QString& input, const QChar& splitChar, KDEVPLATFORMUTIL_EXPORT QStringList splitWithEscaping(const QString& input, QChar splitChar,
const QChar& escapeChar); QChar escapeChar);
KDEVPLATFORMUTIL_EXPORT QString joinWithEscaping(const QStringList& input, const QChar& joinChar, KDEVPLATFORMUTIL_EXPORT QString joinWithEscaping(const QStringList& input, QChar joinChar,
const QChar& escapeChar); QChar escapeChar);
/** /**
* convert the @p variant into a string which can then be stored * convert the @p variant into a string which can then be stored
......
...@@ -54,7 +54,7 @@ bool isFunction(const Declaration* decl) ...@@ -54,7 +54,7 @@ bool isFunction(const Declaration* decl)
return decl->abstractType().cast<FunctionType>(); return decl->abstractType().cast<FunctionType>();
} }
bool isPathChar(const QChar& c) bool isPathChar(QChar c)
{ {
return c.isLetterOrNumber() || c == QLatin1Char('/') || c == QLatin1Char('.'); return c.isLetterOrNumber() || c == QLatin1Char('/') || c == QLatin1Char('.');
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment