Change more things.
Things changed: - make getImageFileFormat case insensitive - use QTextEdit::dragEnterEvent instead of QAbstractScrollArea::dragEnterEvent, - Make dragEnterEvent() and dropEvent() overrides.
This commit is contained in:
@@ -16,7 +16,7 @@ QString getImageFileFormat(QString path)
|
||||
static QStringList listOfImageFormats = {".png", ".jpg", ".jpeg"};
|
||||
for (const QString &format : listOfImageFormats)
|
||||
{
|
||||
if (path.endsWith(format))
|
||||
if (path.endsWith(format, Qt::CaseInsensitive))
|
||||
{
|
||||
return format.mid(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user