How to change "default application" when opening a downloaded file in Opera

Problem: Using Opera 12 and higher with KDE in Ubuntu, the default handler for files in opera is different from what it is in Dolphin, etc. For example Preferences→Advanced→Downloads, "File type" dialog for application/pdf can list okular, but gimp will be used when double-clicking on it. KDE's default handler is set the same way to okular, but Opera does not seem to respect it. You've checked /usr/share/applications/defaults.list and .local/share/applications/mimeapps.list , They all seem to be fine.

Reason: Opera uses cached mimeinfo, aka /usr/share/applications/mimeinfo.cache

Fix: Edit gimp.desktop association (why would you edit PDF with gimp anyhow, right?):

sudo vi /usr/share/applications/gimp.desktop

And remove application/pdf statement to remove the association Rebuild the MIME cache:

sudo update-desktop-database

Restart Opera. Enjoy.

@Troubleshooting @Opera