Commit 1e5c0470 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 4ba4f7e2
......@@ -72,7 +72,7 @@ void WaylandModule::init()
queue->setup(m_connection);
registry->setEventQueue(queue);
connect(registry, &Registry::interfaceAnnounced, this,
[this, interfacesItem] (QByteArray interface, quint32 name, quint32 version) {
[this, interfacesItem] (const QByteArray &interface, quint32 name, quint32 version) {
Q_UNUSED(name)
new QTreeWidgetItem(interfacesItem, QStringList() << interface << QString::number(version));
}
......
......@@ -218,7 +218,6 @@ static bool GetInfo_XServer_Generic(QTreeWidget *lBox) {
Display *dpy;
XPixmapFormatValues *pmf;
QString str, txt;
QTreeWidgetItem *last, *item, *next;
dpy = XOpenDisplay(0);
......
......@@ -140,7 +140,7 @@ void DeviceListing::itemActivatedSlot(QTreeWidgetItem *listItemIn ,const int col
}
}
void DeviceListing::deviceAddedSlot(const QString udi)
void DeviceListing::deviceAddedSlot(const QString &udi)
{
SolidHelper *solhelp = new SolidHelper();
const QList<Solid::Device> list = Solid::Device::allDevices();
......
......@@ -61,7 +61,7 @@ class DeviceListing : public QTreeWidget
DeviceListing(QWidget *, InfoPanel *, DevInfoPlugin *);
~DeviceListing();
static QTreeWidgetItem *getTreeWidgetItemFromUdi(QTreeWidget *widget, QString udi)
static QTreeWidgetItem *getTreeWidgetItemFromUdi(QTreeWidget *widget, const QString &udi)
{
QTreeWidgetItemIterator treeWidget(widget);
while (*treeWidget)
......@@ -87,7 +87,7 @@ class DeviceListing : public QTreeWidget
public Q_SLOTS:
void itemActivatedSlot(QTreeWidgetItem *,const int);
void deviceAddedSlot(const QString);
void deviceAddedSlot(const QString &);
void deviceRemovedSlot(const QString);
void collapseAllDevicesSlot();
void expandAllDevicesSlot();
......
......@@ -203,7 +203,7 @@ static bool get_dri_device()
if (end2>end) end=end2;
dri_info.pci[end]='.';
QString cmd = QString("lspci -m -v -s ") + dri_info.pci;
QString cmd = QStringLiteral("lspci -m -v -s ") + dri_info.pci;
QStringList pci_info;
int num;
if (((num = ReadPipe(cmd, pci_info)) ||
......@@ -537,8 +537,8 @@ print_limits(QTreeWidgetItem *l1, const char * glExtensions, bool getProcAddress
if (glGetError() == GL_NONE) {
QString s;
if (!tfloat && count == 1) s = QString::number(max[0]); else
if (!tfloat && count == 2) s = QString("%1, %2").arg(max[0]).arg(max[1]); else
if (tfloat && count == 2) s = QString("%1 - %2").arg(fmax[0],0,'f',6).arg(fmax[1],0,'f',6); else
if (!tfloat && count == 2) s = QStringLiteral("%1, %2").arg(max[0]).arg(max[1]); else
if (tfloat && count == 2) s = QStringLiteral("%1 - %2").arg(fmax[0],0,'f',6).arg(fmax[1],0,'f',6); else
if (tfloat && count == 1) s = QString::number(fmax[0],'f',6);
if (l3) l3 = newItem(l2, l3, cur_token->name, s);
else l3 = newItem(l2, cur_token->name, s);
......
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