silence warnings found by clang++

This commit is contained in:
Jordan Lee 2014-05-09 02:32:28 +00:00
parent 5d59b0e6ad
commit cd7e5291db
4 changed files with 6 additions and 21 deletions

View File

@ -291,7 +291,7 @@ MyApp :: onTorrentCompleted (int id)
if (tor)
{
if (myPrefs->getBool (Prefs::SHOW_NOTIFICATION_ON_COMPLETE))
notify (tr ("Torrent Completed"), tor->name ());
notifyApp (tr ("Torrent Completed"), tor->name ());
if (myPrefs->getBool (Prefs::COMPLETE_SOUND_ENABLED))
{
@ -315,7 +315,7 @@ MyApp :: onNewTorrentChanged (int id)
{
const int age_secs = tor->dateAdded ().secsTo (QDateTime::currentDateTime ());
if (age_secs < 30)
notify (tr ("Torrent Added"), tor->name ());
notifyApp (tr ("Torrent Added"), tor->name ());
disconnect (tor, SIGNAL (torrentChanged (int)), this, SLOT (onNewTorrentChanged (int)));
@ -459,7 +459,7 @@ MyApp :: raise ()
}
bool
MyApp :: notify (const QString& title, const QString& body) const
MyApp :: notifyApp (const QString& title, const QString& body) const
{
const QString dbusServiceName = QString::fromUtf8 ("org.freedesktop.Notifications");
const QString dbusInterfaceName = QString::fromUtf8 ("org.freedesktop.Notifications");

View File

@ -34,7 +34,7 @@ class MyApp: public QApplication
public:
void raise ();
bool notify (const QString& title, const QString& body) const;
bool notifyApp (const QString& title, const QString& body) const;
public:
Favicons favicons;

View File

@ -81,22 +81,6 @@ TrMainWindow :: getStockIcon (const QString& name, int fallback)
return icon;
}
namespace
{
QSize calculateTextButtonSizeHint (QPushButton * button)
{
QStyleOptionButton opt;
opt.initFrom (button);
QString s (button->text ());
if (s.isEmpty ())
s = QString::fromLatin1 ("XXXX");
QFontMetrics fm = button->fontMetrics ();
QSize sz = fm.size (Qt::TextShowMnemonic, s);
return button->style ()->sizeFromContents (QStyle::CT_PushButton, &opt, sz, button).expandedTo (QApplication::globalStrut ());
}
}
TrMainWindow :: TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model, bool minimized):
myLastFullUpdateTime (0),
mySessionDialog (new SessionDialog (session, prefs, this)),
@ -1170,6 +1154,7 @@ TrMainWindow :: newTorrent ()
void
TrMainWindow :: openTorrent ()
{
std::cerr << __FILE__ << ':' << __LINE__ << std::endl;
QFileDialog * d;
d = new QFileDialog (this,
tr ("Open Torrent"),

View File

@ -11,7 +11,7 @@ unix: INSTALLS += man
man.path = /share/man/man1/
man.files = transmission-qt.1
CONFIG += qt thread debug link_pkgconfig c++11
CONFIG += qt thread debug link_pkgconfig c++11 warn_on
QT += network dbus
PKGCONFIG = fontconfig libcurl openssl libevent