summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-08-25 16:08:52 +0200
committerdt <qtc-committer@nokia.com>2009-08-27 12:12:35 +0200
commit9f918428131e2480e9a16f3123a2e71bddbc31e4 (patch)
treee251677c8848bb2da04410b0c8db4ee6e1672c39 /src
parent0bbc9451545ee7b3d2dcd305e07bfe592ff3f8e8 (diff)
downloadqt-creator-9f918428131e2480e9a16f3123a2e71bddbc31e4.tar.gz
Compile without rtti support
Since we can easily do that, just do it. No gurantee that we aren't going to use rtti in the future.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp2
-rw-r--r--src/plugins/debugger/debuggermanager.cpp2
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp30
-rw-r--r--src/plugins/debugger/debuggerrunner.h25
-rw-r--r--src/plugins/find/searchresulttreemodel.cpp6
-rw-r--r--src/plugins/perforce/perforceplugin.cpp3
-rw-r--r--src/plugins/projectexplorer/applicationrunconfiguration.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp6
-rw-r--r--src/shared/qrceditor/undocommands.cpp5
11 files changed, 48 insertions, 49 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index a27abe6c47..e05614029c 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -250,7 +250,7 @@ bool CMakeProject::parseCMakeLists()
//qDebug()<<"Create run configurations of m_targets";
QMultiMap<QString, QSharedPointer<CMakeRunConfiguration> > existingRunConfigurations;
foreach(QSharedPointer<ProjectExplorer::RunConfiguration> cmakeRunConfiguration, runConfigurations()) {
- if (QSharedPointer<CMakeRunConfiguration> rc = cmakeRunConfiguration.dynamicCast<CMakeRunConfiguration>()) {
+ if (QSharedPointer<CMakeRunConfiguration> rc = cmakeRunConfiguration.objectCast<CMakeRunConfiguration>()) {
existingRunConfigurations.insert(rc->title(), rc);
}
}
diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 2439aa8af4..c8c390dba5 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -463,7 +463,7 @@ IDebuggerEngine *DebuggerManager::engine()
IDebuggerManagerAccessForEngines *DebuggerManager::engineInterface()
{
- return dynamic_cast<IDebuggerManagerAccessForEngines *>(this);
+ return this;
}
void DebuggerManager::createNewDock(QWidget *widget)
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index ca9ccf3153..0f9b8b2d80 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -31,7 +31,6 @@
#include "debuggermanager.h"
-#include <projectexplorer/applicationrunconfiguration.h>
#include <projectexplorer/environment.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -50,29 +49,6 @@ using ProjectExplorer::RunConfiguration;
using ProjectExplorer::RunControl;
using ProjectExplorer::ApplicationRunConfiguration;
-// A default run configuration for external executables or attaching to
-// running processes by id.
-class DefaultApplicationRunConfiguration : public ProjectExplorer::ApplicationRunConfiguration
-{
-public:
- explicit DefaultApplicationRunConfiguration(const QString &executable = QString());
-
- virtual QString executable() const { return m_executable; }
- virtual RunMode runMode() const { return Gui; }
- virtual QString workingDirectory() const { return QString(); }
- virtual QStringList commandLineArguments() const { return QStringList(); }
- virtual ProjectExplorer::Environment environment() const
- { return ProjectExplorer::Environment(); }
- virtual QString dumperLibrary() const { return QString(); }
- virtual QStringList dumperLibraryLocations() const { return QStringList(); }
- virtual ProjectExplorer::ToolChain::ToolChainType toolChainType() const
- { return ProjectExplorer::ToolChain::UNKNOWN; }
- virtual QWidget *configurationWidget() { return 0; }
-
-private:
- const QString m_executable;
-};
-
DefaultApplicationRunConfiguration::DefaultApplicationRunConfiguration(const QString &executable) :
ProjectExplorer::ApplicationRunConfiguration(0),
m_executable(executable)
@@ -93,7 +69,7 @@ DebuggerRunner::DebuggerRunner(DebuggerManager *manager)
bool DebuggerRunner::canRun(RunConfigurationPtr runConfiguration, const QString &mode)
{
return mode == ProjectExplorer::Constants::DEBUGMODE
- && !runConfiguration.dynamicCast<ApplicationRunConfiguration>().isNull();
+ && !runConfiguration.objectCast<ApplicationRunConfiguration>().isNull();
}
QString DebuggerRunner::displayName() const
@@ -113,7 +89,7 @@ RunControl *DebuggerRunner::run(RunConfigurationPtr runConfiguration,
{
QTC_ASSERT(mode == ProjectExplorer::Constants::DEBUGMODE, return 0);
ApplicationRunConfigurationPtr rc =
- runConfiguration.dynamicCast<ApplicationRunConfiguration>();
+ runConfiguration.objectCast<ApplicationRunConfiguration>();
QTC_ASSERT(!rc.isNull(), return 0);
//qDebug() << "***** Debugging" << rc->name() << rc->executable();
DebuggerRunControl *runControl = new DebuggerRunControl(m_manager, startMode, sp, rc);
@@ -170,7 +146,7 @@ void DebuggerRunControl::start()
{
m_running = true;
ApplicationRunConfigurationPtr rc =
- runConfiguration().dynamicCast<ApplicationRunConfiguration>();
+ runConfiguration().objectCast<ApplicationRunConfiguration>();
if (rc) {
// Enhance parameters by info from the project, but do not clobber
// arguments given in the dialogs
diff --git a/src/plugins/debugger/debuggerrunner.h b/src/plugins/debugger/debuggerrunner.h
index 5f511b3f5f..0e0b0ac1e7 100644
--- a/src/plugins/debugger/debuggerrunner.h
+++ b/src/plugins/debugger/debuggerrunner.h
@@ -33,6 +33,7 @@
#include "debuggermanager.h"
#include <projectexplorer/runconfiguration.h>
+#include <projectexplorer/applicationrunconfiguration.h>
namespace ProjectExplorer {
class ApplicationRunConfiguration;
@@ -110,6 +111,30 @@ private:
bool m_running;
};
+// A default run configuration for external executables or attaching to
+// running processes by id.
+class DefaultApplicationRunConfiguration : public ProjectExplorer::ApplicationRunConfiguration
+{
+ Q_OBJECT
+public:
+ explicit DefaultApplicationRunConfiguration(const QString &executable = QString());
+
+ virtual QString executable() const { return m_executable; }
+ virtual RunMode runMode() const { return Gui; }
+ virtual QString workingDirectory() const { return QString(); }
+ virtual QStringList commandLineArguments() const { return QStringList(); }
+ virtual ProjectExplorer::Environment environment() const
+ { return ProjectExplorer::Environment(); }
+ virtual QString dumperLibrary() const { return QString(); }
+ virtual QStringList dumperLibraryLocations() const { return QStringList(); }
+ virtual ProjectExplorer::ToolChain::ToolChainType toolChainType() const
+ { return ProjectExplorer::ToolChain::UNKNOWN; }
+ virtual QWidget *configurationWidget() { return 0; }
+
+private:
+ const QString m_executable;
+};
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/find/searchresulttreemodel.cpp b/src/plugins/find/searchresulttreemodel.cpp
index 4be37a1c72..a4fd5e21e3 100644
--- a/src/plugins/find/searchresulttreemodel.cpp
+++ b/src/plugins/find/searchresulttreemodel.cpp
@@ -166,8 +166,10 @@ QVariant SearchResultTreeModel::data(const SearchResultTextRow *row, int role) c
break;
case ItemDataRoles::FileNameRole:
{
- const SearchResultFile *file = dynamic_cast<const SearchResultFile *>(row->parent());
- result = file->fileName();
+ if (row->parent()->itemType() == SearchResultTreeItem::ResultFile) {
+ const SearchResultFile *file = static_cast<const SearchResultFile *>(row->parent());
+ result = file->fileName();
+ }
break;
}
default:
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index e8f7ae3198..5254f93d5d 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -600,8 +600,7 @@ Core::IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName,
Core::EditorManager *editorManager = Core::EditorManager::instance();
Core::IEditor *editor = editorManager->openEditor(fileName, Constants::PERFORCESUBMITEDITOR_KIND);
editorManager->ensureEditorManagerVisible();
- PerforceSubmitEditor *submitEditor = dynamic_cast<PerforceSubmitEditor*>(editor);
- QTC_ASSERT(submitEditor, return 0);
+ PerforceSubmitEditor *submitEditor = static_cast<PerforceSubmitEditor*>(editor);
submitEditor->restrictToProjectFiles(depotFileNames);
submitEditor->registerActions(m_undoAction, m_redoAction, m_submitCurrentLogAction, m_diffSelectedFiles);
connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(slotDiff(QStringList)));
diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.cpp b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
index c112595509..8325b7327c 100644
--- a/src/plugins/projectexplorer/applicationrunconfiguration.cpp
+++ b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
@@ -81,7 +81,7 @@ ApplicationRunConfigurationRunner::~ApplicationRunConfigurationRunner()
bool ApplicationRunConfigurationRunner::canRun(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
return (mode == ProjectExplorer::Constants::RUNMODE)
- && (!runConfiguration.dynamicCast<ApplicationRunConfiguration>().isNull());
+ && (!runConfiguration.objectCast<ApplicationRunConfiguration>().isNull());
}
QString ApplicationRunConfigurationRunner::displayName() const
@@ -91,7 +91,7 @@ QString ApplicationRunConfigurationRunner::displayName() const
RunControl *ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
- QSharedPointer<ApplicationRunConfiguration> rc = runConfiguration.dynamicCast<ApplicationRunConfiguration>();
+ QSharedPointer<ApplicationRunConfiguration> rc = runConfiguration.objectCast<ApplicationRunConfiguration>();
Q_ASSERT(!rc.isNull());
Q_ASSERT(mode == ProjectExplorer::Constants::RUNMODE);
@@ -126,7 +126,7 @@ ApplicationRunControl::~ApplicationRunControl()
void ApplicationRunControl::start()
{
- QSharedPointer<ApplicationRunConfiguration> rc = runConfiguration().dynamicCast<ApplicationRunConfiguration>();
+ QSharedPointer<ApplicationRunConfiguration> rc = runConfiguration().objectCast<ApplicationRunConfiguration>();
Q_ASSERT(!rc.isNull());
m_applicationLauncher.setEnvironment(rc->environment().toStringList());
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
index 318be09fc6..7d5a8e4f8f 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
@@ -491,12 +491,12 @@ S60DeviceRunConfigurationRunner::S60DeviceRunConfigurationRunner(QObject *parent
bool S60DeviceRunConfigurationRunner::canRun(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
return (mode == ProjectExplorer::Constants::RUNMODE)
- && (!runConfiguration.dynamicCast<S60DeviceRunConfiguration>().isNull());
+ && (!runConfiguration.objectCast<S60DeviceRunConfiguration>().isNull());
}
RunControl* S60DeviceRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
- QSharedPointer<S60DeviceRunConfiguration> rc = runConfiguration.dynamicCast<S60DeviceRunConfiguration>();
+ QSharedPointer<S60DeviceRunConfiguration> rc = runConfiguration.objectCast<S60DeviceRunConfiguration>();
Q_ASSERT(!rc.isNull());
Q_ASSERT(mode == ProjectExplorer::Constants::RUNMODE);
@@ -541,7 +541,7 @@ S60DeviceRunControl::S60DeviceRunControl(QSharedPointer<RunConfiguration> runCon
void S60DeviceRunControl::start()
{
- QSharedPointer<S60DeviceRunConfiguration> rc = runConfiguration().dynamicCast<S60DeviceRunConfiguration>();
+ QSharedPointer<S60DeviceRunConfiguration> rc = runConfiguration().objectCast<S60DeviceRunConfiguration>();
QTC_ASSERT(!rc.isNull(), return);
Qt4Project *project = qobject_cast<Qt4Project *>(rc->project());
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
index c0d1f21977..b6894eda92 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
@@ -264,12 +264,12 @@ S60EmulatorRunConfigurationRunner::S60EmulatorRunConfigurationRunner(QObject *pa
bool S60EmulatorRunConfigurationRunner::canRun(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
return (mode == ProjectExplorer::Constants::RUNMODE)
- && (!runConfiguration.dynamicCast<S60EmulatorRunConfiguration>().isNull());
+ && (!runConfiguration.objectCast<S60EmulatorRunConfiguration>().isNull());
}
RunControl* S60EmulatorRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
- QSharedPointer<S60EmulatorRunConfiguration> rc = runConfiguration.dynamicCast<S60EmulatorRunConfiguration>();
+ QSharedPointer<S60EmulatorRunConfiguration> rc = runConfiguration.objectCast<S60EmulatorRunConfiguration>();
Q_ASSERT(!rc.isNull());
Q_ASSERT(mode == ProjectExplorer::Constants::RUNMODE);
@@ -304,7 +304,7 @@ S60EmulatorRunControl::S60EmulatorRunControl(QSharedPointer<RunConfiguration> ru
void S60EmulatorRunControl::start()
{
- QSharedPointer<S60EmulatorRunConfiguration> rc = runConfiguration().dynamicCast<S60EmulatorRunConfiguration>();
+ QSharedPointer<S60EmulatorRunConfiguration> rc = runConfiguration().objectCast<S60EmulatorRunConfiguration>();
Q_ASSERT(!rc.isNull());
// stuff like the EPOCROOT and EPOCDEVICE env variable
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index b558b8770c..eafa7eda80 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -960,7 +960,7 @@ void Qt4Project::checkForNewApplicationProjects()
foreach (Qt4ProFileNode *qt4proFile, m_applicationProFileChange) {
bool found = false;
foreach (QSharedPointer<RunConfiguration> rc, runConfigurations()) {
- QSharedPointer<Qt4RunConfiguration> qtrc = rc.dynamicCast<Qt4RunConfiguration>();
+ QSharedPointer<Qt4RunConfiguration> qtrc = rc.objectCast<Qt4RunConfiguration>();
if (qtrc && qtrc->proFilePath() == qt4proFile->path()) {
found = true;
break;
@@ -984,7 +984,7 @@ void Qt4Project::checkForDeletedApplicationProjects()
QList<QSharedPointer<Qt4RunConfiguration> > removeList;
foreach (QSharedPointer<RunConfiguration> rc, runConfigurations()) {
- if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.dynamicCast<Qt4RunConfiguration>()) {
+ if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.objectCast<Qt4RunConfiguration>()) {
if (!paths.contains(qt4rc->proFilePath())) {
removeList.append(qt4rc);
// qDebug()<<"Removing runConfiguration for "<<qt4rc->proFilePath();
@@ -1037,7 +1037,7 @@ void Qt4Project::projectTypeChanged(Qt4ProFileNode *node, const Qt4ProjectType o
void Qt4Project::proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node)
{
foreach (QSharedPointer<RunConfiguration> rc, runConfigurations()) {
- if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.dynamicCast<Qt4RunConfiguration>()) {
+ if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.objectCast<Qt4RunConfiguration>()) {
if (qt4rc->proFilePath() == node->path()) {
qt4rc->invalidateCachedTargetInformation();
}
diff --git a/src/shared/qrceditor/undocommands.cpp b/src/shared/qrceditor/undocommands.cpp
index 911160c909..1172cb5f0e 100644
--- a/src/shared/qrceditor/undocommands.cpp
+++ b/src/shared/qrceditor/undocommands.cpp
@@ -86,11 +86,8 @@ ModifyPropertyCommand::ModifyPropertyCommand(ResourceView *view, const QModelInd
bool ModifyPropertyCommand::mergeWith(const QUndoCommand * command)
{
- const ModifyPropertyCommand * const brother
- = dynamic_cast<const ModifyPropertyCommand *>(command);
- if (command == 0 || m_property != brother->m_property)
+ if (command->id() != id() || m_property != static_cast<const ModifyPropertyCommand *>(command)->m_property)
return false;
-
// Choose older command (this) and forgot the other
return true;
}