Merge pull request #202 from Gormogon/master

Align Pointers
This commit is contained in:
Teo Mrnjavac 2015-02-26 10:58:17 +01:00
commit 81208e4217
25 changed files with 37 additions and 37 deletions

View File

@ -37,7 +37,7 @@
#include <QFileInfo> #include <QFileInfo>
CalamaresApplication::CalamaresApplication( int& argc, char *argv[] ) CalamaresApplication::CalamaresApplication( int& argc, char* argv[] )
: QApplication( argc, argv ) : QApplication( argc, argv )
, m_mainwindow( 0 ) , m_mainwindow( 0 )
{ {
@ -380,6 +380,6 @@ CalamaresApplication::onPluginsReady()
void void
CalamaresApplication::initJobQueue() CalamaresApplication::initJobQueue()
{ {
Calamares::JobQueue *jobQueue = new Calamares::JobQueue( this ); Calamares::JobQueue* jobQueue = new Calamares::JobQueue( this );
Calamares::Branding::instance()->setGlobals( jobQueue->globalStorage() ); Calamares::Branding::instance()->setGlobals( jobQueue->globalStorage() );
} }

View File

@ -36,7 +36,7 @@ class CalamaresApplication : public QApplication
{ {
Q_OBJECT Q_OBJECT
public: public:
CalamaresApplication( int& argc, char *argv[] ); CalamaresApplication( int& argc, char* argv[] );
virtual ~CalamaresApplication(); virtual ~CalamaresApplication();
void init(); void init();

View File

@ -28,7 +28,7 @@
#include <QDir> #include <QDir>
int int
main( int argc, char *argv[] ) main( int argc, char* argv[] )
{ {
CalamaresApplication a( argc, argv ); CalamaresApplication a( argc, argv );

View File

@ -88,7 +88,7 @@ ProgressTreeModel::data( const QModelIndex& index, int role ) const
if ( !index.isValid() ) if ( !index.isValid() )
return QVariant(); return QVariant();
ProgressTreeItem *item = static_cast< ProgressTreeItem* >( index.internalPointer() ); ProgressTreeItem* item = static_cast< ProgressTreeItem* >( index.internalPointer() );
return item->data( role ); return item->data( role );
} }

View File

@ -39,7 +39,7 @@ public:
// Reimplemented from QAbstractItemModel // Reimplemented from QAbstractItemModel
Qt::ItemFlags flags( const QModelIndex& index ) const override; Qt::ItemFlags flags( const QModelIndex& index ) const override;
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override; QModelIndex index( int row, int column, const QModelIndex& parent = QModelIndex() ) const override;
QModelIndex parent( const QModelIndex& index ) const override; QModelIndex parent( const QModelIndex& index ) const override;
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override; QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override; QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;

View File

@ -218,7 +218,7 @@ Helper::createCleanNamespace()
QString QString
Helper::handleLastError() Helper::handleLastError()
{ {
PyObject *type = nullptr, *val = nullptr, *tb = nullptr; PyObject* type = nullptr, *val = nullptr, *tb = nullptr;
PyErr_Fetch( &type, &val, &tb ); PyErr_Fetch( &type, &val, &tb );
QString typeMsg; QString typeMsg;

View File

@ -186,7 +186,7 @@ installTranslator( const QString& localeName, QObject* parent )
void void
setQmlModulesDir( const QDir &dir ) setQmlModulesDir( const QDir& dir )
{ {
s_qmlModulesDir = dir; s_qmlModulesDir = dir;
} }

View File

@ -46,7 +46,7 @@ namespace Logger
{ {
static void static void
log( const char *msg, unsigned int debugLevel, bool toDisk = true ) log( const char* msg, unsigned int debugLevel, bool toDisk = true )
{ {
if ( s_threshold < 0 ) if ( s_threshold < 0 )
{ {

View File

@ -56,7 +56,7 @@ public:
static Branding* instance(); static Branding* instance();
explicit Branding( const QString& brandingFilePath, explicit Branding( const QString& brandingFilePath,
QObject *parent = nullptr ); QObject* parent = nullptr );
QString descriptorPath() const; QString descriptorPath() const;
QString componentName() const; QString componentName() const;

View File

@ -35,7 +35,7 @@ class UIDLLEXPORT Settings : public QObject
public: public:
explicit Settings( const QString& settingsFilePath, explicit Settings( const QString& settingsFilePath,
bool debugMode, bool debugMode,
QObject *parent = nullptr ); QObject* parent = nullptr );
static Settings* instance(); static Settings* instance();
//TODO: load from JSON then emit ready //TODO: load from JSON then emit ready

View File

@ -35,7 +35,7 @@ public:
QList< job_ptr > jobs() const override; QList< job_ptr > jobs() const override;
protected: protected:
void initFrom( const YAML::Node &node ) override; void initFrom( const YAML::Node& node ) override;
private: private:
friend class Module; friend class Module;

View File

@ -35,7 +35,7 @@ public:
QList< job_ptr > jobs() const override; QList< job_ptr > jobs() const override;
protected: protected:
void initFrom( const YAML::Node &node ) override; void initFrom( const YAML::Node& node ) override;
private: private:
friend class Module; friend class Module;

View File

@ -38,14 +38,14 @@ public:
QList< job_ptr > jobs() const override; QList< job_ptr > jobs() const override;
protected: protected:
void initFrom( const YAML::Node &node ) override; void initFrom( const YAML::Node& node ) override;
private: private:
friend class Module; //so only the superclass can instantiate friend class Module; //so only the superclass can instantiate
explicit ViewModule(); explicit ViewModule();
virtual ~ViewModule(); virtual ~ViewModule();
QPluginLoader *m_loader; QPluginLoader* m_loader;
ViewStep* m_viewStep = nullptr; ViewStep* m_viewStep = nullptr;
}; };

View File

@ -30,7 +30,7 @@ class UIDLLEXPORT AbstractPage : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AbstractPage(QWidget *parent = nullptr); explicit AbstractPage(QWidget* parent = nullptr);
virtual ~AbstractPage() {} virtual ~AbstractPage() {}

View File

@ -31,7 +31,7 @@ class UIDLLEXPORT ViewStep : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ViewStep( QObject *parent = nullptr ); explicit ViewStep( QObject* parent = nullptr );
virtual ~ViewStep(); virtual ~ViewStep();
virtual QString prettyName() const = 0; virtual QString prettyName() const = 0;

View File

@ -26,7 +26,7 @@
#include "QtWaitingSpinner.h" #include "QtWaitingSpinner.h"
QtWaitingSpinner::QtWaitingSpinner(int linesNumber, int length, int width, int radius, QWidget *parent) : QWidget(parent), QtWaitingSpinner::QtWaitingSpinner(int linesNumber, int length, int width, int radius, QWidget* parent) : QWidget(parent),
myLinesNumber(linesNumber), myLinesNumber(linesNumber),
myLength(length + width), myLength(length + width),
myWidth(width), myWidth(width),
@ -45,7 +45,7 @@ QtWaitingSpinner::QtWaitingSpinner(int linesNumber, int length, int width, int r
this->hide(); this->hide();
} }
void QtWaitingSpinner::paintEvent(QPaintEvent */*ev*/) { void QtWaitingSpinner::paintEvent(QPaintEvent* /*ev*/) {
QPainter painter(this); QPainter painter(this);
painter.fillRect(this->rect(), Qt::transparent); painter.fillRect(this->rect(), Qt::transparent);
painter.setRenderHint(QPainter::Antialiasing, true); painter.setRenderHint(QPainter::Antialiasing, true);

View File

@ -33,7 +33,7 @@ class UIDLLEXPORT QtWaitingSpinner : public QWidget {
Q_OBJECT Q_OBJECT
public: public:
explicit QtWaitingSpinner(int linesNumber = 12, int length = 7, int width = 5, int radius = 10, QWidget *parent = 0); explicit QtWaitingSpinner(int linesNumber = 12, int length = 7, int width = 5, int radius = 10, QWidget* parent = 0);
public Q_SLOTS: public Q_SLOTS:
void start(); void start();
@ -56,7 +56,7 @@ private Q_SLOTS:
void updateTimer(); void updateTimer();
protected: protected:
void paintEvent(QPaintEvent *ev); void paintEvent(QPaintEvent* ev);
private: private:
static int countTimeout(int lines, qreal speed); static int countTimeout(int lines, qreal speed);
@ -75,7 +75,7 @@ private:
int myOpacity; int myOpacity;
private: private:
QTimer *myTimer; QTimer* myTimer;
int myCurrentCounter; int myCurrentCounter;
}; };

View File

@ -70,7 +70,7 @@ private:
void updateVariants( LayoutItem* currentItem, QString currentVariant = QString() ); void updateVariants( LayoutItem* currentItem, QString currentVariant = QString() );
Ui::Page_Keyboard *ui; Ui::Page_Keyboard* ui;
KeyBoardPreview* m_keyboardPreview; KeyBoardPreview* m_keyboardPreview;
int m_defaultIndex; int m_defaultIndex;
QMap< QString, QString > m_models; QMap< QString, QString > m_models;

View File

@ -22,7 +22,7 @@
#include "keyboardpreview.h" #include "keyboardpreview.h"
KeyBoardPreview::KeyBoardPreview(QWidget *parent) : KeyBoardPreview::KeyBoardPreview(QWidget* parent) :
QWidget(parent) QWidget(parent)
{ {
setMinimumSize(700, 191); setMinimumSize(700, 191);
@ -206,7 +206,7 @@ void KeyBoardPreview::resizeEvent(QResizeEvent *) {
void KeyBoardPreview::paintEvent(QPaintEvent * event) { void KeyBoardPreview::paintEvent(QPaintEvent* event) {
QPainter p(this); QPainter p(this);
p.setRenderHint(QPainter::Antialiasing); p.setRenderHint(QPainter::Antialiasing);

View File

@ -40,7 +40,7 @@ class KeyBoardPreview : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit KeyBoardPreview(QWidget *parent = 0); explicit KeyBoardPreview(QWidget* parent = 0);
void setLayout(QString layout); void setLayout(QString layout);
void setVariant(QString variant); void setVariant(QString variant);
@ -59,7 +59,7 @@ private:
QString layout, variant; QString layout, variant;
QFont lowerFont, upperFont; QFont lowerFont, upperFont;
KB *kb, kbList[3]; KB* kb, kbList[3];
QList<Code> codes; QList<Code> codes;
int space, usable_width, key_w; int space, usable_width, key_w;
@ -72,8 +72,8 @@ private:
QString fromUnicodeString(QString raw); QString fromUnicodeString(QString raw);
protected: protected:
void paintEvent(QPaintEvent * event); void paintEvent(QPaintEvent* event);
void resizeEvent(QResizeEvent * event); void resizeEvent(QResizeEvent* event);
}; };

View File

@ -22,7 +22,7 @@
#include "timezonewidget.h" #include "timezonewidget.h"
TimeZoneWidget::TimeZoneWidget(QWidget *parent) : TimeZoneWidget::TimeZoneWidget(QWidget* parent) :
QWidget(parent) QWidget(parent)
{ {
setMouseTracking(false); setMouseTracking(false);
@ -157,7 +157,7 @@ void TimeZoneWidget::paintEvent(QPaintEvent*) {
void TimeZoneWidget::mousePressEvent(QMouseEvent *event) { void TimeZoneWidget::mousePressEvent(QMouseEvent* event) {
if (event->button() != Qt::LeftButton) if (event->button() != Qt::LeftButton)
return; return;

View File

@ -48,7 +48,7 @@ class TimeZoneWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit TimeZoneWidget(QWidget *parent = 0); explicit TimeZoneWidget(QWidget* parent = 0);
LocaleGlobal::Location getCurrentLocation() { return currentLocation; } LocaleGlobal::Location getCurrentLocation() { return currentLocation; }
void setCurrentLocation(QString region, QString zone); void setCurrentLocation(QString region, QString zone);
@ -65,8 +65,8 @@ private:
QPoint getLocationPosition(double longitude, double latitude); QPoint getLocationPosition(double longitude, double latitude);
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent* event);
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent* event);
}; };
#endif // TIMEZONEWIDGET_H #endif // TIMEZONEWIDGET_H

View File

@ -31,7 +31,7 @@
PreparePage::PreparePage( QWidget* parent ) PreparePage::PreparePage( QWidget* parent )
: QWidget() : QWidget()
{ {
QBoxLayout *mainLayout = new QVBoxLayout; QBoxLayout* mainLayout = new QVBoxLayout;
setLayout( mainLayout ); setLayout( mainLayout );
QLabel* text = new QLabel( this ); QLabel* text = new QLabel( this );

View File

@ -135,7 +135,7 @@ UsersPage::onActivate()
void void
UsersPage::onFullNameTextEdited( const QString &textRef ) UsersPage::onFullNameTextEdited( const QString& textRef )
{ {
if ( textRef.isEmpty() ) if ( textRef.isEmpty() )
{ {

View File

@ -57,7 +57,7 @@ public:
void onActivate() override; void onActivate() override;
void onLeave() override; void onLeave() override;
void setConfigurationMap( const QVariantMap &configurationMap ) override; void setConfigurationMap( const QVariantMap& configurationMap ) override;
private: private:
UsersPage* m_widget; UsersPage* m_widget;