Why isn't the constructor of Gtk::Application public?
- From: <phosit autistici org>
- To: gtkmm-list gnome org
- Subject: Why isn't the constructor of Gtk::Application public?
- Date: Tue, 28 Sep 2021 16:07:50 +0200
Hello
Most times Gtk::Application is only used like this:
auto app = Gtk::Application::create("org.example");
return app->make_window_and_run<MyWindow>(argc, argv);
If the constructor would be public we and the compiler wouldn't have to
deal with smart pointers:
Gtk::Application app("org.example");
return app.make_window_and_run<MyWindow>(argc, argv);
The Gtk::Application::create function just passes the argument to the
constructor and stores the Gtk::Application in a Glib::RefPtr. Is there
a reason why the constructor isn't public?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]