on xenial help sign in
Use nullptr instead of NULL.
ac10b98Jussi Pakkanen
include/paths.h.in+1−1
@@ -91,7 +91,7 @@ inline QString mockPluginsDir() {
91inline QStringList shellDataDirs() {
91inline QStringList shellDataDirs() {
92 QStringList dirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
92 QStringList dirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
93 if (!isRunningInstalled()) {
93 if (!isRunningInstalled()) {
94− if (getenv("UNITY_TEST_ENV")==NULL) {
94+ if (getenv("UNITY_TEST_ENV")==nullptr) {
95 dirs.prepend("@CMAKE_BINARY_DIR@/share");
95 dirs.prepend("@CMAKE_BINARY_DIR@/share");
96 }
96 }
97 }
97 }
plugins/AccountsService/AccountsServiceDBusAdaptor.cpp+1−1
@@ -24,7 +24,7 @@
24
24
25AccountsServiceDBusAdaptor::AccountsServiceDBusAdaptor(QObject* parent)
25AccountsServiceDBusAdaptor::AccountsServiceDBusAdaptor(QObject* parent)
26 : QObject(parent),
26 : QObject(parent),
27− m_accountsManager(NULL),
27+ m_accountsManager(nullptr),
28 m_users()
28 m_users()
29{
29{
30 QDBusConnection connection = QDBusConnection::SM_BUSNAME();
30 QDBusConnection connection = QDBusConnection::SM_BUSNAME();
plugins/HudClient/hudclient.cpp+12−12
@@ -82,7 +82,7 @@ HudClient::HudClient()
82 m_results = new DeeListModel();
82 m_results = new DeeListModel();
83 m_clientQuery = hud_client_query_new("");
83 m_clientQuery = hud_client_query_new("");
84 m_toolBarModel = new HudToolBarModel(m_clientQuery);
84 m_toolBarModel = new HudToolBarModel(m_clientQuery);
85− m_currentActionParam = NULL;
85+ m_currentActionParam = nullptr;
86 m_results->setModel(hud_client_query_get_results_model(m_clientQuery));
86 m_results->setModel(hud_client_query_get_results_model(m_clientQuery));
87
87
88 g_signal_connect(G_OBJECT(m_clientQuery), "voice-query-loading", G_CALLBACK(loadingCB), this);
88 g_signal_connect(G_OBJECT(m_clientQuery), "voice-query-loading", G_CALLBACK(loadingCB), this);
@@ -151,13 +151,13 @@ void HudClient::executeParametrizedAction(const QVariant &values)
151 updateParametrizedAction(values);
151 updateParametrizedAction(values);
152 hud_client_param_send_commit(m_currentActionParam);
152 hud_client_param_send_commit(m_currentActionParam);
153 g_object_unref(m_currentActionParam);
153 g_object_unref(m_currentActionParam);
154− m_currentActionParam = NULL;
154+ m_currentActionParam = nullptr;
155 Q_EMIT commandExecuted();
155 Q_EMIT commandExecuted();
156}
156}
157
157
158void HudClient::updateParametrizedAction(const QVariant &values)
158void HudClient::updateParametrizedAction(const QVariant &values)
159{
159{
160− if (m_currentActionParam != NULL) {
160+ if (m_currentActionParam != nullptr) {
161 const QVariantMap map = values.value<QVariantMap>();
161 const QVariantMap map = values.value<QVariantMap>();
162 GActionGroup *ag = hud_client_param_get_actions(m_currentActionParam);
162 GActionGroup *ag = hud_client_param_get_actions(m_currentActionParam);
163
163
@@ -179,10 +179,10 @@ void HudClient::updateParametrizedAction(const QVariant &values)
179
179
180void HudClient::cancelParametrizedAction()
180void HudClient::cancelParametrizedAction()
181{
181{
182− if (m_currentActionParam != NULL) {
182+ if (m_currentActionParam != nullptr) {
183 hud_client_param_send_cancel(m_currentActionParam);
183 hud_client_param_send_cancel(m_currentActionParam);
184 g_object_unref(m_currentActionParam);
184 g_object_unref(m_currentActionParam);
185− m_currentActionParam = NULL;
185+ m_currentActionParam = nullptr;
186 }
186 }
187}
187}
188
188
@@ -212,9 +212,9 @@ void HudClient::executeCommand(int index)
212 GVariant *is_parametrized = dee_model_get_value(model, iter, 7);
212 GVariant *is_parametrized = dee_model_get_value(model, iter, 7);
213 if (g_variant_get_boolean(is_parametrized)) {
213 if (g_variant_get_boolean(is_parametrized)) {
214 m_currentActionParam = hud_client_query_execute_param_command(m_clientQuery, command_key, /* timestamp */ 0);
214 m_currentActionParam = hud_client_query_execute_param_command(m_clientQuery, command_key, /* timestamp */ 0);
215− if (m_currentActionParam != NULL) {
215+ if (m_currentActionParam != nullptr) {
216 GMenuModel *menuModel = hud_client_param_get_model (m_currentActionParam);
216 GMenuModel *menuModel = hud_client_param_get_model (m_currentActionParam);
217− if (menuModel == NULL) {
217+ if (menuModel == nullptr) {
218 g_signal_connect(m_currentActionParam, HUD_CLIENT_PARAM_SIGNAL_MODEL_READY, G_CALLBACK(modelReadyCB), this);
218 g_signal_connect(m_currentActionParam, HUD_CLIENT_PARAM_SIGNAL_MODEL_READY, G_CALLBACK(modelReadyCB), this);
219 } else {
219 } else {
220 modelReady(false);
220 modelReady(false);
@@ -244,9 +244,9 @@ void HudClient::modelReady(bool needDisconnect)
244}
244}
245
245
246static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
246static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
247− GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, NULL);
247+ GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, nullptr);
248
248
249− if (v == NULL)
249+ if (v == nullptr)
250 return;
250 return;
251
251
252 properties.insert(attribute, DeeListModel::VariantForData(v));
252 properties.insert(attribute, DeeListModel::VariantForData(v));
@@ -264,10 +264,10 @@ void HudClient::modelReallyReady(bool needDisconnect)
264 for (int i = 0; i < g_menu_model_get_n_items(menuModel); i++) {
264 for (int i = 0; i < g_menu_model_get_n_items(menuModel); i++) {
265 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, i, "parameter-type", G_VARIANT_TYPE_STRING);
265 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, i, "parameter-type", G_VARIANT_TYPE_STRING);
266
266
267− if (v == NULL)
267+ if (v == nullptr)
268 continue;
268 continue;
269
269
270− const QString type = QString::fromUtf8(g_variant_get_string(v, NULL));
270+ const QString type = QString::fromUtf8(g_variant_get_string(v, nullptr));
271 if (type == "slider") {
271 if (type == "slider") {
272 const char *sliderAttributes[] = { "label", "min", "max", "step", "value", "live", "action" };
272 const char *sliderAttributes[] = { "label", "min", "max", "step", "value", "live", "action" };
273 QVariantMap properties;
273 QVariantMap properties;
@@ -283,7 +283,7 @@ void HudClient::modelReallyReady(bool needDisconnect)
283 DeeModel *model = hud_client_query_get_results_model(m_clientQuery);
283 DeeModel *model = hud_client_query_get_results_model(m_clientQuery);
284 DeeModelIter *iter = dee_model_get_iter_at_row(model, m_currentActionIndex);
284 DeeModelIter *iter = dee_model_get_iter_at_row(model, m_currentActionIndex);
285 GVariant *actionTextVariant = dee_model_get_value(model, iter, 1);
285 GVariant *actionTextVariant = dee_model_get_value(model, iter, 1);
286− const QString actionText = QString::fromUtf8(g_variant_get_string(actionTextVariant, NULL));
286+ const QString actionText = QString::fromUtf8(g_variant_get_string(actionTextVariant, nullptr));
287 g_variant_unref(actionTextVariant);
287 g_variant_unref(actionTextVariant);
288 Q_EMIT showParametrizedAction(actionText, QVariant::fromValue(items));
288 Q_EMIT showParametrizedAction(actionText, QVariant::fromValue(items));
289}
289}
plugins/HudClient/volumepeakdetector.cpp+9−9
@@ -45,15 +45,15 @@ PulseAudioVolumePeakDetector::PulseAudioVolumePeakDetector()
45 : m_accumulatedValue(0)
45 : m_accumulatedValue(0)
46 , m_nAccumulatedValues(0)
46 , m_nAccumulatedValues(0)
47 , m_accumulatedValuesLimit(1)
47 , m_accumulatedValuesLimit(1)
48− , m_context(NULL)
48+ , m_context(nullptr)
49− , m_mainloop_api(NULL)
49+ , m_mainloop_api(nullptr)
50− , m_stream(NULL)
50+ , m_stream(nullptr)
51{
51{
52}
52}
53
53
54void PulseAudioVolumePeakDetector::start()
54void PulseAudioVolumePeakDetector::start()
55{
55{
56− pa_mainloop *mainloop = NULL;
56+ pa_mainloop *mainloop = nullptr;
57
57
58 /* Set up a new main loop */
58 /* Set up a new main loop */
59 mainloop = pa_mainloop_new();
59 mainloop = pa_mainloop_new();
@@ -63,7 +63,7 @@ void PulseAudioVolumePeakDetector::start()
63 m_mainloop_api = pa_mainloop_get_api(mainloop);
63 m_mainloop_api = pa_mainloop_get_api(mainloop);
64
64
65 /* Create a new connection context */
65 /* Create a new connection context */
66− m_context = pa_context_new(m_mainloop_api, NULL);
66+ m_context = pa_context_new(m_mainloop_api, nullptr);
67 if (!m_context) {
67 if (!m_context) {
68 goto quit;
68 goto quit;
69 }
69 }
@@ -71,12 +71,12 @@ void PulseAudioVolumePeakDetector::start()
71 pa_context_set_state_callback(m_context, context_state_callback, this);
71 pa_context_set_state_callback(m_context, context_state_callback, this);
72
72
73 /* Connect the context */
73 /* Connect the context */
74− if (pa_context_connect(m_context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) {
74+ if (pa_context_connect(m_context, nullptr, PA_CONTEXT_NOFLAGS, nullptr) < 0) {
75 goto quit;
75 goto quit;
76 }
76 }
77
77
78 /* Run the main loop */
78 /* Run the main loop */
79− if (pa_mainloop_run(mainloop, NULL) < 0) {
79+ if (pa_mainloop_run(mainloop, nullptr) < 0) {
80 goto quit;
80 goto quit;
81 }
81 }
82
82
@@ -130,7 +130,7 @@ void PulseAudioVolumePeakDetector::startStream()
130 pa_channel_map_init_extend(&channel_map, sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);
130 pa_channel_map_init_extend(&channel_map, sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);
131 pa_proplist_sets(proplist, PA_PROP_MEDIA_NAME, "HUD Peak Detector");
131 pa_proplist_sets(proplist, PA_PROP_MEDIA_NAME, "HUD Peak Detector");
132
132
133− m_stream = pa_stream_new_with_proplist(m_context, NULL, &sample_spec, &channel_map, proplist);
133+ m_stream = pa_stream_new_with_proplist(m_context, nullptr, &sample_spec, &channel_map, proplist);
134 if (!m_stream) {
134 if (!m_stream) {
135 pa_proplist_free(proplist);
135 pa_proplist_free(proplist);
136 quit();
136 quit();
@@ -144,7 +144,7 @@ void PulseAudioVolumePeakDetector::startStream()
144 buffer_attr.maxlength = (uint32_t) -1;
144 buffer_attr.maxlength = (uint32_t) -1;
145 buffer_attr.fragsize = sizeof(float);
145 buffer_attr.fragsize = sizeof(float);
146
146
147− if (pa_stream_connect_record(m_stream, NULL, &buffer_attr, (pa_stream_flags_t)(PA_STREAM_PEAK_DETECT | PA_STREAM_ADJUST_LATENCY)) < 0) {
147+ if (pa_stream_connect_record(m_stream, nullptr, &buffer_attr, (pa_stream_flags_t)(PA_STREAM_PEAK_DETECT | PA_STREAM_ADJUST_LATENCY)) < 0) {
148 quit();
148 quit();
149 }
149 }
150}
150}
plugins/Powerd/Powerd.cpp+1−1
@@ -39,7 +39,7 @@ void dimTimeoutChanged(GSettings *settings, const gchar *key, QDBusInterface *un
39
39
40Powerd::Powerd(QObject* parent)
40Powerd::Powerd(QObject* parent)
41 : QObject(parent),
41 : QObject(parent),
42− unityScreen(NULL)
42+ unityScreen(nullptr)
43{
43{
44 unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
44 unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
45 "/com/canonical/Unity/Screen",
45 "/com/canonical/Unity/Screen",
plugins/Unity/Indicators/menucontentactivator.cpp+2−2
@@ -45,7 +45,7 @@ public:
45 m_baseIndex(0),
45 m_baseIndex(0),
46 m_delta(0),
46 m_delta(0),
47 m_count(0),
47 m_count(0),
48− m_timer(NULL),
48+ m_timer(nullptr),
49 q(parent)
49 q(parent)
50 {}
50 {}
51
51
@@ -55,7 +55,7 @@ public:
55 m_content.clear();
55 m_content.clear();
56 }
56 }
57
57
58− int findNextInactiveDelta(bool* finished = NULL);
58+ int findNextInactiveDelta(bool* finished = nullptr);
59
59
60 static int content_count(QQmlListProperty<MenuContentState> *prop);
60 static int content_count(QQmlListProperty<MenuContentState> *prop);
61 static MenuContentState* content_at(QQmlListProperty<MenuContentState> *prop, int index);
61 static MenuContentState* content_at(QQmlListProperty<MenuContentState> *prop, int index);
plugins/Unity/Indicators/menucontentactivator.h+1−1
@@ -71,7 +71,7 @@ class UNITYINDICATORS_EXPORT MenuContentActivator : public QObject
71 Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
71 Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
72 Q_PROPERTY(QQmlListProperty<MenuContentState> content READ content NOTIFY contentChanged DESIGNABLE false)
72 Q_PROPERTY(QQmlListProperty<MenuContentState> content READ content NOTIFY contentChanged DESIGNABLE false)
73public:
73public:
74− MenuContentActivator(QObject* parent = NULL);
74+ MenuContentActivator(QObject* parent = nullptr);
75 ~MenuContentActivator();
75 ~MenuContentActivator();
76
76
77 Q_INVOKABLE void restart();
77 Q_INVOKABLE void restart();
plugins/Unity/Indicators/modelprinter.cpp+3−3
@@ -27,13 +27,13 @@
27
27
28ModelPrinter::ModelPrinter(QObject *parent)
28ModelPrinter::ModelPrinter(QObject *parent)
29 : QObject(parent)
29 : QObject(parent)
30− , m_model(NULL)
30+ , m_model(nullptr)
31{
31{
32}
32}
33
33
34void ModelPrinter::setSourceModel(UnityMenuModel * sourceModel)
34void ModelPrinter::setSourceModel(UnityMenuModel * sourceModel)
35{
35{
36− if (m_model != NULL) {
36+ if (m_model != nullptr) {
37 disconnect(m_model);
37 disconnect(m_model);
38 }
38 }
39 if (m_model != sourceModel) {
39 if (m_model != sourceModel) {
@@ -41,7 +41,7 @@ void ModelPrinter::setSourceModel(UnityMenuModel * sourceModel)
41 Q_EMIT modelChanged();
41 Q_EMIT modelChanged();
42 Q_EMIT textChanged();
42 Q_EMIT textChanged();
43 }
43 }
44− if (m_model != NULL) {
44+ if (m_model != nullptr) {
45 connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(textChanged()));
45 connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(textChanged()));
46 connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(textChanged()));
46 connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(textChanged()));
47 connect(m_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SIGNAL(textChanged()));
47 connect(m_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SIGNAL(textChanged()));
plugins/Unity/Indicators/rootactionstate.cpp+4−4
@@ -31,7 +31,7 @@ extern "C" {
31
31
32RootActionState::RootActionState(QObject *parent)
32RootActionState::RootActionState(QObject *parent)
33 : ActionStateParser(parent),
33 : ActionStateParser(parent),
34− m_menu(NULL)
34+ m_menu(nullptr)
35{
35{
36}
36}
37
37
@@ -95,7 +95,7 @@ void RootActionState::onModelDataChanged(const QModelIndex& topLeft, const QMode
95void RootActionState::reset()
95void RootActionState::reset()
96{
96{
97 m_cachedState.clear();
97 m_cachedState.clear();
98− m_menu = NULL;
98+ m_menu = nullptr;
99
99
100 Q_EMIT menuChanged();
100 Q_EMIT menuChanged();
101 Q_EMIT updated();
101 Q_EMIT updated();
@@ -171,7 +171,7 @@ static QString iconUri(GIcon *icon)
171 const gchar* const* iconNames = g_themed_icon_get_names (G_THEMED_ICON (icon));
171 const gchar* const* iconNames = g_themed_icon_get_names (G_THEMED_ICON (icon));
172
172
173 QStringList iconNameList;
173 QStringList iconNameList;
174− for (uint index = 0; iconNames[index] != NULL; index++) {
174+ for (uint index = 0; iconNames[index] != nullptr; index++) {
175 iconNameList << iconNames[index];
175 iconNameList << iconNames[index];
176 }
176 }
177
177
@@ -282,7 +282,7 @@ QVariant RootActionState::toQVariant(GVariant* state) const
282 qmap["accessible-desc"] = accessible_name ? QString::fromUtf8(accessible_name) : "";
282 qmap["accessible-desc"] = accessible_name ? QString::fromUtf8(accessible_name) : "";
283 qmap["visible"] = visible;
283 qmap["visible"] = visible;
284
284
285− gicon = g_icon_new_for_string (icon, NULL);
285+ gicon = g_icon_new_for_string (icon, nullptr);
286 if (gicon) {
286 if (gicon) {
287 qmap["icons"] = QStringList() << iconUri(gicon);
287 qmap["icons"] = QStringList() << iconUri(gicon);
288 g_object_unref (gicon);
288 g_object_unref (gicon);
plugins/Unity/Indicators/unitymenumodelcache.h+1−1
@@ -31,7 +31,7 @@ class UNITYINDICATORS_EXPORT UnityMenuModelCache : public QObject
31{
31{
32 Q_OBJECT
32 Q_OBJECT
33public:
33public:
34− UnityMenuModelCache(QObject*parent=NULL);
34+ UnityMenuModelCache(QObject*parent=nullptr);
35 ~UnityMenuModelCache();
35 ~UnityMenuModelCache();
36
36
37 Q_INVOKABLE UnityMenuModel* model(const QByteArray& bus,
37 Q_INVOKABLE UnityMenuModel* model(const QByteArray& bus,
plugins/Unity/Indicators/unitymenumodelstack.cpp+4−4
@@ -90,7 +90,7 @@ UnityMenuModelStack::~UnityMenuModelStack()
90
90
91UnityMenuModel* UnityMenuModelStack::head() const
91UnityMenuModel* UnityMenuModelStack::head() const
92{
92{
93− return !m_menuModels.isEmpty() ? m_menuModels.first()->model() : NULL;
93+ return !m_menuModels.isEmpty() ? m_menuModels.first()->model() : nullptr;
94}
94}
95
95
96void UnityMenuModelStack::setHead(UnityMenuModel* model)
96void UnityMenuModelStack::setHead(UnityMenuModel* model)
@@ -106,7 +106,7 @@ void UnityMenuModelStack::setHead(UnityMenuModel* model)
106
106
107UnityMenuModel* UnityMenuModelStack::tail() const
107UnityMenuModel* UnityMenuModelStack::tail() const
108{
108{
109− return !m_menuModels.isEmpty() ? m_menuModels.last()->model() : NULL;
109+ return !m_menuModels.isEmpty() ? m_menuModels.last()->model() : nullptr;
110}
110}
111
111
112int UnityMenuModelStack::count() const
112int UnityMenuModelStack::count() const
@@ -127,7 +127,7 @@ void UnityMenuModelStack::push(UnityMenuModel* model, int index)
127UnityMenuModel* UnityMenuModelStack::pop()
127UnityMenuModel* UnityMenuModelStack::pop()
128{
128{
129 if (m_menuModels.isEmpty()) {
129 if (m_menuModels.isEmpty()) {
130− return NULL;
130+ return nullptr;
131 }
131 }
132 UnityMenuModelEntry* entry = m_menuModels.takeLast();
132 UnityMenuModelEntry* entry = m_menuModels.takeLast();
133 UnityMenuModel* model = entry->model();
133 UnityMenuModel* model = entry->model();
@@ -135,7 +135,7 @@ UnityMenuModel* UnityMenuModelStack::pop()
135
135
136 Q_EMIT tailChanged(tail());
136 Q_EMIT tailChanged(tail());
137 if (m_menuModels.isEmpty()) {
137 if (m_menuModels.isEmpty()) {
138− Q_EMIT headChanged(NULL);
138+ Q_EMIT headChanged(nullptr);
139 }
139 }
140 Q_EMIT countChanged(m_menuModels.count());
140 Q_EMIT countChanged(m_menuModels.count());
141
141
plugins/Unity/Indicators/unitymenumodelstack.h+1−1
@@ -40,7 +40,7 @@ class UNITYINDICATORS_EXPORT UnityMenuModelStack : public QObject
40 Q_PROPERTY(UnityMenuModel* tail READ tail NOTIFY tailChanged)
40 Q_PROPERTY(UnityMenuModel* tail READ tail NOTIFY tailChanged)
41 Q_PROPERTY(int count READ count NOTIFY countChanged)
41 Q_PROPERTY(int count READ count NOTIFY countChanged)
42public:
42public:
43− UnityMenuModelStack(QObject*parent=NULL);
43+ UnityMenuModelStack(QObject*parent=nullptr);
44 ~UnityMenuModelStack();
44 ~UnityMenuModelStack();
45
45
46 UnityMenuModel* head() const;
46 UnityMenuModel* head() const;
plugins/Utils/qlimitproxymodelqml.cpp+6−6
@@ -42,18 +42,18 @@ void
42QLimitProxyModelQML::setModel(QAbstractItemModel *itemModel)
42QLimitProxyModelQML::setModel(QAbstractItemModel *itemModel)
43{
43{
44 if (itemModel != sourceModel()) {
44 if (itemModel != sourceModel()) {
45− if (sourceModel() != NULL) {
45+ if (sourceModel() != nullptr) {
46 sourceModel()->disconnect(this);
46 sourceModel()->disconnect(this);
47 }
47 }
48
48
49 setSourceModel(itemModel);
49 setSourceModel(itemModel);
50
50
51− if (sourceModel() != NULL) {
51+ if (sourceModel() != nullptr) {
52 // Disconnect the QIdentityProxyModel handling for rows removed/added...
52 // Disconnect the QIdentityProxyModel handling for rows removed/added...
53− disconnect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), this, NULL);
53+ disconnect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), this, nullptr);
54− disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, NULL);
54+ disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, nullptr);
55− disconnect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, NULL);
55+ disconnect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, nullptr);
56− disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, NULL);
56+ disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, nullptr);
57
57
58 // ... and use our own
58 // ... and use our own
59 connect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
59 connect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
plugins/Utils/qsortfilterproxymodelqml.cpp+7−7
@@ -34,7 +34,7 @@ QSortFilterProxyModelQML::QSortFilterProxyModelQML(QObject *parent)
34 */
34 */
35int QSortFilterProxyModelQML::mapRowToSource(int row)
35int QSortFilterProxyModelQML::mapRowToSource(int row)
36{
36{
37− if (sourceModel() == NULL)
37+ if (sourceModel() == nullptr)
38 return -1;
38 return -1;
39
39
40 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
40 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
@@ -48,12 +48,12 @@ QHash<int, QByteArray> QSortFilterProxyModelQML::roleNames() const
48void
48void
49QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
49QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
50{
50{
51− if (itemModel == NULL) {
51+ if (itemModel == nullptr) {
52 return;
52 return;
53 }
53 }
54
54
55 if (itemModel != sourceModel()) {
55 if (itemModel != sourceModel()) {
56− if (sourceModel() != NULL) {
56+ if (sourceModel() != nullptr) {
57 sourceModel()->disconnect(this);
57 sourceModel()->disconnect(this);
58 }
58 }
59
59
@@ -83,7 +83,7 @@ QSortFilterProxyModelQML::get(int row)
83QVariant
83QVariant
84QSortFilterProxyModelQML::data(int row, int role)
84QSortFilterProxyModelQML::data(int row, int role)
85{
85{
86− if (sourceModel() == NULL) {
86+ if (sourceModel() == nullptr) {
87 return QVariant();
87 return QVariant();
88 }
88 }
89
89
@@ -93,7 +93,7 @@ QSortFilterProxyModelQML::data(int row, int role)
93int
93int
94QSortFilterProxyModelQML::totalCount() const
94QSortFilterProxyModelQML::totalCount() const
95{
95{
96− if (sourceModel() != NULL) {
96+ if (sourceModel() != nullptr) {
97 return sourceModel()->rowCount();
97 return sourceModel()->rowCount();
98 } else {
98 } else {
99 return 0;
99 return 0;
@@ -149,7 +149,7 @@ QSortFilterProxyModelQML::findFirst(int role, const QVariant& value) const
149int
149int
150QSortFilterProxyModelQML::mapFromSource(int row)
150QSortFilterProxyModelQML::mapFromSource(int row)
151{
151{
152− if (sourceModel() != NULL) {
152+ if (sourceModel() != nullptr) {
153 return QSortFilterProxyModel::mapFromSource(sourceModel()->index(row, 0)).row();
153 return QSortFilterProxyModel::mapFromSource(sourceModel()->index(row, 0)).row();
154 } else {
154 } else {
155 return -1;
155 return -1;
@@ -159,7 +159,7 @@ QSortFilterProxyModelQML::mapFromSource(int row)
159int
159int
160QSortFilterProxyModelQML::mapToSource(int row)
160QSortFilterProxyModelQML::mapToSource(int row)
161{
161{
162− if (sourceModel() != NULL) {
162+ if (sourceModel() != nullptr) {
163 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
163 return QSortFilterProxyModel::mapToSource(index(row, 0)).row();
164 } else {
164 } else {
165 return -1;
165 return -1;
plugins/Utils/timeformatter.cpp+8−8
@@ -57,9 +57,9 @@ timedate1_properties_changed (GDBusConnection *connection,
57 if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)")))
57 if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)")))
58 return;
58 return;
59
59
60− g_variant_get (parameters, "(s@a{sv}as)", NULL, &changed, &iter);
60+ g_variant_get (parameters, "(s@a{sv}as)", nullptr, &changed, &iter);
61
61
62− if (g_variant_lookup (changed, "Timezone", "s", NULL)) {
62+ if (g_variant_lookup (changed, "Timezone", "s", nullptr)) {
63 priv->formatter->update();
63 priv->formatter->update();
64 }
64 }
65 else {
65 else {
@@ -81,10 +81,10 @@ got_bus(GObject *object, GAsyncResult *result, gpointer user_data)
81 Q_UNUSED(object);
81 Q_UNUSED(object);
82
82
83 TimeFormatterPrivate *priv = (TimeFormatterPrivate *)user_data;
83 TimeFormatterPrivate *priv = (TimeFormatterPrivate *)user_data;
84− GError *error = NULL;
84+ GError *error = nullptr;
85
85
86 priv->system_bus = g_bus_get_finish (result, &error);
86 priv->system_bus = g_bus_get_finish (result, &error);
87− if (priv->system_bus == NULL) {
87+ if (priv->system_bus == nullptr) {
88 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
88 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
89 qWarning("TimeFormatter: cannot connect to the system bus: %s", error->message);
89 qWarning("TimeFormatter: cannot connect to the system bus: %s", error->message);
90 g_error_free (error);
90 g_error_free (error);
@@ -98,14 +98,14 @@ got_bus(GObject *object, GAsyncResult *result, gpointer user_data)
98 * and keep the process alive.
98 * and keep the process alive.
99 */
99 */
100 priv->subscription_id = g_dbus_connection_signal_subscribe (priv->system_bus,
100 priv->subscription_id = g_dbus_connection_signal_subscribe (priv->system_bus,
101− NULL, /* sender */
101+ nullptr, /* sender */
102 "org.freedesktop.DBus.Properties",
102 "org.freedesktop.DBus.Properties",
103 "PropertiesChanged",
103 "PropertiesChanged",
104− NULL,
104+ nullptr,
105 "org.freedesktop.timedate1",
105 "org.freedesktop.timedate1",
106 G_DBUS_SIGNAL_FLAGS_NONE,
106 G_DBUS_SIGNAL_FLAGS_NONE,
107 timedate1_properties_changed,
107 timedate1_properties_changed,
108− priv, NULL);
108+ priv, nullptr);
109}
109}
110
110
111TimeFormatter::TimeFormatter(QObject *parent): QObject(parent)
111TimeFormatter::TimeFormatter(QObject *parent): QObject(parent)
@@ -114,7 +114,7 @@ TimeFormatter::TimeFormatter(QObject *parent): QObject(parent)
114 priv->formatter = this;
114 priv->formatter = this;
115 priv->time = 0;
115 priv->time = 0;
116 priv->format = "yyyy-MM-dd hh:mm";
116 priv->format = "yyyy-MM-dd hh:mm";
117− priv->system_bus = NULL;
117+ priv->system_bus = nullptr;
118 priv->subscription_id = 0;
118 priv->subscription_id = 0;
119 priv->cancellable = g_cancellable_new ();
119 priv->cancellable = g_cancellable_new ();
120
120
tests/mocks/GSettings.1.0/fake_gsettings.h+2−2
@@ -27,7 +27,7 @@ class GSettingsSchemaQml: public QObject
27 Q_PROPERTY(QByteArray id READ id WRITE setId)
27 Q_PROPERTY(QByteArray id READ id WRITE setId)
28
28
29public:
29public:
30− GSettingsSchemaQml(QObject *parent = NULL);
30+ GSettingsSchemaQml(QObject *parent = nullptr);
31
31
32 QByteArray id() const;
32 QByteArray id() const;
33 void setId(const QByteArray &id);
33 void setId(const QByteArray &id);
@@ -48,7 +48,7 @@ class GSettingsQml: public QObject
48 Q_PROPERTY(QString pictureUri READ pictureUri WRITE setPictureUri NOTIFY pictureUriChanged)
48 Q_PROPERTY(QString pictureUri READ pictureUri WRITE setPictureUri NOTIFY pictureUriChanged)
49
49
50public:
50public:
51− GSettingsQml(QObject *parent = NULL);
51+ GSettingsQml(QObject *parent = nullptr);
52 ~GSettingsQml();
52 ~GSettingsQml();
53
53
54 GSettingsSchemaQml * schema() const;
54 GSettingsSchemaQml * schema() const;
tests/mocks/HudClient/fake_libhud_client.cpp+9−9
@@ -48,7 +48,7 @@ static void hud_client_query_class_init(HudClientQueryClass * /*klass*/)
48 HUD_CLIENT_TYPE_QUERY,
48 HUD_CLIENT_TYPE_QUERY,
49 G_SIGNAL_RUN_LAST,
49 G_SIGNAL_RUN_LAST,
50 0, /* offset */
50 0, /* offset */
51− NULL, NULL, /* Accumulator */
51+ nullptr, nullptr, /* Accumulator */
52 g_cclosure_marshal_VOID__VOID,
52 g_cclosure_marshal_VOID__VOID,
53 G_TYPE_NONE, 0, G_TYPE_NONE);
53 G_TYPE_NONE, 0, G_TYPE_NONE);
54}
54}
@@ -56,7 +56,7 @@ static void hud_client_query_class_init(HudClientQueryClass * /*klass*/)
56HudClientQuery *hud_client_query_new(const gchar *query)
56HudClientQuery *hud_client_query_new(const gchar *query)
57{
57{
58 HudClientStub::m_lastSetQuery = QString::fromUtf8(query);
58 HudClientStub::m_lastSetQuery = QString::fromUtf8(query);
59− HudClientStub::m_query = HUD_CLIENT_QUERY(g_object_new(HUD_CLIENT_TYPE_QUERY, NULL));
59+ HudClientStub::m_query = HUD_CLIENT_QUERY(g_object_new(HUD_CLIENT_TYPE_QUERY, nullptr));
60 return HudClientStub::m_query;
60 return HudClientStub::m_query;
61}
61}
62
62
@@ -70,13 +70,13 @@ DeeModel *hud_client_query_get_results_model(HudClientQuery *cquery)
70 GVariant * columns[G_N_ELEMENTS(results_model_schema) + 1];
70 GVariant * columns[G_N_ELEMENTS(results_model_schema) + 1];
71 columns[0] = g_variant_new_variant(g_variant_new_uint64(0));
71 columns[0] = g_variant_new_variant(g_variant_new_uint64(0));
72 columns[1] = g_variant_new_string("Help");
72 columns[1] = g_variant_new_string("Help");
73− columns[2] = g_variant_new_array(G_VARIANT_TYPE("(ii)"), NULL, 0);
73+ columns[2] = g_variant_new_array(G_VARIANT_TYPE("(ii)"), nullptr, 0);
74 columns[3] = g_variant_new_string("Get Help");
74 columns[3] = g_variant_new_string("Get Help");
75− columns[4] = g_variant_new_array(G_VARIANT_TYPE("(ii)"), NULL, 0);
75+ columns[4] = g_variant_new_array(G_VARIANT_TYPE("(ii)"), nullptr, 0);
76 columns[5] = g_variant_new_string("");
76 columns[5] = g_variant_new_string("");
77 columns[6] = g_variant_new_uint32(3);
77 columns[6] = g_variant_new_uint32(3);
78 columns[7] = g_variant_new_boolean(false);
78 columns[7] = g_variant_new_boolean(false);
79− columns[8] = NULL;
79+ columns[8] = nullptr;
80 dee_model_append_row(resultsModel, columns);
80 dee_model_append_row(resultsModel, columns);
81
81
82 columns[0] = g_variant_new_variant(g_variant_new_uint64(1));
82 columns[0] = g_variant_new_variant(g_variant_new_uint64(1));
@@ -153,13 +153,13 @@ HudClientParam *hud_client_query_execute_param_command(HudClientQuery *cquery, G
153 HudClientStub::m_lastExecutedParametrizedCommandRow = i;
153 HudClientStub::m_lastExecutedParametrizedCommandRow = i;
154 g_variant_unref(it_command);
154 g_variant_unref(it_command);
155 // No need to create a real HudClientParam since it's always passed down to us
155 // No need to create a real HudClientParam since it's always passed down to us
156− return (HudClientParam *)g_object_new(G_TYPE_OBJECT, NULL);
156+ return (HudClientParam *)g_object_new(G_TYPE_OBJECT, nullptr);
157 }
157 }
158 g_variant_unref(it_command);
158 g_variant_unref(it_command);
159 }
159 }
160 }
160 }
161 HudClientStub::m_lastExecutedParametrizedCommandRow = -1;
161 HudClientStub::m_lastExecutedParametrizedCommandRow = -1;
162− return NULL;
162+ return nullptr;
163}
163}
164
164
165void hud_client_query_voice_query(HudClientQuery *cquery)
165void hud_client_query_voice_query(HudClientQuery *cquery)
@@ -183,7 +183,7 @@ GMenuModel *hud_client_param_get_model(HudClientParam *param)
183
183
184 if (!parametrizedActionModel) {
184 if (!parametrizedActionModel) {
185 GMenu *menu = g_menu_new();
185 GMenu *menu = g_menu_new();
186− GMenuItem *item = g_menu_item_new("Item1Label", NULL);
186+ GMenuItem *item = g_menu_item_new("Item1Label", nullptr);
187 g_menu_item_set_attribute_value(item, "parameter-type", g_variant_new_string("slider"));
187 g_menu_item_set_attribute_value(item, "parameter-type", g_variant_new_string("slider"));
188 g_menu_item_set_attribute_value(item, "min", g_variant_new_double(10));
188 g_menu_item_set_attribute_value(item, "min", g_variant_new_double(10));
189 g_menu_item_set_attribute_value(item, "max", g_variant_new_double(80));
189 g_menu_item_set_attribute_value(item, "max", g_variant_new_double(80));
@@ -220,7 +220,7 @@ GActionGroup *hud_client_param_get_actions(HudClientParam *param)
220 GSimpleAction *action = g_simple_action_new("costAction", G_VARIANT_TYPE_DOUBLE);
220 GSimpleAction *action = g_simple_action_new("costAction", G_VARIANT_TYPE_DOUBLE);
221 g_simple_action_group_insert(actionGroup, G_ACTION(action));
221 g_simple_action_group_insert(actionGroup, G_ACTION(action));
222
222
223− g_signal_connect (action, "activate", G_CALLBACK (on_signal_activated), NULL);
223+ g_signal_connect (action, "activate", G_CALLBACK (on_signal_activated), nullptr);
224
224
225
225
226 parametrizedActionGroup = G_ACTION_GROUP(actionGroup);
226 parametrizedActionGroup = G_ACTION_GROUP(actionGroup);
tests/mocks/LightDM/demo/GreeterPrivate.cpp+5−5
@@ -46,7 +46,7 @@ public:
46 : QObject(parent),
46 : QObject(parent),
47 greeter(parent),
47 greeter(parent),
48 greeterPrivate(greeterPrivate),
48 greeterPrivate(greeterPrivate),
49− pamHandle(NULL)
49+ pamHandle(nullptr)
50 {
50 {
51 qRegisterMetaType<QLightDM::GreeterImpl::ResponseFuture>("QLightDM::GreeterImpl::ResponseFuture");
51 qRegisterMetaType<QLightDM::GreeterImpl::ResponseFuture>("QLightDM::GreeterImpl::ResponseFuture");
52
52
@@ -206,14 +206,14 @@ Q_SIGNALS:
206private Q_SLOTS:
206private Q_SLOTS:
207 void finishPam()
207 void finishPam()
208 {
208 {
209− if (pamHandle == NULL) {
209+ if (pamHandle == nullptr) {
210 return;
210 return;
211 }
211 }
212
212
213 int pamStatus = futureWatcher.result();
213 int pamStatus = futureWatcher.result();
214
214
215 pam_end(pamHandle, pamStatus);
215 pam_end(pamHandle, pamStatus);
216− pamHandle = NULL;
216+ pamHandle = nullptr;
217
217
218 greeterPrivate->authenticated = (pamStatus == PAM_SUCCESS);
218 greeterPrivate->authenticated = (pamStatus == PAM_SUCCESS);
219 Q_EMIT greeter->authenticationComplete();
219 Q_EMIT greeter->authenticationComplete();
@@ -243,9 +243,9 @@ private:
243 void cancelPam()
243 void cancelPam()
244 {
244 {
245 // Unfortunately we can't simply cancel our QFuture because QtConcurrent::run doesn't support cancel
245 // Unfortunately we can't simply cancel our QFuture because QtConcurrent::run doesn't support cancel
246− if (pamHandle != NULL) {
246+ if (pamHandle != nullptr) {
247 pam_handle *handle = pamHandle;
247 pam_handle *handle = pamHandle;
248− pamHandle = NULL; // to disable normal finishPam() handling
248+ pamHandle = nullptr; // to disable normal finishPam() handling
249 while (respond(QString())); // clear our local queue of QFutures
249 while (respond(QString())); // clear our local queue of QFutures
250 pam_end(handle, PAM_CONV_ERR);
250 pam_end(handle, PAM_CONV_ERR);
251 }
251 }
tests/mocks/QMenuModel/unitymenumodel.cpp+4−4
@@ -118,7 +118,7 @@ void UnityMenuModel::setMenuObjectPath(const QByteArray &path)
118
118
119ActionStateParser* UnityMenuModel::actionStateParser() const
119ActionStateParser* UnityMenuModel::actionStateParser() const
120{
120{
121− return NULL;
121+ return nullptr;
122}
122}
123
123
124void UnityMenuModel::setActionStateParser(ActionStateParser*)
124void UnityMenuModel::setActionStateParser(ActionStateParser*)
@@ -190,11 +190,11 @@ QHash<int, QByteArray> UnityMenuModel::roleNames() const
190QObject * UnityMenuModel::submenu(int position, QQmlComponent*)
190QObject * UnityMenuModel::submenu(int position, QQmlComponent*)
191{
191{
192 if (position < 0 || m_modelData.count() < position) {
192 if (position < 0 || m_modelData.count() < position) {
193− return NULL;
193+ return nullptr;
194 }
194 }
195
195
196 while (submenus.count() <= position) {
196 while (submenus.count() <= position) {
197− submenus.append(NULL);
197+ submenus.append(nullptr);
198 }
198 }
199
199
200 QVariant submenuData = subMenuData(position);
200 QVariant submenuData = subMenuData(position);
@@ -209,7 +209,7 @@ QObject * UnityMenuModel::submenu(int position, QQmlComponent*)
209 return model;
209 return model;
210 }
210 }
211
211
212− return NULL;
212+ return nullptr;
213}
213}
214
214
215bool UnityMenuModel::loadExtendedAttributes(int, const QVariantMap &)
215bool UnityMenuModel::loadExtendedAttributes(int, const QVariantMap &)
tests/mocks/QMenuModel/unitymenumodel.h+2−2
@@ -35,7 +35,7 @@ class Q_DECL_EXPORT UnityMenuModel : public QAbstractListModel
35 Q_PROPERTY(QString nameOwner READ nameOwner NOTIFY nameOwnerChanged)
35 Q_PROPERTY(QString nameOwner READ nameOwner NOTIFY nameOwnerChanged)
36
36
37public:
37public:
38− UnityMenuModel(QObject *parent = NULL);
38+ UnityMenuModel(QObject *parent = nullptr);
39 virtual ~UnityMenuModel();
39 virtual ~UnityMenuModel();
40
40
41 Q_INVOKABLE void insertRow(int row, const QVariant& data);
41 Q_INVOKABLE void insertRow(int row, const QVariant& data);
@@ -66,7 +66,7 @@ public:
66 QModelIndex parent(const QModelIndex &index) const;
66 QModelIndex parent(const QModelIndex &index) const;
67 QHash<int, QByteArray> roleNames() const;
67 QHash<int, QByteArray> roleNames() const;
68
68
69− Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = NULL);
69+ Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = nullptr);
70 Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema);
70 Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema);
71 Q_INVOKABLE QVariant get(int row, const QByteArray &role);
71 Q_INVOKABLE QVariant get(int row, const QByteArray &role);
72
72
tests/mocks/QtMultimedia/audio.cpp+1−1
@@ -22,7 +22,7 @@ Audio::Audio(QObject* parent):
22 QObject(parent),
22 QObject(parent),
23 m_playbackState(StoppedState)
23 m_playbackState(StoppedState)
24{
24{
25− qsrand(time(NULL));
25+ qsrand(time(nullptr));
26 m_timer.setInterval(1000);
26 m_timer.setInterval(1000);
27 connect(&m_timer, SIGNAL(timeout()), SLOT(timerEvent()));
27 connect(&m_timer, SIGNAL(timeout()), SLOT(timerEvent()));
28}
28}
tests/mocks/Unity/Application/ApplicationDBusAdaptor.cpp+1−1
@@ -33,7 +33,7 @@ MirSurfaceItem* topSurface(MirSurfaceItem* surface)
33 if (!surface)
33 if (!surface)
34 return nullptr;
34 return nullptr;
35
35
36− MirSurfaceItem* child = NULL;
36+ MirSurfaceItem* child = nullptr;
37 Q_FOREACH (MirSurfaceItem *childSurface, surface->childSurfaceList()) {
37 Q_FOREACH (MirSurfaceItem *childSurface, surface->childSurfaceList()) {
38 child = topSurface(childSurface);
38 child = topSurface(childSurface);
39 if (child) {
39 if (child) {
tests/mocks/Unity/Application/ApplicationInfo.h+2−2
@@ -41,8 +41,8 @@ class ApplicationInfo : public ApplicationInfoInterface {
41 Q_PROPERTY(bool manualSurfaceCreation READ manualSurfaceCreation WRITE setManualSurfaceCreation NOTIFY manualSurfaceCreationChanged)
41 Q_PROPERTY(bool manualSurfaceCreation READ manualSurfaceCreation WRITE setManualSurfaceCreation NOTIFY manualSurfaceCreationChanged)
42
42
43public:
43public:
44− ApplicationInfo(QObject *parent = NULL);
44+ ApplicationInfo(QObject *parent = nullptr);
45− ApplicationInfo(const QString &appId, QObject *parent = NULL);
45+ ApplicationInfo(const QString &appId, QObject *parent = nullptr);
46 ~ApplicationInfo();
46 ~ApplicationInfo();
47
47
48 void setIconId(const QString &iconId);
48 void setIconId(const QString &iconId);
tests/mocks/Unity/Application/ApplicationManager.h+1−1
@@ -46,7 +46,7 @@ class ApplicationManager : public ApplicationManagerInterface {
46 Q_PROPERTY(bool fake READ fake CONSTANT)
46 Q_PROPERTY(bool fake READ fake CONSTANT)
47
47
48 public:
48 public:
49− ApplicationManager(QObject *parent = NULL);
49+ ApplicationManager(QObject *parent = nullptr);
50 virtual ~ApplicationManager();
50 virtual ~ApplicationManager();
51
51
52 static ApplicationManager *singleton();
52 static ApplicationManager *singleton();
tests/plugins/Unity/Indicators/rootactionstatetest.cpp+4−4
@@ -50,7 +50,7 @@ private Q_SLOTS:
50
50
51 QCOMPARE(rootState->menu(), menuModel);
51 QCOMPARE(rootState->menu(), menuModel);
52 delete menuModel;
52 delete menuModel;
53− QVERIFY(rootState->menu() == NULL);
53+ QVERIFY(rootState->menu() == nullptr);
54 delete rootState;
54 delete rootState;
55 }
55 }
56
56
@@ -60,8 +60,8 @@ private Q_SLOTS:
60 g_variant_builder_init(&builderIcons, G_VARIANT_TYPE("av"));
60 g_variant_builder_init(&builderIcons, G_VARIANT_TYPE("av"));
61 for (int i = 0; i < 3; i ++) {
61 for (int i = 0; i < 3; i ++) {
62
62
63− GIcon* icon = NULL;
63+ GIcon* icon = nullptr;
64− icon = g_icon_new_for_string (QString("testIcon%1").arg(i).toUtf8().constData(), NULL);
64+ icon = g_icon_new_for_string (QString("testIcon%1").arg(i).toUtf8().constData(), nullptr);
65
65
66 g_variant_builder_add(&builderIcons,
66 g_variant_builder_add(&builderIcons,
67 "v",
67 "v",
@@ -73,7 +73,7 @@ private Q_SLOTS:
73 g_variant_builder_init(&builderParams, G_VARIANT_TYPE_ARRAY);
73 g_variant_builder_init(&builderParams, G_VARIANT_TYPE_ARRAY);
74 GVariant* icons = g_variant_builder_end (&builderIcons);
74 GVariant* icons = g_variant_builder_end (&builderIcons);
75 g_variant_ref_sink (icons);
75 g_variant_ref_sink (icons);
76− g_variant_builder_add (&builderParams, "{sv}", g_strdup ("icons"), icons, NULL);
76+ g_variant_builder_add (&builderParams, "{sv}", g_strdup ("icons"), icons, nullptr);
77
77
78 GVariant* params = g_variant_builder_end (&builderParams);
78 GVariant* params = g_variant_builder_end (&builderParams);
79
79
tests/plugins/Unity/Indicators/unitymenumodelstacktest.cpp+1−1
@@ -42,7 +42,7 @@ private Q_SLOTS:
42 void cleanup()
42 void cleanup()
43 {
43 {
44 delete m_model;
44 delete m_model;
45− m_model = NULL;
45+ m_model = nullptr;
46 }
46 }
47
47
48 void testHeadOnSetHead()
48 void testHeadOnSetHead()
tests/uqmlscene/main.cpp+1−1
@@ -495,7 +495,7 @@ int main(int argc, char ** argv)
495 if (!window) {
495 if (!window) {
496 QQuickItem *contentItem = qobject_cast<QQuickItem *>(topLevel);
496 QQuickItem *contentItem = qobject_cast<QQuickItem *>(topLevel);
497 if (contentItem) {
497 if (contentItem) {
498− qxView = new QQuickView(&engine, NULL);
498+ qxView = new QQuickView(&engine, nullptr);
499 window = qxView;
499 window = qxView;
500 // Set window default properties; the qml can still override them
500 // Set window default properties; the qml can still override them
501 QString oname = contentItem->objectName();
501 QString oname = contentItem->objectName();