PDA

View Full Version : Removing the unused plugins in the .pro file



zulunation
24th September 2014, 15:53
Hi all,

I'm using a static build of QT library.
I have a pro file where no plugins specified for the QTPLUGIN variable.
When i generate project file with qmake -tp vc name.pro there is .cpp file generated with Q_IMPORT_PLUGIN macroses.
There are the following plugins:



#include <QtPlugin>
Q_IMPORT_PLUGIN(AccessibleFactory)
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)
Q_IMPORT_PLUGIN(QDDSPlugin)
Q_IMPORT_PLUGIN(QICNSPlugin)
Q_IMPORT_PLUGIN(QICOPlugin)
Q_IMPORT_PLUGIN(QJp2Plugin)
Q_IMPORT_PLUGIN(QMngPlugin)
Q_IMPORT_PLUGIN(QTgaPlugin)
Q_IMPORT_PLUGIN(QTiffPlugin)
Q_IMPORT_PLUGIN(QWbmpPlugin)
Q_IMPORT_PLUGIN(QWebpPlugin)


I don't need image plugins so i want to remove them and it is better for me to specify the particular plugins in .pro file.
According to documentation it is a default plugins set.
When i try to disable it using QTPLUGIN.platforms = - the list remains the same.
QTPLUGIN.platforms = qminimal also doesn't change anything.
Maybe there is QT_PLUGIN_CLASS.<plugin> variable which responsible for that but i didn't found any description for that variable.

SO how could i remove particular plugins from the list?

wysota
26th September 2014, 11:58
Delete their entries from the cpp file. You are not going to call qmake with "-tp vc" param again so the list will not be regenerated.