I think using "foo"in Q_EXPORT_PLUGIN2() should be fine.
For example the GIF image format plugin of Qt does it like this:
gif.pro:
TARGET = qgif
include(../../qpluginbase.pri)
TARGET = qgif
include(../../qpluginbase.pri)
To copy to clipboard, switch view to plain text mode
qpluginbase.pri:
TARGET = $$qtLibraryTarget($$TARGET)
TARGET = $$qtLibraryTarget($$TARGET)
To copy to clipboard, switch view to plain text mode
main.cpp:
Q_EXPORT_PLUGIN2(qgif, QGifPlugin)
Q_EXPORT_PLUGIN2(qgif, QGifPlugin)
To copy to clipboard, switch view to plain text mode
Bookmarks