[gtkmm-documentation] Use nullptr instead of 0
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Use nullptr instead of 0
- Date: Thu, 10 Dec 2015 13:35:25 +0000 (UTC)
commit eb9d73331c79d897489da5b024016fc736921c13
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Dec 10 14:33:17 2015 +0100
Use nullptr instead of 0
docs/tutorial/C/index-in.docbook | 10 +++++-----
.../command_line_handling/exampleapplication.cc | 2 +-
examples/book/toolpalette/canvas.cc | 4 +---
.../book/treeview/editable_cells/examplewindow.cc | 4 +---
.../others/cellrenderercustom/cellrendererpopup.cc | 2 +-
5 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/docs/tutorial/C/index-in.docbook b/docs/tutorial/C/index-in.docbook
index fe2cfc2..d3cb0ca 100644
--- a/docs/tutorial/C/index-in.docbook
+++ b/docs/tutorial/C/index-in.docbook
@@ -3514,7 +3514,7 @@ Glib::RefPtr<Gio::Menu> gmenu = Glib::RefPtr<Gio::Menu>::cast_dynamic(object);
Gtk::MenuBar* pMenuBar = Gtk::manage(new Gtk::MenuBar(gmenu));
m_Box.pack_start(*pMenuBar, Gtk::PACK_SHRINK);
-Gtk::Toolbar* toolbar = 0;
+Gtk::Toolbar* toolbar = nullptr;
m_refBuilder->get_widget("toolbar", toolbar);
m_Box.pack_start(*toolbar, Gtk::PACK_SHRINK);]]>
</programlisting>
@@ -6547,9 +6547,9 @@ To access a widget, for instance to <methodname>show()</methodname> a dialog, us
the <methodname>get_widget()</methodname> method, providing the widget's name. This
name should be specified in the <application>Glade</application> Properties
window. If the widget could not be found, or is of the wrong type, then the
-pointer will be set to 0.
+pointer will be set to nullptr.
<programlisting>
-Gtk::Dialog* pDialog = 0;
+Gtk::Dialog* pDialog = nullptr;
builder->get_widget("DialogBasic", pDialog);
</programlisting>
</para>
@@ -6607,7 +6607,7 @@ its location and child widgets and the properties of its >kmm; base class.
<para>Use <methodname>Gtk::Builder::get_widget_derived()</methodname> like so:
<programlisting>
-DerivedDialog* pDialog = 0;
+DerivedDialog* pDialog = nullptr;
builder->get_widget_derived("DialogBasic", pDialog);
</programlisting>
</para>
@@ -6638,7 +6638,7 @@ or <methodname>get_widget_derived()</methodname> again. For instance,
DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: Gtk::Dialog(cobject),
m_builder(builder),
- m_pButton(0)
+ m_pButton(nullptr)
{
//Get the Glade-instantiated Button, and connect a signal handler:
m_builder->get_widget("quit_button", m_pButton);
diff --git a/examples/book/application/command_line_handling/exampleapplication.cc
b/examples/book/application/command_line_handling/exampleapplication.cc
index 4e90cc5..189c007 100644
--- a/examples/book/application/command_line_handling/exampleapplication.cc
+++ b/examples/book/application/command_line_handling/exampleapplication.cc
@@ -132,7 +132,7 @@ static bool get_arg_value(const Glib::RefPtr<Glib::VariantDict>& options, const
}
else
{
- auto gvariant = g_variant_dict_lookup_value(options->gobj(), arg_name.c_str(), NULL);
+ auto gvariant = g_variant_dict_lookup_value(options->gobj(), arg_name.c_str(), nullptr);
if(!gvariant)
{
std::cerr << "The \"" << arg_name << "\" value was not in the options VariantDict." << std::endl;
diff --git a/examples/book/toolpalette/canvas.cc b/examples/book/toolpalette/canvas.cc
index 543482b..fe14aef 100644
--- a/examples/book/toolpalette/canvas.cc
+++ b/examples/book/toolpalette/canvas.cc
@@ -1,5 +1,3 @@
-//$Id: canvas.cc 870 2007-07-13 19:08:46Z murrayc $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2009 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -21,7 +19,7 @@
Canvas::Canvas()
: m_drag_data_requested_for_drop(false),
- m_drop_item(0)
+ m_drop_item(nullptr)
{
set_app_paintable();
}
diff --git a/examples/book/treeview/editable_cells/examplewindow.cc
b/examples/book/treeview/editable_cells/examplewindow.cc
index fc7e00e..d425fc5 100644
--- a/examples/book/treeview/editable_cells/examplewindow.cc
+++ b/examples/book/treeview/editable_cells/examplewindow.cc
@@ -1,5 +1,3 @@
-//$Id: examplewindow.cc 858 2007-06-22 08:37:15Z murrayc $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -172,7 +170,7 @@ void ExampleWindow::cellrenderer_validated_on_edited(
Gtk::TreePath path(path_string);
//Convert the inputed text to an integer, as needed by our model column:
- char* pchEnd = 0;
+ char* pchEnd = nullptr;
int new_value = strtol(new_text.c_str(), &pchEnd, 10);
if(new_value > 10)
diff --git a/examples/others/cellrenderercustom/cellrendererpopup.cc
b/examples/others/cellrenderercustom/cellrendererpopup.cc
index 8d26965..416d465 100644
--- a/examples/others/cellrenderercustom/cellrendererpopup.cc
+++ b/examples/others/cellrenderercustom/cellrendererpopup.cc
@@ -157,7 +157,7 @@ Gtk::CellEditable* CellRendererPopup::start_editing_vfunc(GdkEvent*,
{
// If the cell isn't editable we return 0.
if(!property_editable())
- return 0;
+ return nullptr;
std::unique_ptr<PopupEntry> popup_entry (new PopupEntry(path));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]