Use constexpr for constant predefined QChars

GIT_SILENT
parent e4c27511
......@@ -40,8 +40,8 @@
#include <interfaces/iproject.h>
#include "projectproxymodel.h"
static const QChar sep = QLatin1Char('/');
static const QChar escape = QLatin1Char('\\');
constexpr QChar sep = QLatin1Char('/');
constexpr QChar escape = QLatin1Char('\\');
class ProjectItemCompleter : public QCompleter
......
......@@ -55,7 +55,7 @@ bool KDevFormatFile::find()
bool KDevFormatFile::read()
{
static const QChar delimiter = QLatin1Char(':');
constexpr QChar delimiter = QLatin1Char(':');
QFile formatFile(formatFileName);
if (!formatFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
......
......@@ -38,7 +38,8 @@ QMap<QChar, QChar> whatToScape()
const QMap<QChar, QChar> CMakeFunctionArgument::scapings=whatToScape();
static const QChar scapingChar = QLatin1Char('\\');
constexpr QChar scapingChar = QLatin1Char('\\');
QString CMakeFunctionArgument::unescapeValue(const QString& value)
{
int firstScape=value.indexOf(scapingChar);
......
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