Commit 5942b48e authored by Rafael Roquetto's avatar Rafael Roquetto Committed by Tobias Hunger

[BlackBerry] Move NDK settings to its own category

Also rename the associated files accordingly.

Change-Id: Ibc0ca2c9840733968dafb6d790220d4d59f4a419
Reviewed-by: default avatarMehdi Fekari <mfekari@rim.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 1860ace6
......@@ -29,8 +29,8 @@
**
****************************************************************************/
#include "blackberrysettingspage.h"
#include "blackberrysettingswidget.h"
#include "blackberryndksettingspage.h"
#include "blackberryndksettingswidget.h"
#include "qnxconstants.h"
#include <projectexplorer/projectexplorerconstants.h>
......@@ -40,27 +40,28 @@
namespace Qnx {
namespace Internal {
BlackBerrySettingsPage::BlackBerrySettingsPage(QObject *parent) :
BlackBerryNDKSettingsPage::BlackBerryNDKSettingsPage(QObject *parent) :
Core::IOptionsPage(parent)
{
setId(Constants::QNX_SETTINGS_ID);
setDisplayName(tr("BlackBerry"));
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setId(Core::Id(Constants::QNX_BB_NDK_SETTINGS_ID));
setDisplayName(tr("NDK"));
setCategory(Constants::QNX_BB_CATEGORY);
setDisplayCategory(QCoreApplication::translate("BlackBerry",
Constants::QNX_SETTINGS_TR_CATEGORY));
Constants::QNX_BB_CATEGORY_TR));
setCategoryIcon(QLatin1String(Constants::QNX_BB_CATEGORY_ICON));
}
QWidget *BlackBerrySettingsPage::createPage(QWidget *parent)
QWidget *BlackBerryNDKSettingsPage::createPage(QWidget *parent)
{
m_widget = new BlackBerrySettingsWidget(parent);
m_widget = new BlackBerryNDKSettingsWidget(parent);
return m_widget;
}
void BlackBerrySettingsPage::apply()
void BlackBerryNDKSettingsPage::apply()
{
}
void BlackBerrySettingsPage::finish()
void BlackBerryNDKSettingsPage::finish()
{
}
......
......@@ -29,30 +29,30 @@
**
****************************************************************************/
#ifndef BLACKBERRYSETTINGSPAGE_H
#define BLACKBERRYSETTINGSPAGE_H
#ifndef BLACKBERRYNDKSETTINGSPAGE_H
#define BLACKBERRYNDKSETTINGSPAGE_H
#include <coreplugin/dialogs/ioptionspage.h>
namespace Qnx {
namespace Internal {
class BlackBerrySettingsWidget;
class BlackBerryNDKSettingsWidget;
class BlackBerrySettingsPage : public Core::IOptionsPage
class BlackBerryNDKSettingsPage : public Core::IOptionsPage
{
Q_OBJECT
public:
explicit BlackBerrySettingsPage(QObject *parent = 0);
explicit BlackBerryNDKSettingsPage(QObject *parent = 0);
QWidget *createPage(QWidget *parent);
void apply();
void finish();
private:
BlackBerrySettingsWidget *m_widget;
BlackBerryNDKSettingsWidget *m_widget;
};
} // namespace Internal
} // namespace Qnx
#endif // BLACKBERRYSETTINGSPAGE_H
#endif // BLACKBERRYNDKSETTINGSPAGE_H
......@@ -29,8 +29,8 @@
**
****************************************************************************/
#include "blackberrysettingswidget.h"
#include "ui_blackberrysettingswidget.h"
#include "blackberryndksettingswidget.h"
#include "ui_blackberryndksettingswidget.h"
#include "qnxutils.h"
#include <utils/pathchooser.h>
......@@ -42,9 +42,9 @@
namespace Qnx {
namespace Internal {
BlackBerrySettingsWidget::BlackBerrySettingsWidget(QWidget *parent) :
BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
QWidget(parent),
m_ui(new Ui_BlackBerrySettingsWidget)
m_ui(new Ui_BlackBerryNDKSettingsWidget)
{
m_bbConfig = &BlackBerryConfiguration::instance();
m_ui->setupUi(this);
......@@ -58,14 +58,14 @@ BlackBerrySettingsWidget::BlackBerrySettingsWidget(QWidget *parent) :
connect(m_bbConfig, SIGNAL(updated()), this, SLOT(updateInfoTable()));
}
void BlackBerrySettingsWidget::checkSdkPath()
void BlackBerryNDKSettingsWidget::checkSdkPath()
{
if (!m_ui->sdkPath->path().isEmpty() &&
QnxUtils::isValidNdkPath(m_ui->sdkPath->path()))
m_bbConfig->setupConfiguration(m_ui->sdkPath->path());
}
void BlackBerrySettingsWidget::updateInfoTable()
void BlackBerryNDKSettingsWidget::updateInfoTable()
{
QMultiMap<QString, QString> env = m_bbConfig->qnxEnv();
......@@ -98,14 +98,14 @@ void BlackBerrySettingsWidget::updateInfoTable()
m_ui->removeButton->setEnabled(true);
}
void BlackBerrySettingsWidget::clearInfoTable()
void BlackBerryNDKSettingsWidget::clearInfoTable()
{
m_infoModel->clear();
m_ui->sdkPath->setPath(QString());
m_ui->removeButton->setEnabled(false);
}
void BlackBerrySettingsWidget::cleanConfiguration()
void BlackBerryNDKSettingsWidget::cleanConfiguration()
{
QMessageBox::StandardButton button =
QMessageBox::question(Core::ICore::mainWindow(),
......@@ -117,7 +117,7 @@ void BlackBerrySettingsWidget::cleanConfiguration()
m_bbConfig->cleanConfiguration();
}
void BlackBerrySettingsWidget::initInfoTable()
void BlackBerryNDKSettingsWidget::initInfoTable()
{
m_infoModel = new QStandardItemModel(this);
......
......@@ -29,8 +29,8 @@
**
****************************************************************************/
#ifndef BLACKBERRYSETTINGSWIDGET_H
#define BLACKBERRYSETTINGSWIDGET_H
#ifndef BLACKBERRYNDKSETTINGSWIDGET_H
#define BLACKBERRYNDKSETTINGSWIDGET_H
#include "blackberryconfiguration.h"
......@@ -41,14 +41,14 @@
namespace Qnx {
namespace Internal {
class Ui_BlackBerrySettingsWidget;
class Ui_BlackBerryNDKSettingsWidget;
class BlackBerrySettingsWidget : public QWidget
class BlackBerryNDKSettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit BlackBerrySettingsWidget(QWidget *parent = 0);
explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0);
signals:
void sdkPathChanged();
......@@ -62,7 +62,7 @@ public slots:
private:
void initInfoTable();
QString m_sdkPath;
Ui_BlackBerrySettingsWidget *m_ui;
Ui_BlackBerryNDKSettingsWidget *m_ui;
BlackBerryConfiguration *m_bbConfig;
QStandardItemModel *m_infoModel;
......@@ -71,4 +71,4 @@ private:
} // namespace Internal
} // namespeace Qnx
#endif // BLACKBERRYSETTINGSWIDGET_H
#endif // BLACKBERRYNDKSETTINGSWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Qnx::Internal::BlackBerrySettingsWidget</class>
<widget class="QWidget" name="Qnx::Internal::BlackBerrySettingsWidget">
<class>Qnx::Internal::BlackBerryNDKSettingsWidget</class>
<widget class="QWidget" name="Qnx::Internal::BlackBerryNDKSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
......
......@@ -53,8 +53,8 @@ SOURCES += qnxplugin.cpp \
blackberrydeployinformation.cpp \
pathchooserdelegate.cpp \
blackberryabstractdeploystep.cpp \
blackberrysettingswidget.cpp \
blackberrysettingspage.cpp \
blackberryndksettingswidget.cpp \
blackberryndksettingspage.cpp \
blackberryconfiguration.cpp
HEADERS += qnxplugin.h\
......@@ -105,8 +105,8 @@ HEADERS += qnxplugin.h\
blackberrydeployinformation.h \
pathchooserdelegate.h \
blackberryabstractdeploystep.h \
blackberrysettingswidget.h \
blackberrysettingspage.h \
blackberryndksettingswidget.h \
blackberryndksettingspage.h \
blackberryconfiguration.h
FORMS += \
......@@ -117,7 +117,7 @@ FORMS += \
blackberrydeviceconfigurationwidget.ui \
qnxbaseqtconfigwidget.ui \
bardescriptorfileimagewizardpage.ui \
blackberrysettingswidget.ui
blackberryndksettingswidget.ui
RESOURCES += \
qnx.qrc
......@@ -77,11 +77,11 @@ QtcPlugin {
"blackberryruncontrol.h",
"blackberryruncontrolfactory.cpp",
"blackberryruncontrolfactory.h",
"blackberrysettingswidget.cpp",
"blackberrysettingswidget.h",
"blackberrysettingswidget.ui",
"blackberrysettingspage.cpp",
"blackberrysettingspage.h",
"blackberryndksettingswidget.cpp",
"blackberryndksettingswidget.h",
"blackberryndksettingswidget.ui",
"blackberryndksettingspage.cpp",
"blackberryndksettingspage.h",
"blackberryconfiguration.cpp",
"blackberryconfiguration.h",
"blackberrywizardextension.cpp",
......
......@@ -88,8 +88,11 @@ const char QNX_BB_PLATFORM_NAME[] = "BlackBerry";
const char QNX_DEBUG_EXECUTABLE[] = "pdebug";
const char QNX_SETTINGS_ID[] = "ZZ.Qnx Configuration";
const char QNX_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("BlackBerry", "BlackBerry");
// BlackBerry settings constants
const char QNX_BB_CATEGORY[] = "BlackBerry";
const char QNX_BB_CATEGORY_TR[] = QT_TRANSLATE_NOOP("BlackBerry", "BlackBerry");
const char QNX_BB_CATEGORY_ICON[] = ":/qnx/images/target.png";
const char QNX_BB_NDK_SETTINGS_ID[] = "ZZ.BlackBerry NDK Configuration";
} // namespace Constants
} // namespace Qnx
......
......@@ -46,7 +46,7 @@
#include "qnxrunconfigurationfactory.h"
#include "qnxqtversionfactory.h"
#include "blackberrywizardextension.h"
#include "blackberrysettingspage.h"
#include "blackberryndksettingspage.h"
#include <QtPlugin>
......@@ -74,7 +74,7 @@ bool QNXPlugin::initialize(const QStringList &arguments, QString *errorString)
addAutoReleasedObject(new BlackBerryRunConfigurationFactory);
addAutoReleasedObject(new BlackBerryRunControlFactory);
addAutoReleasedObject(new BlackBerryWizardExtension);
addAutoReleasedObject(new BlackBerrySettingsPage);
addAutoReleasedObject(new BlackBerryNDKSettingsPage);
// Handles QNX
addAutoReleasedObject(new QnxQtVersionFactory);
......
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