Commit 87ee5aeb authored by Murray Cumming's avatar Murray Cumming
Browse files

C++11: Use nullptr.

parent f4d29ecf
......@@ -47,7 +47,7 @@ void Application::create_window(const Glib::RefPtr<Gio::File>& file)
{
//std::cout << G_STRFUNC << ": debug" << std::endl;
AppWindow* window = 0;
AppWindow* window = nullptr;
Glom::Utils::get_glade_widget_derived_with_warning(window);
g_assert(window);
......
......@@ -71,7 +71,7 @@ static const Glib::ustring ACTION_GROUP_NAME_PRINT_LAYOUTS = "print-layouts-list
//static const int GLOM_RESPONSE_BROWSE_NETWORK = 1;
// Global application variable
AppWindow* global_appwindow = 0;
AppWindow* global_appwindow = nullptr;
Glib::ustring AppWindow::m_current_locale;
Glib::ustring AppWindow::m_original_locale;
......@@ -83,20 +83,20 @@ AppWindow::AppWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>&
: GlomBakery::AppWindow_WithDoc("Glom"),
Gtk::ApplicationWindow(cobject),
m_builder(builder),
m_menubar(0),
m_pVBox(0),
m_menubar(nullptr),
m_pVBox(nullptr),
m_VBox_PlaceHolder(Gtk::ORIENTATION_VERTICAL),
m_pBoxTop(0),
m_pFrame(0),
m_pBoxTop(nullptr),
m_pFrame(nullptr),
m_bAboutShown(false),
m_pAbout(0),
m_pAbout(nullptr),
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_window_translations(0),
m_window_translations(nullptr),
#endif // !GLOM_ENABLE_CLIENT_ONLY
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_ui_save_extra_showextras(false),
m_ui_save_extra_newdb_hosting_mode(Document::HOSTING_MODE_DEFAULT),
m_avahi_progress_dialog(0),
m_avahi_progress_dialog(nullptr),
#endif // !GLOM_ENABLE_CLIENT_ONLY
m_show_sql_debug(false)
{
......@@ -154,15 +154,15 @@ AppWindow::~AppWindow()
}
delete m_avahi_progress_dialog;
m_avahi_progress_dialog = 0;
m_avahi_progress_dialog = nullptr;
#endif // !GLOM_ENABLE_CLIENT_ONLY
delete m_pAbout;
m_pAbout = 0;
m_pAbout = nullptr;
//This was set in the constructor:
global_appwindow = 0;
global_appwindow = nullptr;
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
......@@ -170,7 +170,7 @@ void AppWindow::on_connection_avahi_begin()
{
//Create the dialog:
delete m_avahi_progress_dialog;
m_avahi_progress_dialog = 0;
m_avahi_progress_dialog = nullptr;
m_avahi_progress_dialog = new Gtk::MessageDialog(UiUtils::bold_message(_("Glom: Generating Encryption Certificates")), true, Gtk::MESSAGE_INFO);
m_avahi_progress_dialog->set_secondary_text(_("Please wait while Glom prepares your system for publishing over the network."));
......@@ -456,7 +456,7 @@ void AppWindow::on_menu_help_about()
{
//Re-create About box:
delete m_pAbout;
m_pAbout = 0;
m_pAbout = nullptr;
m_pAbout = new Gtk::AboutDialog;
......@@ -477,7 +477,7 @@ void AppWindow::on_menu_help_about()
//TODO: Use this, instead of the C API, when we can depend on gtkmm 3.12, with a try/catch:
//Glib::RefPtr<Gdk::Pixbuf> logo = Gdk::Pixbuf::create_from_resource(glom_icon_path);
GError* gerror = 0;
GError* gerror = nullptr;
Glib::RefPtr<Gdk::Pixbuf> logo =
Glib::wrap(gdk_pixbuf_new_from_resource(glom_icon_path.c_str(), &gerror));
if(gerror)
......@@ -594,13 +594,13 @@ void AppWindow::ui_warning_load_failed(int failure_code)
void AppWindow::open_browsed_document(const EpcServiceInfo* server, const Glib::ustring& service_name)
{
gsize length = 0;
gchar *document_contents = 0;
gchar *document_contents = nullptr;
bool keep_trying = true;
while(keep_trying)
{
//Request a password to attempt retrieval of the document over the network:
Dialog_Connection* dialog_connection = 0;
Dialog_Connection* dialog_connection = nullptr;
//Load the Glade file and instantiate its widgets to get the dialog stuff:
Utils::get_glade_widget_derived_with_warning(dialog_connection);
if(!dialog_connection)
......@@ -626,7 +626,7 @@ void AppWindow::open_browsed_document(const EpcServiceInfo* server, const Glib::
epc_consumer_set_username(consumer, username.c_str());
epc_consumer_set_password(consumer, password.c_str());
GError *error = 0;
GError *error = nullptr;
document_contents = (gchar*)epc_consumer_lookup(consumer, "document", &length, &error);
if(error)
{
......@@ -655,7 +655,7 @@ void AppWindow::open_browsed_document(const EpcServiceInfo* server, const Glib::
}
delete dialog_connection;
dialog_connection = 0;
dialog_connection = nullptr;
}
......@@ -1293,7 +1293,7 @@ void AppWindow::update_userlevel_ui()
bool AppWindow::offer_new_or_existing()
{
//Offer to load an existing document, or start a new one.
Dialog_ExistingOrNew* dialog_raw = 0;
Dialog_ExistingOrNew* dialog_raw = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog_raw);
std::shared_ptr<Dialog_ExistingOrNew> dialog(dialog_raw);
dialog->set_transient_for(*this);
......@@ -2141,7 +2141,7 @@ Glib::ustring AppWindow::ui_file_select_save(const Glib::ustring& old_file_uri)
AppWindow& app = *this;
std::shared_ptr<Gtk::FileChooserDialog> fileChooser_Save;
Glom::FileChooserDialog_SaveExtras* fileChooser_SaveExtras = 0;
Glom::FileChooserDialog_SaveExtras* fileChooser_SaveExtras = nullptr;
//Create the appropriate dialog, depending on how the caller set m_ui_save_extra_showextras:
if(m_ui_save_extra_showextras)
......@@ -2357,7 +2357,7 @@ void AppWindow::stop_self_hosting_of_document_database()
void AppWindow::on_menu_developer_changelanguage()
{
Dialog_ChangeLanguage* dialog = 0;
Dialog_ChangeLanguage* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return;
......@@ -2899,7 +2899,7 @@ AppWindow::enumSaveChanges AppWindow::ui_offer_to_save_changes()
GlomBakery::Dialog_OfferSave::enumButtons buttonClicked = (GlomBakery::Dialog_OfferSave::enumButtons)pDialogQuestion->run();
delete pDialogQuestion;
pDialogQuestion = 0;
pDialogQuestion = nullptr;
if(buttonClicked == GlomBakery::Dialog_OfferSave::BUTTON_Save)
result = GlomBakery::AppWindow_WithDoc::SAVECHANGES_Save;
......
......@@ -30,7 +30,7 @@ AppWindow_WithDoc::type_list_strings AppWindow_WithDoc::m_mime_types;
AppWindow_WithDoc::AppWindow_WithDoc(const Glib::ustring& appname)
: AppWindow(appname),
m_pDocument(0),
m_pDocument(nullptr),
m_bCloseAfterSave(false)
{
}
......@@ -39,7 +39,7 @@ AppWindow_WithDoc::~AppWindow_WithDoc()
{
//Delete the document:
delete m_pDocument; //This will cause Document::signal_forget to be emitted, so the Views will then null their pointers as well. A smartpointer might be a better way to do this.
m_pDocument = 0;
m_pDocument = nullptr;
}
//static
......@@ -155,7 +155,7 @@ bool AppWindow_WithDoc::open_document(const Glib::ustring& file_uri)
//re-initialize document.
delete pApp->m_pDocument;
pApp->m_pDocument = 0;
pApp->m_pDocument = nullptr;
pApp->init_create_document();
return false; //failed.
......
......@@ -88,7 +88,7 @@ private:
Base_DB::Base_DB()
{
//m_pDocument = 0;
//m_pDocument = nullptr;
}
Base_DB::~Base_DB()
......@@ -329,7 +329,7 @@ Glib::RefPtr<Gnome::Gda::Connection> Base_DB::get_connection()
if(!sharedconnection)
{
std::cerr << G_STRFUNC << ": No connection yet." << std::endl;
return Glib::RefPtr<Gnome::Gda::Connection>(0);
return Glib::RefPtr<Gnome::Gda::Connection>();
}
Glib::RefPtr<Gnome::Gda::Connection> gda_connection = sharedconnection->get_gda_connection();
......@@ -348,7 +348,7 @@ std::shared_ptr<LayoutItem_Field> Base_DB::offer_field_list_select_one_field(con
{
std::shared_ptr<LayoutItem_Field> result;
Dialog_ChooseField* dialog = 0;
Dialog_ChooseField* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......@@ -378,7 +378,7 @@ Base_DB::type_list_field_items Base_DB::offer_field_list(const Glib::ustring& ta
{
type_list_field_items result;
Dialog_ChooseField* dialog = 0;
Dialog_ChooseField* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......@@ -432,7 +432,7 @@ std::shared_ptr<LayoutItem_Field> Base_DB::offer_field_formatting(const std::sha
{
std::shared_ptr<LayoutItem_Field> result;
Dialog_FieldLayout* dialog = 0;
Dialog_FieldLayout* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......@@ -463,7 +463,7 @@ std::shared_ptr<LayoutItem_Text> Base_DB::offer_textobject(const std::shared_ptr
{
std::shared_ptr<LayoutItem_Text> result = start_textobject;
Dialog_TextObject* dialog = 0;
Dialog_TextObject* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......@@ -489,7 +489,7 @@ std::shared_ptr<LayoutItem_Image> Base_DB::offer_imageobject(const std::shared_p
{
std::shared_ptr<LayoutItem_Image> result = start_imageobject;
Dialog_ImageObject* dialog = 0;
Dialog_ImageObject* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......@@ -515,7 +515,7 @@ std::shared_ptr<LayoutItem_Notebook> Base_DB::offer_notebook(const std::shared_p
{
std::shared_ptr<LayoutItem_Notebook> result = start_notebook;
Dialog_Notebook* dialog = 0;
Dialog_Notebook* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return result;
......
......@@ -40,11 +40,11 @@ Box_Reports::Box_Reports(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builde
m_colTitle(0)
{
//Get the Glade-instantiated widgets, and connect signal handlers:
Gtk::Button* pButtonCancel = 0;
Gtk::Button* pButtonCancel = nullptr;
builder->get_widget("button_cancel", pButtonCancel);
set_button_cancel(*pButtonCancel);
Gtk::Box* pAddDelParent = 0;
Gtk::Box* pAddDelParent = nullptr;
builder->get_widget("vbox_adddel_parent", pAddDelParent);
pAddDelParent->pack_start(m_AddDel);
......
......@@ -35,7 +35,7 @@ Box_WithButtons::Box_WithButtons()
m_Box_Buttons(Gtk::ORIENTATION_HORIZONTAL, UiUtils::DEFAULT_SPACING_SMALL),
m_Button_Cancel(_("_Cancel"))
{
//m_pDocument = 0;
//m_pDocument = nullptr;
//set_border_width(UiUtils::DEFAULT_SPACING_SMALL);
set_spacing(UiUtils::DEFAULT_SPACING_SMALL);
......@@ -49,7 +49,7 @@ Box_WithButtons::Box_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk
m_Box_Buttons(Gtk::ORIENTATION_HORIZONTAL, UiUtils::DEFAULT_SPACING_SMALL),
m_Button_Cancel(_("_Cancel"))
{
//m_pDocument = 0;
//m_pDocument = nullptr;
//set_border_width(UiUtils::DEFAULT_SPACING_SMALL);
set_spacing(UiUtils::DEFAULT_SPACING_SMALL);
......
......@@ -40,11 +40,11 @@ const bool Dialog_Connection::glade_developer(false);
Dialog_Connection::Dialog_Connection(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: Gtk::Dialog(cobject),
Base_DB(),
m_entry_host(0),
m_entry_user(0),
m_entry_password(0),
m_label_database(0),
m_label_note(0)
m_entry_host(nullptr),
m_entry_user(nullptr),
m_entry_password(nullptr),
m_label_database(nullptr),
m_label_note(nullptr)
{
builder->get_widget("entry_host", m_entry_host);
builder->get_widget("entry_user", m_entry_user);
......@@ -63,7 +63,7 @@ std::shared_ptr<SharedConnection> Dialog_Connection::connect_to_server_with_conn
//TODO: BusyCursor busy_cursor(get_app_window());
std::shared_ptr<SharedConnection> result(0);
std::shared_ptr<SharedConnection> result;
ConnectionPool* connection_pool = ConnectionPool::get_instance();
g_assert(connection_pool);
......
......@@ -114,7 +114,7 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
{
#ifdef GLOM_ENABLE_CLIENT_ONLY
//Don't mention creation of new documents in client-only mode:
Gtk::Label* label = 0;
Gtk::Label* label = nullptr;
builder->get_widget("existing_or_new_label", label);
label->set_text(_("Open a Document"));
#endif //GLOM_ENABLE_CLIENT_ONLY
......@@ -294,7 +294,7 @@ Dialog_ExistingOrNew::~Dialog_ExistingOrNew()
if(m_service_monitor)
{
g_object_unref(m_service_monitor);
m_service_monitor = 0;
m_service_monitor = nullptr;
}
// Release the service infos in the treestore
......
......@@ -34,7 +34,7 @@ const bool Dialog_InvalidData::glade_developer(false);
*/
bool glom_show_dialog_invalid_data(Field::glom_field_type glom_type)
{
Dialog_InvalidData* dialog = 0;
Dialog_InvalidData* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return false;
......@@ -49,7 +49,7 @@ bool glom_show_dialog_invalid_data(Field::glom_field_type glom_type)
Dialog_InvalidData::Dialog_InvalidData(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: Gtk::Dialog(cobject),
m_label(0)
m_label(nullptr)
{
builder->get_widget("label_example_data", m_label);
}
......
......@@ -32,9 +32,9 @@ FileChooser_Export::FileChooser_Export()
m_extra_widget(Gtk::ORIENTATION_HORIZONTAL, UiUtils::DEFAULT_SPACING_SMALL),
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_button_format(_("Define Data _Format"), true /* use mnenomic */),
m_pDialogLayout(0),
m_pDialogLayout(nullptr),
#endif //GLOM_ENABLE_CLIENT_ONLY
m_document(0)
m_document(nullptr)
{
add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
add_button(_("_Export"), Gtk::RESPONSE_OK);
......@@ -52,7 +52,7 @@ FileChooser_Export::FileChooser_Export()
#ifndef GLOM_ENABLE_CLIENT_ONLY
//TODO: Use a generic layout dialog?
Dialog_Layout_Export* dialog = 0;
Dialog_Layout_Export* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog)
return;
......@@ -67,7 +67,7 @@ FileChooser_Export::~FileChooser_Export()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
delete m_pDialogLayout;
m_pDialogLayout = 0;
m_pDialogLayout = nullptr;
#endif //GLOM_ENABLE_CLIENT_ONLY
}
......
......@@ -73,29 +73,29 @@ namespace Glom
Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: PlaceHolder(cobject, builder),
m_pLabel_Table_DataMode(0),
m_pLabel_Table_FindMode(0),
m_pLabel_Table_DataMode(nullptr),
m_pLabel_Table_FindMode(nullptr),
m_Box_RecordsCount(Gtk::ORIENTATION_HORIZONTAL, UiUtils::DEFAULT_SPACING_SMALL),
m_Button_FindAll(_("Find All")),
m_stack_mode(0),
m_pBox_Tables(0),
m_pDialog_Tables(0),
m_pBox_QuickFind(0),
m_pEntry_QuickFind(0),
m_pButton_QuickFind(0),
m_stack_mode(nullptr),
m_pBox_Tables(nullptr),
m_pDialog_Tables(nullptr),
m_pBox_QuickFind(nullptr),
m_pEntry_QuickFind(nullptr),
m_pButton_QuickFind(nullptr),
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_pDialog_Reports(0),
m_pDialogLayoutReport(0),
m_pBox_Reports(0),
m_pDialog_PrintLayouts(0),
m_pDialogLayoutPrint(0),
m_pBox_PrintLayouts(0),
m_pDialog_Fields(0),
m_pDialog_Relationships(0),
m_dialog_addrelatedtable(0),
m_window_relationships_overview(0),
m_pDialog_Reports(nullptr),
m_pDialogLayoutReport(nullptr),
m_pBox_Reports(nullptr),
m_pDialog_PrintLayouts(nullptr),
m_pDialogLayoutPrint(nullptr),
m_pBox_PrintLayouts(nullptr),
m_pDialog_Fields(nullptr),
m_pDialog_Relationships(nullptr),
m_dialog_addrelatedtable(nullptr),
m_window_relationships_overview(nullptr),
#endif // !GLOM_ENABLE_CLIENT_ONLY
m_pDialogConnection(0)
m_pDialogConnection(nullptr)
{
m_pLabel_Table_DataMode = Gtk::manage(new Gtk::Label(_("No Table Selected")));
m_pLabel_Table_DataMode->show();
......@@ -127,7 +127,7 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
m_pBox_QuickFind->show_all_children();
m_pBox_QuickFind->hide();
PlaceHolder* placeholder_quickfind = 0;
PlaceHolder* placeholder_quickfind = nullptr;
builder->get_widget_derived("vbox_quickfind", placeholder_quickfind);
if(placeholder_quickfind)
placeholder_quickfind->add(*m_pBox_QuickFind);
......@@ -180,7 +180,7 @@ Frame_Glom::~Frame_Glom()
remove_view(m_pBox_Tables);
delete m_pDialog_Tables;
m_pDialog_Tables = 0;
m_pDialog_Tables = nullptr;
remove_view(&m_Notebook_Data); //Also a composite view.
remove_view(&m_Notebook_Find); //Also a composite view.
......@@ -190,7 +190,7 @@ Frame_Glom::~Frame_Glom()
{
remove_view(m_pDialogConnection);
delete m_pDialogConnection;
m_pDialogConnection = 0;
m_pDialogConnection = nullptr;
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
......@@ -204,42 +204,42 @@ Frame_Glom::~Frame_Glom()
{
remove_view(m_pDialog_Relationships);
delete m_pDialog_Relationships;
m_pDialog_Relationships = 0;
m_pDialog_Relationships = nullptr;
}
if(m_pDialogLayoutReport)
{
remove_view(m_pDialogLayoutReport);
delete m_pDialogLayoutReport;
m_pDialogLayoutReport = 0;
m_pDialogLayoutReport = nullptr;
}
if(m_pDialogLayoutPrint)
{
remove_view(m_pDialogLayoutPrint);
delete m_pDialogLayoutPrint;
m_pDialogLayoutPrint = 0;
m_pDialogLayoutPrint = nullptr;
}
if(m_pDialog_Fields)
{
remove_view(m_pDialog_Fields);
delete m_pDialog_Fields;
m_pDialog_Fields = 0;
m_pDialog_Fields = nullptr;
}
if(m_dialog_addrelatedtable)
{
remove_view(m_dialog_addrelatedtable);
delete m_dialog_addrelatedtable;
m_dialog_addrelatedtable = 0;
m_dialog_addrelatedtable = nullptr;
}
if(m_window_relationships_overview)
{
remove_view(m_window_relationships_overview);
delete m_window_relationships_overview;
m_window_relationships_overview = 0;
m_window_relationships_overview = nullptr;
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
}
......@@ -749,7 +749,7 @@ void Frame_Glom::on_menu_file_import()
{
file_chooser.hide();
Dialog_Import_CSV* dialog = 0;
Dialog_Import_CSV* dialog = nullptr;
Glom::Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return;
......@@ -761,7 +761,7 @@ void Frame_Glom::on_menu_file_import()
{
dialog->hide();
Dialog_Import_CSV_Progress* progress_dialog = 0;
Dialog_Import_CSV_Progress* progress_dialog = nullptr;
Glom::Utils::get_glade_widget_derived_with_warning(progress_dialog);
int response = Gtk::RESPONSE_OK;
if(!progress_dialog)
......@@ -778,7 +778,7 @@ void Frame_Glom::on_menu_file_import()
remove_view(progress_dialog);
delete progress_dialog;
progress_dialog = 0;
progress_dialog = nullptr;
// Force update from database so the newly added entries are shown
show_table_refresh();
......@@ -1095,7 +1095,7 @@ void Frame_Glom::on_menu_Tables_AddRelatedTable()
{
remove_view(m_dialog_addrelatedtable);
delete m_dialog_addrelatedtable;
m_dialog_addrelatedtable = 0;
m_dialog_addrelatedtable = nullptr;
}
Utils::get_glade_widget_derived_with_warning(m_dialog_addrelatedtable);
......@@ -1538,7 +1538,7 @@ void Frame_Glom::load_from_document()
#ifndef GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::on_menu_developer_database_preferences()
{
Dialog_Database_Preferences* dialog = 0;
Dialog_Database_Preferences* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return;
......@@ -1656,7 +1656,7 @@ void Frame_Glom::on_menu_developer_relationships()
void Frame_Glom::on_menu_developer_users()
{
Dialog_GroupsList* dialog = 0;
Dialog_GroupsList* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return;
......@@ -1764,7 +1764,7 @@ void Frame_Glom::on_menu_developer_print_layouts()
void Frame_Glom::on_menu_developer_script_library()
{
Dialog_ScriptLibrary* dialog = 0;
Dialog_ScriptLibrary* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return;
......@@ -1936,7 +1936,7 @@ bool Frame_Glom::connection_request_initial_password(Glib::ustring& user, Glib::
return false;
//Ask for a new username and password to specify when creating a new self-hosted database.
Dialog_InitialPassword* dialog = 0;
Dialog_InitialPassword* dialog = nullptr;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog)
return false;
......@@ -1972,7 +1972,7 @@ bool Frame_Glom::connection_request_initial_password(Glib::ustring& user, Glib::
remove_view(dialog);
delete dialog;
dialog = 0;
dialog = nullptr;
return (response == Gtk::RESPONSE_OK);
}
......@@ -2279,7 +2279,7 @@ bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_foun
{
//We recreate the dialog each time to make sure it is clean of any changes:
delete m_pDialogConnection;
m_pDialogConnection = 0;
m_pDialogConnection = nullptr;
Utils::get_glade_widget_derived_with_warning(m_pDialogConnection);
if(!m_pDialogConnection)
......@@ -2307,7 +2307,7 @@ bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_foun
{
//Later, if m_pDialogConnection is null then we assume we should use the known user/password:
delete m_pDialogConnection;
m_pDialogConnection = 0;
m_pDialogConnection = nullptr;
}
......@@ -2391,7 +2391,7 @@ bool Frame_Glom::create_database(const Glib::ustring& database_name, const Glib:
if(!result)
{
//Tell the user:
Gtk::Dialog* dialog = 0;
Gtk::Dialog* dialog = nullptr;
Utils::get_glade_widget_with_warning("glom_developer.glade", "dialog_error_create_database", dialog);
if(!dialog)
{
......
......@@ -194,7 +194,7 @@ int main(int argc, char* argv[])
//Specify the backend and backend-specific details to be used by the connectionpool.
//This is usually done by ConnectionPool::setup_from_document():
Glom::ConnectionPoolBackends::Backend* backend = 0;
Glom::ConnectionPoolBackends::Backend* backend = nullptr;
#ifdef GLOM_ENABLE_MYSQL
if(group.m_arg_use_mysql)
{
......
......@@ -55,15 +55,11 @@ bool CsvParser::next_char_is_quote(const Glib::ustring::const_iterator& iter, co
}
CsvParser::CsvParser(const std::string& encoding_charset)
: m_raw(0),
m_encoding(encoding_charset),