mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
Fix most of critical issues reported by Sonar (GTK client) (#2309)
* (C++) Macros should not be used to define constants * (C++) Memory should not be managed manually * (C++) "void*" should not be used in typedefs, member variables, function parameters or return type * (C++) When the "Rule-of-Zero" is not applicable, the "Rule-of-Five" should be followed * (C++) "switch" statements should have "default" clauses * (C++) "explicit" should be used on single-parameter constructors and conversiosn operators * (C++) Non-const global variables should not be used
This commit is contained in:
@@ -28,13 +28,17 @@
|
||||
#include <glibmm.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
||||
class Application : public Gtk::Application
|
||||
{
|
||||
public:
|
||||
Application(std::string const& config_dir, bool start_paused, bool is_iconified);
|
||||
~Application() override;
|
||||
|
||||
friend void gtr_actions_handler(Glib::ustring const& action_name, void* user_data);
|
||||
TR_DISABLE_COPY_MOVE(Application)
|
||||
|
||||
friend void gtr_actions_handler(Glib::ustring const& action_name, gpointer user_data);
|
||||
|
||||
protected:
|
||||
void on_startup() override;
|
||||
|
||||
Reference in New Issue
Block a user