~timo-jyrinki/ubuntu/saucy/qtcreator/add_workaround_back

« back to all changes in this revision

Viewing changes to src/plugins/projectexplorer/buildsettingspropertiespage.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2011-11-18 16:18:49 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20111118161849-5t8jugl6egvs4iev
Tags: 2.4.0~rc-0ubuntu1
* New upstream release candidate.
* Drop 04_fix_ftbfs_arm_qreal.diff, merged upstream.
* Refresh 01_fix_installation_paths.diff.
* Compress binary packages with xz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
**
5
5
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6
6
**
7
 
** Contact: Nokia Corporation (info@qt.nokia.com)
 
7
** Contact: Nokia Corporation (qt-info@nokia.com)
8
8
**
9
9
**
10
10
** GNU Lesser General Public License Usage
26
26
** conditions contained in a signed written agreement between you and Nokia.
27
27
**
28
28
** If you have questions regarding the use of this file, please contact
29
 
** Nokia at info@qt.nokia.com.
 
29
** Nokia at qt-info@nokia.com.
30
30
**
31
31
**************************************************************************/
32
32
 
42
42
#include <coreplugin/coreconstants.h>
43
43
#include <extensionsystem/pluginmanager.h>
44
44
#include <utils/qtcassert.h>
 
45
#include <projectexplorer/projectexplorer.h>
 
46
#include <projectexplorer/buildmanager.h>
45
47
 
46
48
#include <QtCore/QMargins>
47
49
#include <QtCore/QTimer>
145
147
        hbox->addWidget(m_removeButton);
146
148
 
147
149
        m_renameButton = new QPushButton(this);
148
 
        m_renameButton->setText(tr("Rename"));
 
150
        m_renameButton->setText(tr("Rename..."));
149
151
        m_renameButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
150
152
        hbox->addWidget(m_renameButton);
151
153
 
297
299
 
298
300
void BuildSettingsWidget::deleteConfiguration()
299
301
{
300
 
    QMessageBox msgBox(QMessageBox::Question, tr("Remove Build Configuration"),
301
 
                       tr("Do you really want to delete the build configuration <b>%1</b>?").arg(m_buildConfiguration->displayName()),
302
 
                       QMessageBox::Yes|QMessageBox::No, this);
303
 
    msgBox.setDefaultButton(QMessageBox::No);
304
 
    msgBox.setEscapeButton(QMessageBox::No);
305
 
    if (msgBox.exec() == QMessageBox::No)
306
 
        return;
307
 
 
308
302
    deleteConfiguration(m_buildConfiguration);
309
303
}
310
304
 
370
364
        m_target->buildConfigurations().size() <= 1)
371
365
        return;
372
366
 
 
367
    ProjectExplorer::BuildManager *bm = ProjectExplorerPlugin::instance()->buildManager();
 
368
    if (bm->isBuilding(deleteConfiguration)) {
 
369
        QMessageBox box;
 
370
        QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Remove Build Configuration"), QMessageBox::AcceptRole);
 
371
        QPushButton *cancelClose = box.addButton(tr("Do Not Remove"), QMessageBox::RejectRole);
 
372
        box.setDefaultButton(cancelClose);
 
373
        box.setWindowTitle(tr("Remove Build Configuration %1?").arg(deleteConfiguration->displayName()));
 
374
        box.setText(tr("The build configuration <b>%1</b> is currently being built.").arg(deleteConfiguration->displayName()));
 
375
        box.setInformativeText(tr("Do you want to cancel the build process and remove the Build Configuration anyway?"));
 
376
        box.exec();
 
377
        if (box.clickedButton() != closeAnyway)
 
378
            return;
 
379
        bm->cancel();
 
380
    } else {
 
381
        QMessageBox msgBox(QMessageBox::Question, tr("Remove Build Configuration?"),
 
382
                           tr("Do you really want to delete build configuration <b>%1</b>?").arg(deleteConfiguration->displayName()),
 
383
                           QMessageBox::Yes|QMessageBox::No, this);
 
384
        msgBox.setDefaultButton(QMessageBox::No);
 
385
        msgBox.setEscapeButton(QMessageBox::No);
 
386
        if (msgBox.exec() == QMessageBox::No)
 
387
            return;
 
388
    }
 
389
 
373
390
    m_target->removeBuildConfiguration(deleteConfiguration);
374
391
 
375
392
    updateBuildSettings();