Fix template addition dialog from kdevfiletemplate plugin.
ClosedPublic

Authored by arrowd on Jan 11 2016, 6:29 PM.

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arrowd updated this revision to Diff 1882.Jan 11 2016, 6:29 PM
arrowd retitled this revision from to Fix template addition dialog from kdevfiletemplate plugin..
arrowd updated this object.
arrowd edited the test plan for this revision. (Show Details)
arrowd added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 11 2016, 6:29 PM
kfunk added a subscriber: kfunk.Jan 11 2016, 7:55 PM

Looks good to me

plugins/filetemplates/templateselectionpage.cpp
147–148

const QStringList filters = {a,b,c};

147–148

Nitpick: Remove newline

152

Early-return:

if (!dlg.exec) {
    return;
}

...
167

const&

arrowd updated this revision to Diff 1909.Jan 12 2016, 8:17 PM

Address comments.

arrowd marked 3 inline comments as done.Jan 12 2016, 8:19 PM
mwolff added a subscriber: mwolff.Jan 12 2016, 10:32 PM
mwolff added inline comments.
plugins/filetemplates/templateselectionpage.cpp
149

QStringLiteral

didn't we run clazy on kdevpkatform yet?

154

QStringLiteral

158

add braces please

arrowd updated this revision to Diff 1932.Jan 13 2016, 5:51 PM

Address comments.

arrowd marked 3 inline comments as done.Jan 13 2016, 5:51 PM

I still haven't found a way to add "All supported types" filter when using MIME types. Anyone aware of how to do this?

kfunk accepted this revision.Jan 13 2016, 9:05 PM
kfunk added a reviewer: kfunk.

Looks good to me in general

plugins/filetemplates/templateselectionpage.cpp
154

That line is redundant(?)

Doc: Calling setMimeTypeFilters overrides any previously set name filters, and changes the return value of nameFilters().

This revision is now accepted and ready to land.Jan 13 2016, 9:05 PM
kfunk added a comment.Jan 13 2016, 9:05 PM
In D791#15445, @arrowdodger wrote:

I still haven't found a way to add "All supported types" filter when using MIME types. Anyone aware of how to do this?

No idea, sorry.

This revision was automatically updated to reflect the committed changes.
arrowd marked an inline comment as done.Jan 15 2016, 9:32 AM
lnavet added a subscriber: lnavet.Jan 15 2016, 10:33 AM
lnavet added inline comments.
plugins/filetemplates/templateselectionpage.cpp
149

clazy just on shell and sublime subdirectory IIRC