Commit 2c5399f5 authored by Laurent Montel's avatar Laurent Montel 😁

Add QStringLiteral when necessary

parent 60fc3b4a
......@@ -966,7 +966,7 @@ bool GetInfo_OpenGL(QTreeWidget *treeWidget)
return false;
}
l1->setText(0, i18n("Name of the Display"));
l1->setText(1, DisplayString(dpy));
l1->setText(1, QString::fromLatin1(DisplayString(dpy)));
l1->setExpanded(true);
l1->setFlags(Qt::ItemIsEnabled);
......@@ -1004,7 +1004,7 @@ bool GetInfo_OpenGL(QTreeWidget *treeWidget)
if (isWayland) {
IsDirect = true;
l1->setText(0, i18n("Name of the Display"));
l1->setText(1, qgetenv("WAYLAND_DISPLAY"));
l1->setText(1, QString::fromLatin1(qgetenv("WAYLAND_DISPLAY")));
l1->setExpanded(true);
l1->setFlags(Qt::ItemIsEnabled);
#if KCM_HAVE_EGL
......
......@@ -51,7 +51,7 @@ USBDevice::~USBDevice() {
static QString catFile(const QString &fname) {
char buffer[256];
QString result;
int fd =:: open(QFile::encodeName(fname), O_RDONLY);
int fd =:: open(QFile::encodeName(fname).constData(), O_RDONLY);
if (fd<0)
return QString();
......@@ -163,12 +163,12 @@ QString USBDevice::dump() {
QString c = QStringLiteral("<td>%1</td>").arg(_class);
QString cname = _db->cls(_class);
if (!cname.isEmpty())
c += QStringLiteral("<td>(") + i18n(cname.toLatin1()) +QStringLiteral(")</td>");
c += QStringLiteral("<td>(") + i18n(cname.toLatin1().constData()) +QStringLiteral(")</td>");
r += i18n("<tr><td><i>Class</i></td>%1</tr>", c);
QString sc = QStringLiteral("<td>%1</td>").arg(_sub);
QString scname = _db->subclass(_class, _sub);
if (!scname.isEmpty())
sc += QStringLiteral("<td>(") + i18n(scname.toLatin1()) +QStringLiteral(")</td>");
sc += QStringLiteral("<td>(") + i18n(scname.toLatin1().constData()) +QStringLiteral(")</td>");
r += i18n("<tr><td><i>Subclass</i></td>%1</tr>", sc);
QString pr = QStringLiteral("<td>%1</td>").arg(_prot);
QString prname = _db->protocol(_class, _sub, _prot);
......@@ -239,7 +239,7 @@ bool USBDevice::parse(const QString &fname) {
// Note: we can't use a QTextStream, as the files in /proc
// are pseudo files with zero length
char buffer[256];
int fd =:: open(QFile::encodeName(fname), O_RDONLY);
int fd =:: open(QFile::encodeName(fname).constData(), O_RDONLY);
if (fd<0)
return false;
......
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