summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Trellis')
-rw-r--r--Swift/QtUI/Trellis/QtDNDTabBar.cpp4
-rw-r--r--Swift/QtUI/Trellis/QtDNDTabBar.h4
-rw-r--r--Swift/QtUI/Trellis/QtDynamicGridLayout.cpp22
-rw-r--r--Swift/QtUI/Trellis/QtDynamicGridLayout.h4
-rw-r--r--Swift/QtUI/Trellis/QtGridSelectionDialog.cpp4
-rw-r--r--Swift/QtUI/Trellis/QtGridSelectionDialog.h4
6 files changed, 21 insertions, 21 deletions
diff --git a/Swift/QtUI/Trellis/QtDNDTabBar.cpp b/Swift/QtUI/Trellis/QtDNDTabBar.cpp
index fac2233..9a6c436 100644
--- a/Swift/QtUI/Trellis/QtDNDTabBar.cpp
+++ b/Swift/QtUI/Trellis/QtDNDTabBar.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -118,7 +118,7 @@ bool QtDNDTabBar::event(QEvent* event) {
QMouseEvent* finishMoveEvent = new QMouseEvent (QEvent::MouseMove, mouseEvent->pos (), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
QTabBar::event(finishMoveEvent);
delete finishMoveEvent;
- finishMoveEvent = NULL;
+ finishMoveEvent = nullptr;
// start drag
QDrag* drag = new QDrag(this);
diff --git a/Swift/QtUI/Trellis/QtDNDTabBar.h b/Swift/QtUI/Trellis/QtDNDTabBar.h
index 3677b73..40eb66d 100644
--- a/Swift/QtUI/Trellis/QtDNDTabBar.h
+++ b/Swift/QtUI/Trellis/QtDNDTabBar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,7 +13,7 @@ namespace Swift {
class QtDNDTabBar : public QTabBar {
Q_OBJECT
public:
- explicit QtDNDTabBar(QWidget* parent = 0);
+ explicit QtDNDTabBar(QWidget* parent = nullptr);
virtual ~QtDNDTabBar();
int getDragIndex() const;
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
index 7de2791..cafecf9 100644
--- a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
+++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -23,7 +23,7 @@
namespace Swift {
-QtDynamicGridLayout::QtDynamicGridLayout(QWidget* parent, bool enableDND) : QWidget(parent), dndEnabled_(enableDND), movingTab_(NULL) {
+QtDynamicGridLayout::QtDynamicGridLayout(QWidget* parent, bool enableDND) : QWidget(parent), dndEnabled_(enableDND), movingTab_(nullptr) {
gridLayout_ = new QGridLayout(this);
setContentsMargins(0,0,0,0);
setDimensions(QSize(1,1));
@@ -44,7 +44,7 @@ int QtDynamicGridLayout::addTab(QtTabbable* tab, const QString& title) {
lastPos = QPoint(qMin(lastPos.x(), gridLayout_->columnCount() - 1), qMin(lastPos.y(), gridLayout_->rowCount() - 1));
QLayoutItem* item = gridLayout_->itemAtPosition(lastPos.y(), lastPos.x());
- QtTabWidget* tabWidget = dynamic_cast<QtTabWidget*>(item ? item->widget() : 0);
+ QtTabWidget* tabWidget = dynamic_cast<QtTabWidget*>(item ? item->widget() : nullptr);
if (tabWidget) {
tabWidget->addTab(tab, title);
}
@@ -66,7 +66,7 @@ int QtDynamicGridLayout::count() const {
}
QWidget* QtDynamicGridLayout::widget(int index) const {
- QWidget* widgetAtIndex = NULL;
+ QWidget* widgetAtIndex = nullptr;
for (int y = 0; y < gridLayout_->rowCount(); y++) {
for (int x = 0; x < gridLayout_->columnCount(); x++) {
QLayoutItem* layoutItem = gridLayout_->itemAtPosition(y, x);
@@ -171,13 +171,13 @@ bool QtDynamicGridLayout::eventFilter(QObject* object, QEvent* event) {
}
QWidget* QtDynamicGridLayout::currentWidget() const {
- QWidget* current = NULL;
+ QWidget* current = nullptr;
current = focusWidget();
while (current && !dynamic_cast<QtTabbable*>(current)) {
if (current->parentWidget()) {
current = current->parentWidget();
} else {
- current = NULL;
+ current = nullptr;
break;
}
}
@@ -218,14 +218,14 @@ QtTabWidget* QtDynamicGridLayout::indexToTabWidget(int index, int& tabIndex) {
if (index < 0) {
qWarning() << "Called QtDynamicGridLayout::setCurrentIndex with index out of bounds: index = " << index;
tabIndex = -1;
- return NULL;
+ return nullptr;
}
}
}
}
}
tabIndex = -1;
- return NULL;
+ return nullptr;
}
bool QtDynamicGridLayout::isDNDEnabled() const {
@@ -458,9 +458,9 @@ void QtDynamicGridLayout::updateTabPositions() {
void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newIndex) {
#if QT_VERSION >= 0x040500
- SWIFT_LOG_ASSERT(movingTab_ == NULL, error) << std::endl;
+ SWIFT_LOG_ASSERT(movingTab_ == nullptr, error) << std::endl;
movingTab_ = qobject_cast<QtTabbable*>(tabWidget->widget(oldIndex));
- SWIFT_LOG_ASSERT(movingTab_ != NULL, error) << std::endl;
+ SWIFT_LOG_ASSERT(movingTab_ != nullptr, error) << std::endl;
if (movingTab_) {
// Install event filter that filters out events issued during the internal movement of the
@@ -472,7 +472,7 @@ void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newI
qApp->removeEventFilter(this);
SWIFT_LOG_ASSERT(movingTab_ == tabWidget->widget(newIndex), error) << std::endl;
}
- movingTab_ = NULL;
+ movingTab_ = nullptr;
tabWidget->widget(newIndex)->setFocus();
#else
#warning Qt 4.5 or later is needed. Trying anyway, some things will be disabled.
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.h b/Swift/QtUI/Trellis/QtDynamicGridLayout.h
index 2a6029c..dad0f7e 100644
--- a/Swift/QtUI/Trellis/QtDynamicGridLayout.h
+++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -20,7 +20,7 @@ namespace Swift {
class QtDynamicGridLayout : public QWidget {
Q_OBJECT
public:
- explicit QtDynamicGridLayout(QWidget* parent = 0, bool enableDND = false);
+ explicit QtDynamicGridLayout(QWidget* parent = nullptr, bool enableDND = false);
virtual ~QtDynamicGridLayout();
QSize getDimension() const;
diff --git a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
index c7b7edb..8a69a3d 100644
--- a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
+++ b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -103,7 +103,7 @@ void QtGridSelectionDialog::paintEvent(QPaintEvent*) {
int yPos = verticalMargin + (y * (frameSize.height() + padding));
option.menuRect.moveTo(QPoint(xPos, yPos));
option.rect = option.menuRect;
- style()->drawControl(QStyle::CE_MenuItem, &option, &painter, 0);
+ style()->drawControl(QStyle::CE_MenuItem, &option, &painter, nullptr);
}
}
diff --git a/Swift/QtUI/Trellis/QtGridSelectionDialog.h b/Swift/QtUI/Trellis/QtGridSelectionDialog.h
index c763e68..56a575f 100644
--- a/Swift/QtUI/Trellis/QtGridSelectionDialog.h
+++ b/Swift/QtUI/Trellis/QtGridSelectionDialog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -18,7 +18,7 @@ namespace Swift {
Q_PROPERTY(QSize minGridSize READ getMinGridSize WRITE setMinGridSize NOTIFY minGridSizeChanged)
Q_PROPERTY(QSize maxGridSize READ getMaxGridSize WRITE setMaxGridSize NOTIFY maxGridSizeChanged)
public:
- explicit QtGridSelectionDialog(QWidget* parent = 0);
+ explicit QtGridSelectionDialog(QWidget* parent = nullptr);
virtual QSize sizeHint() const;