> On Oct. 22, 2015, 7:30 a.m., David Faure wrote: > > src/widgets/kopenwithdialog.cpp, line 911 > > <https://git.reviewboard.kde.org/r/125691/diff/1/?file=411558#file411558line911> > > > > How about changing this condition to > > (...) && !qMimeType.isEmpty() ? > > > > If there is no mimetype to "remember" then there is little point in > > creating a .desktop file in the first place, right? > > > > And this avoids yet another code path at the end with the "else" you > > had to add. > > > > > > Actually... if mimetype is empty, then bRemember has to be false (the > > checkbox isn't even shown). So I suppose createDesktopFile is true because > > saveNewApps is true? > > > > Or is there a problem of isNull vs isEmpty in line 676?
Yes, saveNewApps is true and no remember checkbox is visible. It calls the addToMimeAppsList and then it hits assert there. - David ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125691/#review87244 ----------------------------------------------------------- On Oct. 18, 2015, 4:09 p.m., David Rosca wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125691/ > ----------------------------------------------------------- > > (Updated Oct. 18, 2015, 4:09 p.m.) > > > Review request for KDE Frameworks. > > > Repository: kio > > > Description > ------- > > If qMimeType is empty, addToMimeAppsList shouldn't be called. > > > Diffs > ----- > > src/widgets/kopenwithdialog.cpp c60a193 > > Diff: https://git.reviewboard.kde.org/r/125691/diff/ > > > Testing > ------- > > opening new KOpenWithDialog() without mimeType and typing eg "dolphin" to > exec line now correctly returns valid KService. > > > Thanks, > > David Rosca > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel