mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
ColumnChooser - Drag&Drop problem with special Characters and QT 4.6.8
... the .toUTF8() conversion used with QT5.3.x to handle special characters (e.g. german Umlaute) in column chooser does not work for QT 4.8.6 (at least not for the Windows) - as a result (Drag&Drop from those fields into Columns or Search Field is not working) ... following the approach other places, changed approach to "serialization" of the info for "Drag&Drop" - so work independent on any QT conversions (which seem to depend on other conditions - change over time)
This commit is contained in:
@@ -290,7 +290,12 @@ SearchBox::dragEnterEvent(QDragEnterEvent *event)
|
||||
void
|
||||
SearchBox::dropEvent(QDropEvent *event)
|
||||
{
|
||||
QString name = event->mimeData()->data("application/x-columnchooser");
|
||||
QByteArray rawData = event->mimeData()->data("application/x-columnchooser");
|
||||
QDataStream stream(&rawData, QIODevice::ReadOnly);
|
||||
stream.setVersion(QDataStream::Qt_4_6);
|
||||
QString name;
|
||||
stream >> name;
|
||||
|
||||
// fugly, but it works for BikeScore with the (TM) in it... so...
|
||||
// independent of Latin1 or UTF-8 coming from "Column Chooser" the "TM" special sign is not recognized by the parser,
|
||||
// so strip the "TM" off for this case (only)
|
||||
|
||||
Reference in New Issue
Block a user