1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr1524' into back_in_the_game

Conflicts:
	src/widget/form/groupchatform.cpp
This commit is contained in:
tux3 2015-04-24 23:04:04 +02:00
commit 8b6ef7ab9d
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
4 changed files with 16 additions and 15 deletions

View File

@ -244,17 +244,17 @@ void ChatLine::moveBy(qreal deltaY)
bbox.moveTop(bbox.top() + deltaY);
}
bool ChatLine::lessThanBSRectTop(const ChatLine::Ptr lhs, const qreal rhs)
bool ChatLine::lessThanBSRectTop(const ChatLine::Ptr& lhs, const qreal& rhs)
{
return lhs->sceneBoundingRect().top() < rhs;
}
bool ChatLine::lessThanBSRectBottom(const ChatLine::Ptr lhs, const qreal rhs)
bool ChatLine::lessThanBSRectBottom(const ChatLine::Ptr& lhs, const qreal& rhs)
{
return lhs->sceneBoundingRect().bottom() < rhs;
}
bool ChatLine::lessThanRowIndex(const ChatLine::Ptr lhs, const ChatLine::Ptr rhs)
bool ChatLine::lessThanRowIndex(const ChatLine::Ptr& lhs, const ChatLine::Ptr& rhs)
{
return lhs->getRow() < rhs->getRow();
}

View File

@ -82,9 +82,9 @@ public:
bool isOverSelection(QPointF scenePos);
//comparators
static bool lessThanBSRectTop(const ChatLine::Ptr lhs, const qreal rhs);
static bool lessThanBSRectBottom(const ChatLine::Ptr lhs, const qreal rhs);
static bool lessThanRowIndex(const ChatLine::Ptr lhs, const ChatLine::Ptr rhs);
static bool lessThanBSRectTop(const ChatLine::Ptr& lhs, const qreal& rhs);
static bool lessThanBSRectBottom(const ChatLine::Ptr& lhs, const qreal& rhs);
static bool lessThanRowIndex(const ChatLine::Ptr& lhs, const ChatLine::Ptr& rhs);
protected:
friend class ChatLog;

View File

@ -36,13 +36,15 @@ CameraWorker::~CameraWorker()
}
void CameraWorker::onStart()
{
if (!clock)
{
clock = new QTimer(this);
clock->setSingleShot(false);
clock->setInterval(1000/60);
connect(clock, &QTimer::timeout, this, &CameraWorker::doWork);
}
emit started();
}

View File

@ -64,11 +64,10 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
namesListLayout = new FlowLayout(0,5,0);
QStringList names(group->getPeerList());
QLabel *l;
for (const QString& name : names)
{
l = new QLabel(name);
QLabel *l = new QLabel(name);
l->setTextFormat(Qt::PlainText);
namesListLayout->addWidget(l);
}