Changeset 14272


Ignore:
Timestamp:
May 9, 2014, 2:32:28 AM (8 years ago)
Author:
jordan
Message:

silence warnings found by clang++

Location:
trunk/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/app.cc

    r14225 r14272  
    292292    {
    293293      if (myPrefs->getBool (Prefs::SHOW_NOTIFICATION_ON_COMPLETE))
    294         notify (tr ("Torrent Completed"), tor->name ());
     294        notifyApp (tr ("Torrent Completed"), tor->name ());
    295295
    296296      if (myPrefs->getBool (Prefs::COMPLETE_SOUND_ENABLED))
     
    316316      const int age_secs = tor->dateAdded ().secsTo (QDateTime::currentDateTime ());
    317317      if (age_secs < 30)
    318         notify (tr ("Torrent Added"), tor->name ());
     318        notifyApp (tr ("Torrent Added"), tor->name ());
    319319
    320320      disconnect (tor, SIGNAL (torrentChanged (int)), this, SLOT (onNewTorrentChanged (int)));
     
    460460
    461461bool
    462 MyApp :: notify (const QString& title, const QString& body) const
     462MyApp :: notifyApp (const QString& title, const QString& body) const
    463463{
    464464  const QString dbusServiceName   = QString::fromUtf8 ("org.freedesktop.Notifications");
  • trunk/qt/app.h

    r14241 r14272  
    3535  public:
    3636    void raise ();
    37     bool notify (const QString& title, const QString& body) const;
     37    bool notifyApp (const QString& title, const QString& body) const;
    3838
    3939  public:
  • trunk/qt/mainwin.cc

    r14261 r14272  
    8181  return icon;
    8282}
    83 
    84 namespace
    85 {
    86   QSize calculateTextButtonSizeHint (QPushButton * button)
    87   {
    88     QStyleOptionButton opt;
    89     opt.initFrom (button);
    90     QString s (button->text ());
    91     if (s.isEmpty ())
    92       s = QString::fromLatin1 ("XXXX");
    93     QFontMetrics fm = button->fontMetrics ();
    94     QSize sz = fm.size (Qt::TextShowMnemonic, s);
    95     return button->style ()->sizeFromContents (QStyle::CT_PushButton, &opt, sz, button).expandedTo (QApplication::globalStrut ());
    96   }
    97 }
    98 
    9983
    10084TrMainWindow :: TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model, bool minimized):
     
    11711155TrMainWindow :: openTorrent ()
    11721156{
     1157std::cerr << __FILE__ << ':' << __LINE__ << std::endl;
    11731158  QFileDialog * d;
    11741159  d = new QFileDialog (this,
  • trunk/qt/qtr.pro

    r14254 r14272  
    1212man.files = transmission-qt.1
    1313
    14 CONFIG += qt thread debug link_pkgconfig c++11
     14CONFIG += qt thread debug link_pkgconfig c++11 warn_on
    1515QT += network dbus
    1616PKGCONFIG = fontconfig libcurl openssl libevent
Note: See TracChangeset for help on using the changeset viewer.