forked from qt-creator/qt-creator
all: less QScopedPointer
Change-Id: I536bdb4d4f0c10fa858560f3c160fc0fff8da9b2 Reviewed-on: http://codereview.qt-project.org/5116 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -35,8 +35,6 @@
|
||||
|
||||
#include <languageutils/fakemetaobject.h>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
// for Q_DECLARE_TR_FUNCTIONS
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Utils {
|
||||
ConsoleProcess::~ConsoleProcess()
|
||||
{
|
||||
stop();
|
||||
delete d;
|
||||
}
|
||||
|
||||
void ConsoleProcess::setMode(Mode m)
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
@@ -130,7 +129,7 @@ private:
|
||||
void cleanupInferior();
|
||||
#endif
|
||||
|
||||
QScopedPointer<ConsoleProcessPrivate> d;
|
||||
ConsoleProcessPrivate *d;
|
||||
};
|
||||
|
||||
} //namespace Utils
|
||||
|
||||
@@ -261,6 +261,7 @@ CrumblePath::~CrumblePath()
|
||||
{
|
||||
qDeleteAll(d->m_buttons);
|
||||
d->m_buttons.clear();
|
||||
delete d;
|
||||
}
|
||||
|
||||
void CrumblePath::selectIndex(int index)
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QResizeEvent)
|
||||
|
||||
namespace Utils {
|
||||
|
||||
struct CrumblePathPrivate;
|
||||
@@ -47,6 +45,7 @@ struct CrumblePathPrivate;
|
||||
class QTCREATOR_UTILS_EXPORT CrumblePath : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CrumblePath(QWidget *parent = 0);
|
||||
~CrumblePath();
|
||||
@@ -75,7 +74,7 @@ private:
|
||||
void setBackgroundStyle();
|
||||
|
||||
private:
|
||||
QScopedPointer<CrumblePathPrivate> d;
|
||||
CrumblePathPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
@@ -221,6 +221,7 @@ FileSystemWatcher::~FileSystemWatcher()
|
||||
if (debug)
|
||||
qDebug() << this << "Deleted watcher" << d->m_id;
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool FileSystemWatcher::watchesFile(const QString &file) const
|
||||
|
||||
@@ -86,7 +86,7 @@ signals:
|
||||
private:
|
||||
void init();
|
||||
|
||||
QScopedPointer<FileSystemWatcherPrivate> d;
|
||||
FileSystemWatcherPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#define CLASSVIEWNAVIGATIONWIDGET_H
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
||||
#include <QtGui/QStandardItem>
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
|
||||
namespace Core {
|
||||
|
||||
struct OpenEditorsModelPrivate {
|
||||
struct OpenEditorsModelPrivate
|
||||
{
|
||||
OpenEditorsModelPrivate();
|
||||
|
||||
const QIcon m_lockedIcon;
|
||||
@@ -67,6 +68,7 @@ OpenEditorsModel::OpenEditorsModel(QObject *parent) :
|
||||
|
||||
OpenEditorsModel::~OpenEditorsModel()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QIcon OpenEditorsModel::lockedIcon() const
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "../id.h"
|
||||
|
||||
#include <QtCore/QAbstractItemModel>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QIcon)
|
||||
|
||||
@@ -50,6 +49,7 @@ class IFile;
|
||||
class CORE_EXPORT OpenEditorsModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OpenEditorsModel(QObject *parent);
|
||||
virtual ~OpenEditorsModel();
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
int findFileName(const QString &filename) const;
|
||||
void removeEditor(int idx);
|
||||
|
||||
QScopedPointer<OpenEditorsModelPrivate> d;
|
||||
OpenEditorsModelPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -179,6 +179,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
|
||||
|
||||
EditorToolBar::~EditorToolBar()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void EditorToolBar::removeToolbarForEditor(IEditor *editor)
|
||||
|
||||
@@ -35,12 +35,10 @@
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
#include <utils/styledbar.h>
|
||||
|
||||
namespace Core {
|
||||
class IEditor;
|
||||
class IEditor;
|
||||
|
||||
struct EditorToolBarPrivate;
|
||||
|
||||
@@ -104,7 +102,7 @@ private:
|
||||
void updateToolBar(QWidget *toolBar);
|
||||
IEditor *currentEditor() const;
|
||||
|
||||
QScopedPointer<EditorToolBarPrivate> d;
|
||||
EditorToolBarPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -176,6 +176,7 @@ NavigationWidget::NavigationWidget(QAction *toggleSideBarAction) :
|
||||
NavigationWidget::~NavigationWidget()
|
||||
{
|
||||
NavigationWidgetPrivate::m_instance = 0;
|
||||
delete d;
|
||||
}
|
||||
|
||||
NavigationWidget *NavigationWidget::instance()
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <coreplugin/minisplitter.h>
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
@@ -57,8 +56,9 @@ class NavigationSubWidget;
|
||||
|
||||
class CORE_EXPORT NavigationWidgetPlaceHolder : public QWidget
|
||||
{
|
||||
friend class Core::NavigationWidget;
|
||||
Q_OBJECT
|
||||
friend class Core::NavigationWidget;
|
||||
|
||||
public:
|
||||
explicit NavigationWidgetPlaceHolder(Core::IMode *mode, QWidget *parent = 0);
|
||||
virtual ~NavigationWidgetPlaceHolder();
|
||||
@@ -76,6 +76,7 @@ private:
|
||||
class CORE_EXPORT NavigationWidget : public MiniSplitter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum FactoryModelRoles {
|
||||
FactoryObjectRole = Qt::UserRole,
|
||||
@@ -123,7 +124,7 @@ private:
|
||||
Internal::NavigationSubWidget *insertSubItem(int position, int index);
|
||||
int factoryIndex(const QString &id);
|
||||
|
||||
QScopedPointer<NavigationWidgetPrivate> d;
|
||||
NavigationWidgetPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -83,6 +83,7 @@ OutputPanePlaceHolder::~OutputPanePlaceHolder()
|
||||
om->hide();
|
||||
}
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
void OutputPanePlaceHolder::currentModeChanged(Core::IMode *mode)
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSplitter;
|
||||
QT_END_NAMESPACE
|
||||
@@ -54,8 +52,9 @@ struct OutputPanePlaceHolderPrivate;
|
||||
|
||||
class CORE_EXPORT OutputPanePlaceHolder : public QWidget
|
||||
{
|
||||
friend class Core::Internal::OutputPaneManager; // needs to set m_visible and thus access m_current
|
||||
Q_OBJECT
|
||||
friend class Core::Internal::OutputPaneManager; // needs to set m_visible and thus access m_current
|
||||
|
||||
public:
|
||||
explicit OutputPanePlaceHolder(Core::IMode *mode, QSplitter *parent = 0);
|
||||
~OutputPanePlaceHolder();
|
||||
@@ -73,7 +72,7 @@ private:
|
||||
bool canMaximizeOrMinimize() const;
|
||||
void maximizeOrMinimize(bool maximize);
|
||||
|
||||
QScopedPointer<OutputPanePlaceHolderPrivate> d;
|
||||
OutputPanePlaceHolderPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -159,8 +159,8 @@ FutureProgress::FutureProgress(QWidget *parent) :
|
||||
connect(&d->m_watcher, SIGNAL(finished()), this, SLOT(setFinished()));
|
||||
connect(&d->m_watcher, SIGNAL(progressRangeChanged(int,int)), this, SLOT(setProgressRange(int,int)));
|
||||
connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
|
||||
connect(&d->m_watcher, SIGNAL(progressTextChanged(const QString&)),
|
||||
this, SLOT(setProgressText(const QString&)));
|
||||
connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),
|
||||
this, SLOT(setProgressText(QString)));
|
||||
connect(d->m_progress, SIGNAL(clicked()), this, SLOT(cancel()));
|
||||
}
|
||||
|
||||
@@ -170,8 +170,8 @@ FutureProgress::FutureProgress(QWidget *parent) :
|
||||
*/
|
||||
FutureProgress::~FutureProgress()
|
||||
{
|
||||
if (d->m_widget)
|
||||
delete d->m_widget;
|
||||
delete d->m_widget;
|
||||
delete d;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -182,8 +182,7 @@ FutureProgress::~FutureProgress()
|
||||
*/
|
||||
void FutureProgress::setWidget(QWidget *widget)
|
||||
{
|
||||
if (d->m_widget)
|
||||
delete d->m_widget;
|
||||
delete d->m_widget;
|
||||
QSizePolicy sp = widget->sizePolicy();
|
||||
sp.setHorizontalPolicy(QSizePolicy::Ignored);
|
||||
widget->setSizePolicy(sp);
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <coreplugin/core_global.h>
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
#include <QtCore/QFuture>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
@@ -96,7 +94,7 @@ private slots:
|
||||
void fadeAway();
|
||||
|
||||
private:
|
||||
QScopedPointer<FutureProgressPrivate> d;
|
||||
FutureProgressPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -117,6 +117,7 @@ SideBar::~SideBar()
|
||||
if (!iter.value().isNull())
|
||||
delete iter.value().data();
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString SideBar::idForTitle(const QString &title) const
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
@@ -83,21 +82,20 @@ public:
|
||||
|
||||
private:
|
||||
const QString m_id;
|
||||
|
||||
QWidget *m_widget;
|
||||
QWidget *m_widget;
|
||||
};
|
||||
|
||||
class CORE_EXPORT SideBar : public MiniSplitter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*
|
||||
* The SideBar takes explicit ownership of the SideBarItems
|
||||
* if you have one SideBar, or shared ownership in case
|
||||
* of multiple SideBars.
|
||||
*/
|
||||
explicit SideBar(QList< SideBarItem*> widgetList,
|
||||
QList< SideBarItem*> defaultVisible);
|
||||
SideBar(QList<SideBarItem *> widgetList, QList<SideBarItem *> defaultVisible);
|
||||
virtual ~SideBar();
|
||||
|
||||
QStringList availableItemIds() const;
|
||||
@@ -117,8 +115,8 @@ public:
|
||||
void closeAllWidgets();
|
||||
void activateItem(SideBarItem *item);
|
||||
|
||||
void setShortcutMap(const QMap<QString, Core::Command*> &shortcutMap);
|
||||
QMap<QString, Core::Command*> shortcutMap() const;
|
||||
void setShortcutMap(const QMap<QString, Core::Command *> &shortcutMap);
|
||||
QMap<QString, Core::Command *> shortcutMap() const;
|
||||
|
||||
signals:
|
||||
void availableItemsChanged();
|
||||
@@ -133,7 +131,7 @@ private:
|
||||
const QString &title = QString());
|
||||
void removeSideBarWidget(Internal::SideBarWidget *widget);
|
||||
|
||||
QScopedPointer<SideBarPrivate> d;
|
||||
SideBarPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "core_global.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Utils {
|
||||
|
||||
@@ -212,6 +212,7 @@ DebuggerRunControl::~DebuggerRunControl()
|
||||
engine->disconnect();
|
||||
delete engine;
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
const DebuggerStartParameters &DebuggerRunControl::startParameters() const
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
@@ -116,7 +115,7 @@ protected:
|
||||
|
||||
private:
|
||||
friend class Internal::DebuggerRunControlFactory;
|
||||
QScopedPointer<Internal::DebuggerRunControlPrivate> d;
|
||||
Internal::DebuggerRunControlPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -93,9 +93,9 @@ QmlAdapter::~QmlAdapter()
|
||||
ExtensionSystem::PluginManager *pluginManager =
|
||||
ExtensionSystem::PluginManager::instance();
|
||||
|
||||
if (pluginManager->allObjects().contains(this)) {
|
||||
if (pluginManager->allObjects().contains(this))
|
||||
pluginManager->removeObject(this);
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
void QmlAdapter::beginConnection()
|
||||
@@ -109,9 +109,8 @@ void QmlAdapter::closeConnection()
|
||||
if (d->m_connectionTimer.isActive()) {
|
||||
d->m_connectionTimer.stop();
|
||||
} else {
|
||||
if (d->m_conn) {
|
||||
if (d->m_conn)
|
||||
d->m_conn->close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "qmldebuggerclient.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtNetwork/QAbstractSocket>
|
||||
|
||||
namespace QmlJsDebugClient {
|
||||
@@ -57,6 +56,7 @@ class QmlAdapterPrivate;
|
||||
class DEBUGGER_EXPORT QmlAdapter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QmlAdapter(DebuggerEngine *engine, QObject *parent = 0);
|
||||
virtual ~QmlAdapter();
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
void showConnectionErrorMessage(const QString &message);
|
||||
|
||||
private:
|
||||
QScopedPointer<Internal::QmlAdapterPrivate> d;
|
||||
Internal::QmlAdapterPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -37,12 +37,11 @@
|
||||
#include "stackhandler.h"
|
||||
#include "qmlengine.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QMainWindow>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
@@ -94,15 +93,13 @@ private:
|
||||
DebuggerEngine *m_cppEngine;
|
||||
DebuggerEngine *m_activeEngine;
|
||||
int m_stackBoundary;
|
||||
|
||||
QMessageBox *m_msg;
|
||||
};
|
||||
|
||||
|
||||
QmlCppEnginePrivate::QmlCppEnginePrivate(QmlCppEngine *parent,
|
||||
const DebuggerStartParameters &sp)
|
||||
: q(parent), m_qmlEngine(createQmlEngine(sp, q)),
|
||||
m_cppEngine(0), m_activeEngine(0), m_msg(0)
|
||||
m_cppEngine(0), m_activeEngine(0)
|
||||
{
|
||||
setObjectName(QLatin1String("QmlCppEnginePrivate"));
|
||||
}
|
||||
@@ -153,9 +150,9 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp,
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
|
||||
connect(d->m_cppEngine->stackHandler()->model(), SIGNAL(modelReset()),
|
||||
d.data(), SLOT(cppStackChanged()), Qt::QueuedConnection);
|
||||
d, SLOT(cppStackChanged()), Qt::QueuedConnection);
|
||||
connect(d->m_qmlEngine->stackHandler()->model(), SIGNAL(modelReset()),
|
||||
d.data(), SLOT(qmlStackChanged()), Qt::QueuedConnection);
|
||||
d, SLOT(qmlStackChanged()), Qt::QueuedConnection);
|
||||
connect(d->m_cppEngine, SIGNAL(stackFrameCompleted()), this, SIGNAL(stackFrameCompleted()));
|
||||
connect(d->m_cppEngine, SIGNAL(requestRemoteSetup()), this, SIGNAL(requestRemoteSetup()));
|
||||
connect(d->m_qmlEngine, SIGNAL(stackFrameCompleted()), this, SIGNAL(stackFrameCompleted()));
|
||||
@@ -165,6 +162,7 @@ QmlCppEngine::~QmlCppEngine()
|
||||
{
|
||||
delete d->m_qmlEngine;
|
||||
delete d->m_cppEngine;
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool QmlCppEngine::setToolTipExpression(const QPoint & mousePos,
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "debuggerengine.h"
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -131,7 +129,7 @@ private:
|
||||
void readyToExecuteQmlStep();
|
||||
|
||||
private:
|
||||
QScopedPointer<QmlCppEnginePrivate> d;
|
||||
QmlCppEnginePrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -94,7 +94,7 @@ ImageView::ImageView(QWidget *parent)
|
||||
|
||||
ImageView::~ImageView()
|
||||
{
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
void ImageView::drawBackground(QPainter *p, const QRectF &)
|
||||
|
||||
@@ -46,10 +46,6 @@
|
||||
#include <QtGui/QGraphicsView>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QWheelEvent;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ImageViewer {
|
||||
namespace Internal {
|
||||
|
||||
@@ -83,7 +79,7 @@ protected:
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
|
||||
private:
|
||||
QScopedPointer<struct ImageViewPrivate> d;
|
||||
struct ImageViewPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -109,6 +109,7 @@ ImageViewer::~ImageViewer()
|
||||
{
|
||||
delete d->imageView;
|
||||
delete d->toolbar;
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool ImageViewer::createNew(const QString &contents)
|
||||
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
bool updateButtonIconByTheme(QAbstractButton *button, const QString &name);
|
||||
|
||||
private:
|
||||
QScopedPointer<struct ImageViewerPrivate> d;
|
||||
struct ImageViewerPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "coreplugin/id.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QKeySequence;
|
||||
|
||||
@@ -55,13 +55,14 @@ struct ImageViewerFilePrivate
|
||||
|
||||
ImageViewerFile::ImageViewerFile(ImageViewer *parent)
|
||||
: Core::IFile(parent),
|
||||
d_ptr(new ImageViewerFilePrivate)
|
||||
d(new ImageViewerFilePrivate)
|
||||
{
|
||||
d_ptr->editor = parent;
|
||||
d->editor = parent;
|
||||
}
|
||||
|
||||
ImageViewerFile::~ImageViewerFile()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool ImageViewerFile::reload(QString *errorString,
|
||||
@@ -73,9 +74,8 @@ bool ImageViewerFile::reload(QString *errorString,
|
||||
if (type == TypePermissions) {
|
||||
emit changed();
|
||||
return true;
|
||||
} else {
|
||||
return d_ptr->editor->open(errorString, d_ptr->fileName, d_ptr->fileName);
|
||||
}
|
||||
return d->editor->open(errorString, d->fileName, d->fileName);
|
||||
}
|
||||
|
||||
bool ImageViewerFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
@@ -88,12 +88,12 @@ bool ImageViewerFile::save(QString *errorString, const QString &fileName, bool a
|
||||
|
||||
void ImageViewerFile::rename(const QString &newName)
|
||||
{
|
||||
d_ptr->fileName = newName;
|
||||
d->fileName = newName;
|
||||
}
|
||||
|
||||
QString ImageViewerFile::fileName() const
|
||||
{
|
||||
return d_ptr->fileName;
|
||||
return d->fileName;
|
||||
}
|
||||
|
||||
QString ImageViewerFile::defaultPath() const
|
||||
@@ -108,7 +108,7 @@ QString ImageViewerFile::suggestedFileName() const
|
||||
|
||||
QString ImageViewerFile::mimeType() const
|
||||
{
|
||||
return d_ptr->mimeType;
|
||||
return d->mimeType;
|
||||
}
|
||||
|
||||
bool ImageViewerFile::isModified() const
|
||||
@@ -128,13 +128,13 @@ bool ImageViewerFile::isSaveAsAllowed() const
|
||||
|
||||
void ImageViewerFile::setMimetype(const QString &mimetype)
|
||||
{
|
||||
d_ptr->mimeType = mimetype;
|
||||
d->mimeType = mimetype;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
void ImageViewerFile::setFileName(const QString &filename)
|
||||
{
|
||||
d_ptr->fileName = filename;
|
||||
d->fileName = filename;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
namespace ImageViewer {
|
||||
namespace Internal {
|
||||
|
||||
class ImageViewer;
|
||||
|
||||
class ImageViewerFile : public Core::IFile
|
||||
@@ -67,10 +68,10 @@ public:
|
||||
void setFileName(const QString &filename);
|
||||
|
||||
private:
|
||||
QScopedPointer<struct ImageViewerFilePrivate> d_ptr;
|
||||
struct ImageViewerFilePrivate *d;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace Internal
|
||||
} // namespace ImageViewer
|
||||
|
||||
#endif // IMAGEVIEWERFILE_H
|
||||
|
||||
@@ -54,12 +54,13 @@ struct ImageViewerPluginPrivate
|
||||
///////////////////////////////// ImageViewerPlugin //////////////////////////////////
|
||||
|
||||
ImageViewerPlugin::ImageViewerPlugin()
|
||||
: d_ptr(new ImageViewerPluginPrivate)
|
||||
: d(new ImageViewerPluginPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
ImageViewerPlugin::~ImageViewerPlugin()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool ImageViewerPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
@@ -70,17 +71,17 @@ bool ImageViewerPlugin::initialize(const QStringList &arguments, QString *errorM
|
||||
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/imageviewer/ImageViewer.mimetypes.xml"), errorMessage))
|
||||
return false;
|
||||
|
||||
d_ptr->factory = new ImageViewerFactory(this);
|
||||
d->factory = new ImageViewerFactory(this);
|
||||
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
|
||||
aggregate->add(d_ptr->factory);
|
||||
aggregate->add(d->factory);
|
||||
|
||||
addAutoReleasedObject(d_ptr->factory);
|
||||
addAutoReleasedObject(d->factory);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImageViewerPlugin::extensionsInitialized()
|
||||
{
|
||||
d_ptr->factory->extensionsInitialized();
|
||||
d->factory->extensionsInitialized();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <QtCore/QtPlugin>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
namespace ImageViewer {
|
||||
|
||||
@@ -56,7 +55,7 @@ public:
|
||||
void extensionsInitialized();
|
||||
|
||||
private:
|
||||
QScopedPointer<struct ImageViewerPluginPrivate> d_ptr;
|
||||
struct ImageViewerPluginPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -130,6 +130,7 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent)
|
||||
|
||||
ApplicationLauncher::~ApplicationLauncher()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void ApplicationLauncher::setWorkingDirectory(const QString &dir)
|
||||
|
||||
@@ -91,7 +91,7 @@ private slots:
|
||||
void bringToForeground();
|
||||
|
||||
private:
|
||||
QScopedPointer<ApplicationLauncherPrivate> d;
|
||||
ApplicationLauncherPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -156,8 +156,10 @@ BuildManager::BuildManager(ProjectExplorerPlugin *parent)
|
||||
|
||||
void BuildManager::extensionsInitialized()
|
||||
{
|
||||
d->m_taskHub->addCategory(Constants::TASK_CATEGORY_COMPILE, tr("Compile", "Category for compiler isses listened under 'Build Issues'"));
|
||||
d->m_taskHub->addCategory(Constants::TASK_CATEGORY_BUILDSYSTEM, tr("Build System", "Category for build system isses listened under 'Build Issues'"));
|
||||
d->m_taskHub->addCategory(Constants::TASK_CATEGORY_COMPILE,
|
||||
tr("Compile", "Category for compiler isses listened under 'Build Issues'"));
|
||||
d->m_taskHub->addCategory(Constants::TASK_CATEGORY_BUILDSYSTEM,
|
||||
tr("Build System", "Category for build system isses listened under 'Build Issues'"));
|
||||
}
|
||||
|
||||
BuildManager::~BuildManager()
|
||||
@@ -170,6 +172,8 @@ BuildManager::~BuildManager()
|
||||
|
||||
pm->removeObject(d->m_outputWindow);
|
||||
delete d->m_outputWindow;
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
void BuildManager::aboutToRemoveProject(ProjectExplorer::Project *p)
|
||||
|
||||
@@ -49,6 +49,7 @@ struct BuildManagerPrivate;
|
||||
class PROJECTEXPLORER_EXPORT BuildManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BuildManager(ProjectExplorerPlugin *parent);
|
||||
virtual ~BuildManager();
|
||||
@@ -105,7 +106,7 @@ private:
|
||||
void decrementActiveBuildSteps(Project *pro);
|
||||
void disconnectOutput(BuildStep *bs);
|
||||
|
||||
QScopedPointer<BuildManagerPrivate> d;
|
||||
BuildManagerPrivate *d;
|
||||
};
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ EnvironmentWidget::~EnvironmentWidget()
|
||||
{
|
||||
delete d->m_model;
|
||||
d->m_model = 0;
|
||||
delete d;
|
||||
}
|
||||
|
||||
void EnvironmentWidget::focusIndex(const QModelIndex &index)
|
||||
|
||||
@@ -50,6 +50,7 @@ class EnvironmentWidgetPrivate;
|
||||
class PROJECTEXPLORER_EXPORT EnvironmentWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EnvironmentWidget(QWidget *parent, QWidget *additionalDetailsWidget = 0);
|
||||
virtual ~EnvironmentWidget();
|
||||
@@ -77,7 +78,7 @@ private slots:
|
||||
void linkActivated(const QString &link);
|
||||
|
||||
private:
|
||||
QScopedPointer<EnvironmentWidgetPrivate> d;
|
||||
EnvironmentWidgetPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -106,12 +106,12 @@ Project::~Project()
|
||||
{
|
||||
qDeleteAll(d->m_targets);
|
||||
delete d->m_editorConfiguration;
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool Project::hasActiveBuildSettings() const
|
||||
{
|
||||
return activeTarget() &&
|
||||
activeTarget()->buildConfigurationFactory();
|
||||
return activeTarget() && activeTarget()->buildConfigurationFactory();
|
||||
}
|
||||
|
||||
QString Project::makeUnique(const QString &preferredName, const QStringList &usedNames)
|
||||
|
||||
@@ -147,7 +147,7 @@ private slots:
|
||||
void changeBuildConfigurationEnabled();
|
||||
|
||||
private:
|
||||
QScopedPointer<ProjectPrivate> d;
|
||||
ProjectPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -110,6 +110,7 @@ Target::~Target()
|
||||
{
|
||||
qDeleteAll(d->m_buildConfigurations);
|
||||
qDeleteAll(d->m_runConfigurations);
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Target::changeEnvironment()
|
||||
|
||||
@@ -63,7 +63,6 @@ public:
|
||||
virtual ~Target();
|
||||
|
||||
virtual BuildConfigWidget *createConfigWidget() = 0;
|
||||
|
||||
virtual Project *project() const;
|
||||
|
||||
// Build configuration
|
||||
@@ -158,7 +157,7 @@ private slots:
|
||||
void changeBuildConfigurationEnabled();
|
||||
|
||||
private:
|
||||
QScopedPointer<TargetPrivate> d;
|
||||
TargetPrivate *d;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT ITargetFactory :
|
||||
|
||||
@@ -58,6 +58,7 @@ class CORESHARED_EXPORT ItemLibraryEntry
|
||||
//friend class QmlDesigner::Internal::MetaInfoParser;
|
||||
friend CORESHARED_EXPORT QDataStream& QmlDesigner::operator<<(QDataStream& stream, const ItemLibraryEntry &itemLibraryEntry);
|
||||
friend CORESHARED_EXPORT QDataStream& QmlDesigner::operator>>(QDataStream& stream, ItemLibraryEntry &itemLibraryEntry);
|
||||
|
||||
public:
|
||||
ItemLibraryEntry();
|
||||
~ItemLibraryEntry();
|
||||
@@ -118,7 +119,7 @@ signals:
|
||||
private:
|
||||
ItemLibraryInfo(QObject *parent = 0);
|
||||
void setBaseInfo(ItemLibraryInfo *baseInfo);
|
||||
QScopedPointer<Internal::ItemLibraryInfoPrivate> d;
|
||||
Internal::ItemLibraryInfoPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -263,6 +263,7 @@ ItemLibraryInfo::ItemLibraryInfo(QObject *parent) :
|
||||
|
||||
ItemLibraryInfo::~ItemLibraryInfo()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QList<ItemLibraryEntry> ItemLibraryInfo::entriesForType(const QString &typeName, int majorVersion, int minorVersion) const
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <qt4projectmanager/qt4projectmanager_global.h>
|
||||
|
||||
#include <QtCore/QFutureInterface>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -55,7 +54,8 @@ class Qt4SymbianTarget;
|
||||
|
||||
class S60DeviceRunConfigurationFactory;
|
||||
|
||||
class QT4PROJECTMANAGER_EXPORT S60DeviceRunConfiguration : public ProjectExplorer::RunConfiguration {
|
||||
class QT4PROJECTMANAGER_EXPORT S60DeviceRunConfiguration : public ProjectExplorer::RunConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class S60DeviceRunConfigurationFactory;
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ enum PageId {
|
||||
class MaemoDeviceConfigWizardStartPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MaemoDeviceConfigWizardStartPage(QWidget *parent = 0)
|
||||
: QWizardPage(parent), m_ui(new Ui::MaemoDeviceConfigWizardStartPage)
|
||||
@@ -549,7 +550,10 @@ MaemoDeviceConfigWizard::MaemoDeviceConfigWizard(QWidget *parent)
|
||||
d->finalPage.setCommitPage(true);
|
||||
}
|
||||
|
||||
MaemoDeviceConfigWizard::~MaemoDeviceConfigWizard() {}
|
||||
MaemoDeviceConfigWizard::~MaemoDeviceConfigWizard()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
LinuxDeviceConfiguration::Ptr MaemoDeviceConfigWizard::deviceConfiguration()
|
||||
{
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
|
||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
|
||||
struct MaemoDeviceConfigWizardPrivate;
|
||||
|
||||
class MaemoDeviceConfigWizard : public RemoteLinux::ILinuxDeviceConfigurationWizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MaemoDeviceConfigWizard(QWidget *parent = 0);
|
||||
~MaemoDeviceConfigWizard();
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
virtual int nextId() const;
|
||||
|
||||
private:
|
||||
const QScopedPointer<MaemoDeviceConfigWizardPrivate> d;
|
||||
MaemoDeviceConfigWizardPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -36,10 +36,6 @@
|
||||
#include <texteditor/texteditor_global.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QFocusEvent)
|
||||
|
||||
namespace TextEditor {
|
||||
|
||||
class SnippetEditorWidget;
|
||||
|
||||
@@ -158,10 +158,9 @@ VCSBaseClient::VCSBaseClient(VCSBaseClientSettings *settings) :
|
||||
|
||||
VCSBaseClient::~VCSBaseClient()
|
||||
{
|
||||
if (d->m_jobManager) {
|
||||
delete d->m_jobManager;
|
||||
d->m_jobManager = 0;
|
||||
}
|
||||
delete d->m_jobManager;
|
||||
d->m_jobManager = 0;
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool VCSBaseClient::synchronousCreateRepository(const QString &workingDirectory,
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFileInfo;
|
||||
@@ -59,6 +58,7 @@ class VCSBaseEditorParameterWidget;
|
||||
class VCSBASE_EXPORT VCSBaseClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct VCSBASE_EXPORT StatusItem
|
||||
{
|
||||
@@ -180,7 +180,7 @@ protected:
|
||||
|
||||
private:
|
||||
friend class VCSBaseClientPrivate;
|
||||
QScopedPointer<VCSBaseClientPrivate> d;
|
||||
VCSBaseClientPrivate *d;
|
||||
|
||||
Q_PRIVATE_SLOT(d, void statusParser(QByteArray))
|
||||
Q_PRIVATE_SLOT(d, void annotateRevision(QString, QString, int))
|
||||
|
||||
@@ -122,6 +122,7 @@ VCSBaseEditorParameterWidget::VCSBaseEditorParameterWidget(QWidget *parent) :
|
||||
|
||||
VCSBaseEditorParameterWidget::~VCSBaseEditorParameterWidget()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QStringList VCSBaseEditorParameterWidget::baseArguments() const
|
||||
|
||||
@@ -51,7 +51,11 @@ class VCSBaseEditorParameterWidgetPrivate;
|
||||
class VCSBASE_EXPORT VCSBaseEditorParameterWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit VCSBaseEditorParameterWidget(QWidget *parent = 0);
|
||||
~VCSBaseEditorParameterWidget();
|
||||
|
||||
struct VCSBASE_EXPORT ComboBoxItem
|
||||
{
|
||||
ComboBoxItem();
|
||||
@@ -60,9 +64,6 @@ public:
|
||||
QVariant value;
|
||||
};
|
||||
|
||||
explicit VCSBaseEditorParameterWidget(QWidget *parent = 0);
|
||||
~VCSBaseEditorParameterWidget();
|
||||
|
||||
QStringList baseArguments() const;
|
||||
void setBaseArguments(const QStringList &);
|
||||
|
||||
@@ -102,7 +103,7 @@ protected:
|
||||
|
||||
private:
|
||||
friend class VCSBaseEditorParameterWidgetPrivate;
|
||||
QScopedPointer<VCSBaseEditorParameterWidgetPrivate> d;
|
||||
VCSBaseEditorParameterWidgetPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace VCSBase
|
||||
|
||||
@@ -202,6 +202,7 @@ VCSJobRunner::VCSJobRunner() : d(new VCSJobRunnerPrivate)
|
||||
VCSJobRunner::~VCSJobRunner()
|
||||
{
|
||||
stop();
|
||||
delete d;
|
||||
}
|
||||
|
||||
void VCSJobRunner::stop()
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -54,6 +53,7 @@ class VCSJobRunnerPrivate;
|
||||
class VCSBASE_EXPORT VCSJob : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum DataEmitMode {
|
||||
NoDataEmitMode,
|
||||
@@ -61,11 +61,9 @@ public:
|
||||
EditorDataEmitMode
|
||||
};
|
||||
|
||||
VCSJob(const QString &workingDir,
|
||||
const QStringList &args,
|
||||
VCSJob(const QString &workingDir, const QStringList &args,
|
||||
DataEmitMode emitMode = NoDataEmitMode);
|
||||
VCSJob(const QString &workingDir,
|
||||
const QStringList &args,
|
||||
VCSJob(const QString &workingDir, const QStringList &args,
|
||||
VCSBase::VCSBaseEditorWidget *editor);
|
||||
|
||||
DataEmitMode dataEmitMode() const;
|
||||
@@ -97,6 +95,7 @@ private:
|
||||
class VCSBASE_EXPORT VCSJobRunner : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
VCSJobRunner();
|
||||
~VCSJobRunner();
|
||||
@@ -127,7 +126,7 @@ private:
|
||||
void task(const QSharedPointer<VCSJob> &job);
|
||||
void stop();
|
||||
|
||||
QScopedPointer<VCSJobRunnerPrivate> d;
|
||||
VCSJobRunnerPrivate *d;
|
||||
};
|
||||
|
||||
} //namespace VCSBase
|
||||
|
||||
Reference in New Issue
Block a user