OTHER: Fix memleak and fixed small bug in hideEvent handlers

When promoe was minimized or on a different virtual desktop when it was quit,
the visible setting of playlist and equalizer was set to false.
So even when those two were visible before switching to a different desktop
they where set to closed when promoe was started the next time
This commit is contained in:
Thomas Frauendorfer 2008-11-29 16:20:03 +01:00
parent 4df3266088
commit c7e1a7fa6b
8 changed files with 105 additions and 112 deletions

View file

@ -38,6 +38,7 @@ inline QString
decodeXmmsUrl (const QString &path)
{
QByteArray p_enc = path.toUtf8 ();
QString ret;
#if HAVE_XMMSV
// TODO: error checking...
xmmsv_t *v_enc = xmmsv_new_string (p_enc.constData ());
@ -46,15 +47,15 @@ decodeXmmsUrl (const QString &path)
const char *p;
unsigned int p_len;
xmmsv_get_bin (p_dec, reinterpret_cast<const unsigned char **>(&p), &p_len);
QString ret = QString::fromUtf8 (p, p_len);
ret = QString::fromUtf8 (p, p_len);
xmmsv_unref (p_dec);
// Free p?
return ret;
#else
char *p_dec = const_cast<char *> (xmmsc_result_decode_url (NULL, p_enc.constData ()));
return QString::fromUtf8 (p_dec);
ret = QString::fromUtf8 (p_dec);
free (p_dec);
#endif
return ret;
}