Commit e714dc5d authored by Christian Ehrlicher's avatar Christian Ehrlicher
Browse files

CLazy warnings--

REVIEW: 129429
parent f6c0a5bd
......@@ -89,7 +89,6 @@ int main(int argc, char** argv)
out << "\nTotals for event types:\n";
QString p;
EventType* et;
for (int i=0;i<m->realCount();i++) {
et = m->realType(i);
......
......@@ -31,6 +31,7 @@ class ConfigColorSetting;
class ConfigDlgBase : public QDialog, public Ui::ConfigDlgBase
{
Q_OBJECT
public:
ConfigDlgBase( QWidget *parent ) : QDialog( parent ) {
setupUi( this );
......
......@@ -2072,7 +2072,7 @@ void TopLevel::ccReadOutput()
if (!_ccProcess) return;
if (p != _ccProcess) return;
_ccOutput.append(_ccProcess->readAllStandardOutput());
_ccOutput.append(QString(_ccProcess->readAllStandardOutput()));
}
void TopLevel::ccError(QProcess::ProcessError e)
......
......@@ -693,7 +693,6 @@ public:
bool operator<(const TracePart&) const;
private:
QIODevice* _file;
QString _name;
QString _descr;
QString _trigger;
......
......@@ -2257,7 +2257,7 @@ void CallGraphView::dotExited()
if (cmd == QLatin1String("node")) {
// x, y are centered in node
QString nodeName, label, nodeX, nodeY, nodeWidth, nodeHeight;
QString nodeName, nodeX, nodeY, nodeWidth, nodeHeight;
double x, y, width, height;
lineStream >> nodeName >> nodeX >> nodeY >> nodeWidth
>> nodeHeight;
......
......@@ -358,7 +358,6 @@ private:
ProfileContext::Type _groupType;
QTemporaryFile* _tmpFile;
double _realFuncLimit, _realCallLimit;
int _maxDepth;
bool _graphCreated;
GraphOptions* _go;
......
......@@ -47,7 +47,6 @@ EventTypeItem::EventTypeItem(TraceCostItem* costItem,
setText(0, ct->longName());
setText(3, ct->name());
setText(5, ct->parsedFormula());
QString formula = ct->formula();
if (!ct->isReal()) {
setText(4, QStringLiteral("="));
// we have a virtual type: allow editing
......
......@@ -276,7 +276,6 @@ void EventTypeView::refresh()
QTreeWidgetItem* item = 0;
QTreeWidgetItem* selected = 0;
QList<QTreeWidgetItem*> items;
QString sumStr, pureStr;
EventTypeSet* m = _data->eventTypes();
for (int i=0; i<m->realCount();i++) {
......
......@@ -170,8 +170,6 @@ void GlobalGUIConfig::readOptions()
ConfigColorSetting* GlobalGUIConfig::groupColorSetting(CostItem* cost)
{
QString n;
if (!cost)
return colorSetting(QStringLiteral("default"));
......
......@@ -84,6 +84,7 @@ private:
class InstrItemDelegate : public QItemDelegate
{
Q_OBJECT
public:
explicit InstrItemDelegate(InstrView *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
......
......@@ -83,6 +83,7 @@ private:
class SourceItemDelegate : public QItemDelegate
{
Q_OBJECT
public:
explicit SourceItemDelegate(SourceView *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
......
......@@ -37,7 +37,7 @@ static void insertColorItems(QTreeWidget* w, ProfileContext::Type type,
QStringList items)
{
items.sort();
foreach(QString s, items) {
foreach(const QString &s, items) {
ConfigColorSetting* cs = GlobalGUIConfig::groupColorSetting(type, s);
QTreeWidgetItem* i = new QTreeWidgetItem(w);
i->setText(0, ProfileContext::i18nTypeName(type));
......
......@@ -29,6 +29,7 @@
class ConfigPage: public QWidget
{
Q_OBJECT
public:
ConfigPage(QWidget* parent, QString title, QString longTitle = QString());
virtual ~ConfigPage() {}
......
......@@ -28,6 +28,7 @@
class GeneralSettings: public ConfigPage
{
Q_OBJECT
public:
explicit GeneralSettings(QWidget* parent);
virtual ~GeneralSettings() {}
......
......@@ -826,7 +826,7 @@ void QCGTopLevel::load(QStringList files, bool addToRecentFiles)
ConfigGroup* generalConfig = ConfigStorage::group(QStringLiteral("GeneralSettings"));
recentFiles = generalConfig->value(QStringLiteral("RecentFiles"),
QStringList()).toStringList();
foreach(QString file, files) {
foreach(const QString& file, files) {
recentFiles.removeAll(file);
if (filesLoaded >0)
recentFiles.prepend(file);
......@@ -975,8 +975,6 @@ bool QCGTopLevel::setEventType2(EventType* ct)
if (_eventType2 == ct) return false;
_eventType2 = ct;
QString longName = ct ? ct->longName() : tr("(Hidden)");
_partSelection->setEventType2(_eventType2);
_stackSelection->setEventType2(_eventType2);
_functionSelection->setEventType2(_eventType2);
......
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