Commit 324f64b9 authored by con's avatar con
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 1d2b9bff 2acc96c8
......@@ -177,7 +177,14 @@ ProjectExplorer::BuildStepConfigWidget *GenericMakeStep::createConfigWidget()
bool GenericMakeStep::immutable() const
{
return true;
// Only make one GenericMakeStep immutable:
QList<BuildStep *> steps = buildConfiguration()->buildSteps();
int makestepCount = 0;
foreach (const BuildStep *bs, steps) {
if (qobject_cast<const GenericMakeStep *>(bs))
++makestepCount;
}
return makestepCount <= 1;
}
bool GenericMakeStep::buildsTarget(const QString &target) const
......
......@@ -40,7 +40,7 @@
#include <QtCore/QMargins>
#include <QtCore/QTimer>
#include <QtGui/QApplication>
#include <QtCore/QCoreApplication>
#include <QtGui/QComboBox>
#include <QtGui/QInputDialog>
#include <QtGui/QLabel>
......@@ -62,7 +62,7 @@ QString BuildSettingsPanelFactory::id() const
QString BuildSettingsPanelFactory::displayName() const
{
return QApplication::tr("Build Settings");
return QCoreApplication::translate("BuildSettingsPanelFactory", "Build Settings");
}
bool BuildSettingsPanelFactory::supports(Project *project)
......@@ -105,7 +105,7 @@ BuildSettingsPanel::~BuildSettingsPanel()
QString BuildSettingsPanel::displayName() const
{
return QApplication::tr("Build Settings");
return QCoreApplication::translate("BuildSettingsPanel", "Build Settings");
}
QWidget *BuildSettingsPanel::widget() const
......
......@@ -270,7 +270,7 @@ DependenciesPanel::~DependenciesPanel()
QString DependenciesPanel::displayName() const
{
return QApplication::tr("Dependencies");
return QCoreApplication::translate("DependenciesPanel", "Dependencies");
}
QWidget *DependenciesPanel::widget() const
......@@ -299,7 +299,7 @@ QString DependenciesPanelFactory::id() const
QString DependenciesPanelFactory::displayName() const
{
return QApplication::tr("Dependencies");
return QCoreApplication::translate("DependenciesPanelFactory", "Dependencies");
}
bool DependenciesPanelFactory::supports(Project *project)
......
......@@ -45,7 +45,7 @@ QString EditorSettingsPanelFactory::id() const
QString EditorSettingsPanelFactory::displayName() const
{
return QApplication::tr("Editor Settings");
return QCoreApplication::translate("EditorSettingsPanelFactory", "Editor Settings");
}
bool EditorSettingsPanelFactory::supports(Project *project)
......@@ -84,7 +84,7 @@ EditorSettingsPanel::~EditorSettingsPanel()
QString EditorSettingsPanel::displayName() const
{
return QApplication::tr("Editor Settings");
return QCoreApplication::translate("EditorSettingsPanel", "Editor Settings");
}
QWidget *EditorSettingsPanel::widget() const
......
......@@ -100,7 +100,7 @@ QString RunSettingsPanelFactory::id() const
QString RunSettingsPanelFactory::displayName() const
{
return QApplication::tr("Run Settings");
return QCoreApplication::tr("RunSettingsPanelFactory", "Run Settings");
}
bool RunSettingsPanelFactory::supports(Project *project)
......@@ -142,7 +142,7 @@ RunSettingsPanel::~RunSettingsPanel()
QString RunSettingsPanel::displayName() const
{
return QApplication::tr("Run Settings");
return QCoreApplication::translate("RunSettingsPanel", "Run Settings");
}
QWidget *RunSettingsPanel::widget() const
......@@ -192,7 +192,7 @@ QVariant RunConfigurationsModel::data(const QModelIndex &index, int role) const
if (row < m_runConfigurations.size()) {
RunConfiguration *rc = m_runConfigurations.at(row);
if (rc == m_activeRunConfiguration)
return tr("%1 (Active)").arg(rc->displayName());
return QCoreApplication::translate("RunConfigurationsModel", "%1 (Active)").arg(rc->displayName());
return rc->displayName();
}
}
......
......@@ -27,9 +27,10 @@
**
**************************************************************************/
#include <QDebug>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QObject>
#include <QtCore/QCoreApplication>
#include "xuifiledialog.h"
......@@ -41,7 +42,7 @@ void XUIFileDialog::runOpenFileDialog(const QString& path, QWidget* parent, QObj
if (dir.isNull())
dir = XUIFileDialog::defaultFolder();
QString caption = QObject::tr("Open file", "XUIFileDialog::runOpenFileDialog");
QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Open file");
QString fileName = QFileDialog::getOpenFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;"), 0, QFileDialog::ReadOnly);
QmlDesigner::Internal::SignalEmitter emitter;
......@@ -63,7 +64,7 @@ void XUIFileDialog::runSaveFileDialog(const QString& path, QWidget* parent, QObj
dialog->setDirectory(dir);
dialog->open(receiver, member);
#else // !Q_WS_MAC
QString caption = QObject::tr("Save file", "XUIFileDialog::runSaveFileDialog");
QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Save file");
QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;"));
QmlDesigner::Internal::SignalEmitter emitter;
......@@ -77,8 +78,8 @@ QStringList XUIFileDialog::fileNameFilters()
QStringList filters;
filters
<< QObject::tr("Declarative UI files (*.qml)", "XUIFileDialog::fileNameFilters")
<< QObject::tr("All files (*)", "XUIFileDialog::fileNameFilters");
<< QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Declarative UI files (*.qml)")
<< QCoreApplication::translate("QmlDesigner::XUIFileDialog", "All files (*)");
return filters;
}
......
......@@ -668,7 +668,7 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
contents = QString::fromLatin1(qfile.readAll()); // yes, really latin1
qfile.close();
lines = contents.split(QLatin1Char('\n'));
while (lines.last().isEmpty())
while (!lines.isEmpty() && lines.last().isEmpty())
lines.removeLast();
} else {
m_project->proFileParseError(tr("Error while reading PRO file %1: %2")
......
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