chore: silence minor GTK warnings (#2034)

* chore: fix clang-diagnostic-suggest-destructor-override in makemeta-ui

* chore: fix Wunused-private-field in tr-prefs

* chore: fix clang-diagnostic-c++98-compat-extra-semi in tr-core.cc

* chore: fix clang-analyzer-deadcode.DeadStores in tr-core.cc

* chore: fix clang-diagnostic-exit-time-destructors for Glib::Quarks in details.cc
This commit is contained in:
Charles Kerr 2021-10-24 10:55:51 -05:00 committed by GitHub
parent 8c40fd8b39
commit 16acdf5934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 12 deletions

View File

@ -32,15 +32,6 @@
using namespace std::literals;
namespace
{
auto const TORRENT_ID_KEY = Glib::Quark("tr-torrent-id-key");
auto const TEXT_BUFFER_KEY = Glib::Quark("tr-text-buffer-key");
auto const URL_ENTRY_KEY = Glib::Quark("tr-url-entry-key");
} // namespace
class DetailsDialog::Impl
{
public:
@ -159,6 +150,10 @@ private:
std::vector<int> ids_;
Glib::RefPtr<TrCore> const core_;
sigc::connection periodic_refresh_tag_;
Glib::Quark const TORRENT_ID_KEY = Glib::Quark("tr-torrent-id-key");
Glib::Quark const TEXT_BUFFER_KEY = Glib::Quark("tr-text-buffer-key");
Glib::Quark const URL_ENTRY_KEY = Glib::Quark("tr-url-entry-key");
};
std::vector<tr_torrent*> DetailsDialog::Impl::getTorrents() const

View File

@ -32,7 +32,7 @@ public:
tr_metainfo_builder& builder,
std::string const& target,
Glib::RefPtr<TrCore> const& core);
~MakeProgressDialog();
~MakeProgressDialog() override;
private:
bool onProgressDialogRefresh();

View File

@ -178,7 +178,7 @@ TorrentModelColumns::TorrentModelColumns()
add(trackers);
add(error);
add(active_peer_count);
};
}
TorrentModelColumns const torrent_cols;
@ -1209,7 +1209,6 @@ bool TrCore::Impl::add_file(Glib::RefPtr<Gio::File> const& file, bool do_start,
if (gtr_is_hex_hashcode(str))
{
auto const magnet = gtr_sprintf("magnet:?xt=urn:btih:%s", str);
tried = true;
loaded = !tr_ctorSetMetainfoFromMagnetLink(ctor, magnet.c_str());
}
}

View File

@ -55,9 +55,11 @@ private:
FreeSpaceLabel* freespace_label_ = nullptr;
#if 0
Gtk::Label* port_label_ = nullptr;
Gtk::Button* port_button_ = nullptr;
Gtk::SpinButton* port_spin_ = nullptr;
#endif
};
/**