mirror of
https://github.com/transmission/transmission
synced 2025-01-03 21:45:49 +00:00
9d313a8816
* refactor: const correctness * refactor: fix some implicit conversions * refactor: make local pointers const if their objects are not modified * refactor: do not cast away const in torrent-cell-renderer * refactor: remove call to deprecated gtk_icon_size_lookup_for_settings * refactor: member functions that do not mutate their objects should be declared const * chore: do not end comments with a semicolon
36 lines
693 B
C++
36 lines
693 B
C++
/*
|
|
* This file Copyright (C) 2012-2015 Mnemosyne LLC
|
|
*
|
|
* It may be used under the GNU GPL versions 2 or 3
|
|
* or any future license endorsed by Mnemosyne LLC.
|
|
*
|
|
*/
|
|
|
|
#include "AddData.h"
|
|
#include "Application.h"
|
|
#include "InteropObject.h"
|
|
|
|
InteropObject::InteropObject(QObject* parent) :
|
|
QObject(parent)
|
|
{
|
|
}
|
|
|
|
// NOLINTNEXTLINE(readability-identifier-naming)
|
|
bool InteropObject::PresentWindow() const
|
|
{
|
|
trApp->raise();
|
|
return true;
|
|
}
|
|
|
|
// NOLINTNEXTLINE(readability-identifier-naming)
|
|
bool InteropObject::AddMetainfo(QString const& metainfo) const
|
|
{
|
|
AddData addme(metainfo);
|
|
|
|
if (addme.type != addme.NONE)
|
|
{
|
|
trApp->addTorrent(addme);
|
|
}
|
|
|
|
return true;
|
|
}
|