Commit 82bbac7f authored by hjk's avatar hjk Committed by hjk

Remove unneeded defines.

Mostly Q_DISABLE_COPY that were covered by the un-copy-ability of the
respective base classes. Includes a few "stylistic" whitespace changes.

Change-Id: I31ca0e7bada5ed0f34776976efe22ddc444a5bf2
Reviewed-on: http://codereview.qt.nokia.com/1609Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 9ec07bf2
......@@ -54,9 +54,7 @@ signals:
void parentDummyChanged();
private:
Q_DISABLE_COPY(DummyContextObject)
QWeakPointer<QObject> m_dummyParent;
};
} // namespace QmlDesigner
......
......@@ -47,8 +47,9 @@ QT_END_NAMESPACE
namespace ExtensionSystem {
class PluginCollection;
namespace Internal {
class PluginManagerPrivate;
class PluginManagerPrivate;
}
class IPlugin;
......@@ -56,7 +57,6 @@ class PluginSpec;
class EXTENSIONSYSTEM_EXPORT PluginManager : public QObject
{
Q_DISABLE_COPY(PluginManager)
Q_OBJECT
public:
......
......@@ -101,8 +101,6 @@ signals:
void zeroColorChanged();
private:
Q_DISABLE_COPY(EasingGraph)
QColor m_color;
QColor m_zeroColor; // the color for the "zero" and "one" lines
qreal m_duration;
......
......@@ -42,7 +42,7 @@ class QDeclarativeDebugConnectionPrivate;
class QDeclarativeDebugConnection : public QIODevice
{
Q_OBJECT
Q_DISABLE_COPY(QDeclarativeDebugConnection)
public:
QDeclarativeDebugConnection(QObject * = 0);
~QDeclarativeDebugConnection();
......@@ -77,7 +77,6 @@ class QDeclarativeDebugClient : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeDebugClient)
Q_DISABLE_COPY(QDeclarativeDebugClient)
public:
enum Status { NotConnected, Unavailable, Enabled };
......
......@@ -44,7 +44,6 @@ struct BaseValidatingLineEditPrivate;
class QTCREATOR_UTILS_EXPORT BaseValidatingLineEdit : public QLineEdit
{
Q_OBJECT
Q_DISABLE_COPY(BaseValidatingLineEdit)
Q_PROPERTY(QString initialText READ initialText WRITE setInitialText DESIGNABLE true)
Q_PROPERTY(QColor errorColor READ errorColor WRITE setErrorColor DESIGNABLE true)
......
......@@ -43,10 +43,9 @@ struct ClassNameValidatingLineEditPrivate;
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
: public Utils::BaseValidatingLineEdit
{
Q_DISABLE_COPY(ClassNameValidatingLineEdit)
Q_OBJECT
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
Q_PROPERTY(bool lowerCaseFileName READ lowerCaseFileName WRITE setLowerCaseFileName)
Q_OBJECT
public:
explicit ClassNameValidatingLineEdit(QWidget *parent = 0);
......
......@@ -67,7 +67,6 @@ private:
class QTCREATOR_UTILS_EXPORT FancyLineEdit : public QLineEdit
{
Q_DISABLE_COPY(FancyLineEdit)
Q_OBJECT
Q_ENUMS(Side)
......
......@@ -40,8 +40,8 @@ namespace Utils {
class QTCREATOR_UTILS_EXPORT FileNameValidatingLineEdit : public BaseValidatingLineEdit
{
Q_OBJECT
Q_DISABLE_COPY(FileNameValidatingLineEdit)
Q_PROPERTY(bool allowDirectories READ allowDirectories WRITE setAllowDirectories)
public:
explicit FileNameValidatingLineEdit(QWidget *parent = 0);
......
......@@ -44,8 +44,8 @@ class FileSystemWatcherPrivate;
// Documentation inside.
class QTCREATOR_UTILS_EXPORT FileSystemWatcher : public QObject
{
Q_DISABLE_COPY(FileSystemWatcher)
Q_OBJECT
public:
enum WatchMode
{
......
......@@ -120,7 +120,6 @@ public:
QFile *file() { return m_file; }
private:
Q_DISABLE_COPY(FileSaver)
bool m_isSafe;
};
......@@ -136,10 +135,9 @@ public:
void setAutoRemove(bool on) { m_autoRemove = on; }
private:
Q_DISABLE_COPY(TempFileSaver)
bool m_autoRemove;
};
}
} // namespace Utils
#endif // FILEUTILS_H
......@@ -40,9 +40,9 @@ namespace Utils {
class FileWizardPage;
class QTCREATOR_UTILS_EXPORT FileWizardDialog : public Wizard {
class QTCREATOR_UTILS_EXPORT FileWizardDialog : public Wizard
{
Q_OBJECT
Q_DISABLE_COPY(FileWizardDialog)
public:
explicit FileWizardDialog(QWidget *parent = 0);
......
......@@ -44,9 +44,9 @@ struct FileWizardPagePrivate;
class QTCREATOR_UTILS_EXPORT FileWizardPage : public QWizardPage
{
Q_OBJECT
Q_DISABLE_COPY(FileWizardPage)
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
Q_PROPERTY(QString fileName READ fileName WRITE setFileName DESIGNABLE true)
public:
explicit FileWizardPage(QWidget *parent = 0);
virtual ~FileWizardPage();
......
......@@ -42,7 +42,6 @@ class IpAddressLineEditPrivate;
class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public Utils::BaseValidatingLineEdit
{
Q_DISABLE_COPY(IpAddressLineEdit)
Q_OBJECT
public:
......
......@@ -46,10 +46,6 @@ LineColumnLabel::LineColumnLabel(QWidget *parent)
{
}
LineColumnLabel::~LineColumnLabel()
{
}
void LineColumnLabel::setText(const QString &text, const QString &maxText)
{
QLabel::setText(text);
......
......@@ -40,13 +40,11 @@ namespace Utils {
class QTCREATOR_UTILS_EXPORT LineColumnLabel : public QLabel
{
Q_DISABLE_COPY(LineColumnLabel)
Q_OBJECT
Q_PROPERTY(QString maxText READ maxText WRITE setMaxText DESIGNABLE true)
public:
explicit LineColumnLabel(QWidget *parent = 0);
virtual ~LineColumnLabel();
void setText(const QString &text, const QString &maxText);
QSize sizeHint() const;
......
......@@ -47,7 +47,6 @@ struct NewClassWidgetPrivate;
class QTCREATOR_UTILS_EXPORT NewClassWidget : public QWidget
{
Q_DISABLE_COPY(NewClassWidget)
Q_OBJECT
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
Q_PROPERTY(bool baseClassInputVisible READ isBaseClassInputVisible WRITE setBaseClassInputVisible DESIGNABLE true)
......@@ -73,6 +72,7 @@ class QTCREATOR_UTILS_EXPORT NewClassWidget : public QWidget
// Utility "USER" property for wizards containing file names.
Q_PROPERTY(QStringList files READ files DESIGNABLE false USER true)
Q_ENUMS(ClassType)
public:
enum ClassType { NoClassType, ClassInheritsQObject, ClassInheritsQWidget,
ClassInheritsQDeclarativeItem,
......
......@@ -50,7 +50,6 @@ class PathChooserPrivate;
class QTCREATOR_UTILS_EXPORT PathChooser : public QWidget
{
Q_DISABLE_COPY(PathChooser)
Q_OBJECT
Q_ENUMS(Kind)
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
......
......@@ -48,7 +48,6 @@ struct PathListEditorPrivate;
class QTCREATOR_UTILS_EXPORT PathListEditor : public QWidget
{
Q_DISABLE_COPY(PathListEditor)
Q_OBJECT
Q_PROPERTY(QStringList pathList READ pathList WRITE setPathList DESIGNABLE true)
Q_PROPERTY(QString fileDialogTitle READ fileDialogTitle WRITE setFileDialogTitle DESIGNABLE true)
......
......@@ -44,7 +44,6 @@ struct ProjectIntroPagePrivate;
class QTCREATOR_UTILS_EXPORT ProjectIntroPage : public QWizardPage
{
Q_OBJECT
Q_DISABLE_COPY(ProjectIntroPage)
Q_PROPERTY(QString description READ description WRITE setPath DESIGNABLE true)
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
Q_PROPERTY(QString projectName READ projectName WRITE setProjectName DESIGNABLE true)
......
......@@ -40,7 +40,6 @@ namespace Utils {
class QTCREATOR_UTILS_EXPORT ProjectNameValidatingLineEdit : public BaseValidatingLineEdit
{
Q_OBJECT
Q_DISABLE_COPY(ProjectNameValidatingLineEdit)
public:
explicit ProjectNameValidatingLineEdit(QWidget *parent = 0);
......
......@@ -74,7 +74,6 @@ protected:
private:
class QtColorButtonPrivate *d_ptr;
friend class QtColorButtonPrivate;
Q_DISABLE_COPY(QtColorButton)
};
} // namespace Utils
......
......@@ -53,13 +53,11 @@ public:
void setBackup(bool backup) { m_backup = backup; }
private:
Q_DISABLE_COPY(SaveFile)
QString m_finalFileName;
bool m_finalized;
bool m_backup;
};
}
} // namespace Utils
#endif // SAVEFILE_H
......@@ -73,7 +73,7 @@ QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const
class QTCREATOR_UTILS_EXPORT SshConnection : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(SshConnection)
public:
enum State { Unconnected, Connecting, Connected };
typedef QSharedPointer<SshConnection> Ptr;
......
......@@ -53,7 +53,6 @@ class SshSendFacility;
class QTCREATOR_UTILS_EXPORT SshRemoteProcess : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(SshRemoteProcess)
friend class Internal::SshChannelManager;
friend class Internal::SshRemoteProcessPrivate;
......
......@@ -44,7 +44,7 @@ class SshRemoteProcessRunnerPrivate;
class QTCREATOR_UTILS_EXPORT SshRemoteProcessRunner : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(SshRemoteProcessRunner)
public:
typedef QSharedPointer<SshRemoteProcessRunner> Ptr;
......
......@@ -55,7 +55,6 @@ struct SubmitEditorWidgetPrivate;
class QTCREATOR_UTILS_EXPORT SubmitEditorWidget : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(SubmitEditorWidget)
Q_PROPERTY(QString descriptionText READ descriptionText WRITE setDescriptionText DESIGNABLE true)
Q_PROPERTY(int fileNameColumn READ fileNameColumn WRITE setFileNameColumn DESIGNABLE false)
Q_PROPERTY(QAbstractItemView::SelectionMode fileListSelectionMode READ fileListSelectionMode WRITE setFileListSelectionMode DESIGNABLE true)
......
......@@ -70,8 +70,6 @@ private slots:
void _q_pageRemoved(int pageId);
private:
Q_DISABLE_COPY(Wizard)
Q_DECLARE_PRIVATE(Wizard)
class WizardPrivate *d_ptr;
......@@ -124,7 +122,6 @@ private:
friend class Wizard;
friend class WizardProgressItem;
Q_DISABLE_COPY(WizardProgress)
Q_DECLARE_PRIVATE(WizardProgress)
class WizardProgressPrivate *d_ptr;
......@@ -150,15 +147,12 @@ public:
bool titleWordWrap() const;
protected:
WizardProgressItem(WizardProgress *progress, const QString &title);
virtual ~WizardProgressItem();
private:
friend class WizardProgress;
Q_DISABLE_COPY(WizardProgressItem)
Q_DECLARE_PRIVATE(WizardProgressItem)
class WizardProgressItemPrivate *d_ptr;
......
......@@ -58,7 +58,6 @@ class NavigationWidgetFactory;
class Manager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(Manager)
public:
/*!
......
......@@ -53,7 +53,6 @@ namespace Internal {
class NavigationWidget : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(NavigationWidget)
public:
explicit NavigationWidget(QWidget *parent = 0);
......
......@@ -52,7 +52,6 @@ namespace Internal {
class NavigationWidgetFactory : public Core::INavigationWidgetFactory
{
Q_OBJECT
Q_DISABLE_COPY(NavigationWidgetFactory)
public:
//! destructor
......
......@@ -48,7 +48,6 @@ namespace Internal {
class Plugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
Q_DISABLE_COPY(Plugin)
public:
//! Constructor
......
......@@ -379,7 +379,6 @@ void BaseFileWizardParameters::setDisplayCategory(const QString &v)
class WizardEventLoop : public QEventLoop
{
Q_OBJECT
Q_DISABLE_COPY(WizardEventLoop)
WizardEventLoop(QObject *parent);
public:
......
......@@ -150,7 +150,6 @@ CORE_EXPORT QDebug operator<<(QDebug d, const BaseFileWizardParameters &);
class CORE_EXPORT BaseFileWizard : public IWizard
{
Q_DISABLE_COPY(BaseFileWizard)
Q_OBJECT
public:
......@@ -200,7 +199,6 @@ private:
class CORE_EXPORT StandardFileWizard : public BaseFileWizard
{
Q_DISABLE_COPY(StandardFileWizard)
Q_OBJECT
protected:
......
......@@ -47,6 +47,7 @@ namespace Core {
class CORE_EXPORT IOptionsPage : public QObject
{
Q_OBJECT
public:
IOptionsPage(QObject *parent = 0) : QObject(parent) {}
virtual ~IOptionsPage() {}
......
......@@ -51,7 +51,7 @@ struct EditorToolBarPrivate;
class CORE_EXPORT EditorToolBar : public Utils::StyledBar
{
Q_OBJECT
Q_DISABLE_COPY(EditorToolBar)
public:
explicit EditorToolBar(QWidget *parent = 0);
virtual ~EditorToolBar();
......
......@@ -52,7 +52,6 @@ struct FileIconProviderPrivate;
class CORE_EXPORT FileIconProvider : public QFileIconProvider
{
Q_DISABLE_COPY(FileIconProvider)
FileIconProvider();
public:
......
......@@ -51,7 +51,6 @@ struct HelpManagerPrivate;
class CORE_EXPORT HelpManager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(HelpManager)
public:
typedef QHash<QString, QStringList> Filters;
......
......@@ -37,11 +37,6 @@
#include <QtGui/QProxyStyle>
QT_BEGIN_NAMESPACE
class QLinearGradient;
class QBrush;
QT_END_NAMESPACE
class ManhattanStylePrivate;
class CORE_EXPORT ManhattanStyle : public QProxyStyle
......@@ -49,7 +44,7 @@ class CORE_EXPORT ManhattanStyle : public QProxyStyle
Q_OBJECT
public:
ManhattanStyle(const QString &);
explicit ManhattanStyle(const QString &baseStyleName);
~ManhattanStyle();
......@@ -77,12 +72,12 @@ public:
void unpolish(QWidget *widget);
void unpolish(QApplication *app);
protected Q_SLOTS:
protected slots:
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const;
private:
ManhattanStylePrivate *d;
Q_DISABLE_COPY(ManhattanStyle)
};
#endif // MANHATTANSTYLE_H
......@@ -124,8 +124,10 @@ namespace Internal {
\sa Core::Internal::BaseMimeTypeParser, Core::Internal::MimeTypeParser
*/
class FileMatchContext {
class FileMatchContext
{
Q_DISABLE_COPY(FileMatchContext)
public:
// Max data to be read from a file
enum { MaxData = 2048 };
......@@ -183,8 +185,8 @@ QByteArray FileMatchContext::data()
\sa Core::Internal::BaseMimeTypeParser, Core::Internal::MimeTypeParser
*/
class BinaryMatcher : public IMagicMatcher {
Q_DISABLE_COPY(BinaryMatcher)
class BinaryMatcher : public IMagicMatcher
{
public:
BinaryMatcher() {}
virtual bool matches(const QByteArray & /*data*/) const { return true; }
......@@ -203,8 +205,8 @@ public:
\sa Core::Internal::BaseMimeTypeParser, Core::Internal::MimeTypeParser
*/
class HeuristicTextMagicMatcher : public IMagicMatcher {
Q_DISABLE_COPY(HeuristicTextMagicMatcher)
class HeuristicTextMagicMatcher : public IMagicMatcher
{
public:
HeuristicTextMagicMatcher() {}
virtual bool matches(const QByteArray &data) const;
......@@ -915,8 +917,10 @@ namespace Internal {
\sa Core::Internal::MimeTypeParser
*/
class BaseMimeTypeParser {
class BaseMimeTypeParser
{
Q_DISABLE_COPY(BaseMimeTypeParser)
public:
BaseMimeTypeParser() {}
virtual ~BaseMimeTypeParser() {}
......@@ -1224,6 +1228,7 @@ MimeMapEntry::MimeMapEntry(const MimeType &t, int aLevel) :
class MimeDatabasePrivate
{
Q_DISABLE_COPY(MimeDatabasePrivate)
public:
MimeDatabasePrivate();
......
......@@ -60,8 +60,10 @@ namespace Internal {
class CORE_EXPORT IMagicMatcher
{
Q_DISABLE_COPY(IMagicMatcher)
protected:
IMagicMatcher() {}
public:
typedef QSharedPointer<IMagicMatcher> IMagicMatcherSharedPointer;
typedef QList<IMagicMatcherSharedPointer> IMagicMatcherList;
......
......@@ -39,10 +39,6 @@
#include <QtCore/QScopedPointer>
#include <QtCore/QString>
QT_BEGIN_NAMESPACE
class QFileInfo;
QT_END_NAMESPACE
namespace Utils {
class AbstractMacroExpander;
}
......@@ -53,7 +49,7 @@ class VariableManagerPrivate;
class CORE_EXPORT VariableManager : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(VariableManager)
public:
VariableManager();
~VariableManager();
......
......@@ -48,7 +48,7 @@ struct FileShareProtocolSettings;
class FileShareProtocol : public Protocol
{
Q_OBJECT
Q_DISABLE_COPY(FileShareProtocol)
public:
FileShareProtocol();
virtual ~FileShareProtocol();
......@@ -66,10 +66,12 @@ public:
const QString &username = QString(),
const QString &comment = QString(),
const QString &description = QString());
private:
const QSharedPointer<FileShareProtocolSettings> m_settings;
FileShareProtocolSettingsPage *m_settingsPage;
};
} // namespace CodePaster
#endif // FILESHAREPROTOCOL_H
......@@ -44,15 +44,17 @@ class QWidget;
QT_END_NAMESPACE
namespace Core {
class IOptionsPage;
class IOptionsPage;
}
namespace CodePaster {
class Protocol : public QObject
{
Q_OBJECT
public:
enum ContentType{
enum ContentType {
Text, C, JavaScript, Diff, Xml
};
......@@ -109,8 +111,10 @@ protected:
* delayed initialization and conveniences
* for HTTP-requests. */
class NetworkAccessManagerProxy {
class NetworkAccessManagerProxy
{
Q_DISABLE_COPY(NetworkAccessManagerProxy)
public:
NetworkAccessManagerProxy();
~NetworkAccessManagerProxy();
......@@ -127,8 +131,10 @@ private:
* initialization to a QNetworkAccessManager and conveniences
* for HTTP-requests. */
class NetworkProtocol : public Protocol {
class NetworkProtocol : public Protocol
{
Q_OBJECT
public:
virtual ~NetworkProtocol();
......
......@@ -45,8 +45,10 @@ namespace CodePaster {
struct Settings;
class SettingsWidget : public QWidget {
class SettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit SettingsWidget(const QStringList &protocols, QWidget *parent = 0);
......@@ -62,7 +64,7 @@ private:
class SettingsPage : public Core::IOptionsPage
{
Q_OBJECT
Q_DISABLE_COPY(SettingsPage)
public:
explicit SettingsPage(const QSharedPointer<Settings> &settings);
virtual ~SettingsPage();
......
......@@ -82,7 +82,7 @@ struct CppClassWizardParameters
class CppClassWizardDialog : public Utils::Wizard
{
Q_OBJECT
Q_DISABLE_COPY(CppClassWizardDialog)
public:
explicit CppClassWizardDialog(QWidget *parent = 0);
......@@ -97,6 +97,7 @@ private:
class CppClassWizard : public Core::BaseFileWizard
{
Q_OBJECT
public:
explicit CppClassWizard(const Core::BaseFileWizardParameters &parameters,
QObject *parent = 0);
......
......@@ -52,8 +52,7 @@ public:
SemanticInfo::LocalUseMap uses;
};
}
}
} // namespace Internal
} // namespace CppEditor
#endif // CPPLOCALSYMBOLS_H
......@@ -58,8 +58,6 @@ class CppQuickFixAssistInterface;
class CPPEDITOR_EXPORT CppQuickFixOperation: public TextEditor::QuickFixOperation
{
Q_DISABLE_COPY(CppQuickFixOperation)
public:
explicit CppQuickFixOperation(
const QSharedPointer<const Internal::CppQuickFixAssistInterface> &interface,
......