What should I do so that Dolphin shows icons corresponding to these desktop files instead of previewing their text contents?
You should be able to fix this by going to Settings–>Configure Dolphin and find the tab that says “Previews” and then deselect “Desktop Files”. You might need to close the window and then reopen it.
I tried that. I even deleted ~/.thumbails directory. but the icons do not appear, regardless whether desktop file previews are enabled or not.
One interesting point: If I hit reload when inside the directory, the icons appear momentarily and vanish again.
My Dolphin version is 2.0.