* BUG: Fix Clipboard.Paste() when there are both a text and a qt image in 
  the clipboard.


git-svn-id: svn://localhost/gambas/trunk@6587 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-10-29 21:49:45 +00:00
parent 05f31a83af
commit 3969699f20
2 changed files with 8 additions and 2 deletions

View file

@ -126,6 +126,7 @@ static void paste(const QMimeData *data, const char *fmt)
{
QString format;
QByteArray ba;
int type;
if (fmt)
format = fmt;
@ -138,7 +139,12 @@ static void paste(const QMimeData *data, const char *fmt)
return;
}
switch(get_type(data))
if (format.startsWith("text/"))
type = MIME_TEXT;
else
type = get_type(data);
switch(type)
{
case MIME_TEXT:
ba = data->data(format);

View file

@ -370,7 +370,7 @@ static void Font(GB_PAINT *d, int set, GB_FONT *font)
QFont f(*((CFONT *)(*font))->font);
PAINTER(d)->setFont(f);
// Strange bug of QT. Sometimes the font does not applies (cf. DrawTextShadow)
// Strange bug of QT. Sometimes the font does not apply (cf. DrawTextShadow)
if (f != PAINTER(d)->font())
{
f.fromString(f.toString());