From 3c37f74539cf870d563c44b92fc82852b5c46012 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 26 Oct 2017 18:45:08 +0000 Subject: fixed memory leaks and other errors git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7649 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/eqslider.cpp | 7 ++----- src/plugins/Ui/skinned/popupwidget.cpp | 5 ++--- src/plugins/Ui/skinned/windowsystem.cpp | 5 ++--- 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src/plugins/Ui/skinned') diff --git a/src/plugins/Ui/skinned/eqslider.cpp b/src/plugins/Ui/skinned/eqslider.cpp index 31e283155..41c824517 100644 --- a/src/plugins/Ui/skinned/eqslider.cpp +++ b/src/plugins/Ui/skinned/eqslider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2009 by Ilya Kotov * + * Copyright (C) 2006-2017 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -21,12 +21,9 @@ #include #include #include - #include "skin.h" - #include "eqslider.h" - EqSlider::EqSlider(QWidget *parent): PixmapWidget(parent) { m_skin = Skin::instance(); @@ -144,7 +141,7 @@ double EqSlider::convert(int p) void EqSlider::wheelEvent(QWheelEvent *e) { - m_value -= e->delta()/60; + m_value -= double(e->delta())/60; m_value = m_value > m_max ? m_max : m_value; m_value = m_value < m_min ? m_min : m_value; draw(false); diff --git a/src/plugins/Ui/skinned/popupwidget.cpp b/src/plugins/Ui/skinned/popupwidget.cpp index 533292c81..10fa811bc 100644 --- a/src/plugins/Ui/skinned/popupwidget.cpp +++ b/src/plugins/Ui/skinned/popupwidget.cpp @@ -85,15 +85,14 @@ void PopupWidget::mouseMoveEvent (QMouseEvent *) void PopupWidget::prepare(PlayListTrack *item, QPoint pos) { pos += QPoint(15,10); - - m_url = item->url(); hide(); if(!item) { m_timer->stop(); + m_url.clear(); return; } - + m_url = item->url(); m_label1->setText(m_formatter.format(item)); qApp->processEvents(); updateGeometry (); diff --git a/src/plugins/Ui/skinned/windowsystem.cpp b/src/plugins/Ui/skinned/windowsystem.cpp index a971214b3..e4489a250 100644 --- a/src/plugins/Ui/skinned/windowsystem.cpp +++ b/src/plugins/Ui/skinned/windowsystem.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Based on Licq * * Copyright (C) 2006-2009 Licq developers * - * Copyright (C) 2011-2016 Ilya Kotov * + * Copyright (C) 2011-2017 Ilya Kotov * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -180,7 +180,6 @@ unsigned char* WindowSystem::getWindowProperty(WId win, const char* prop) return NULL; // These are not needed for now. - retCheck = None; retFormat = 0; retItems = 0UL; @@ -219,7 +218,7 @@ void WindowSystem::revertGravity(WId win) sh.win_gravity = NorthWestGravity; else return; - sh.win_gravity = NorthWestGravity; + XSetWMNormalHints(dsp, win, &sh); XSetWindowAttributes xs; -- cgit v1.2.3-13-gbd6f