mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Installing also plugins into /usr/lib/qupzilla/ on Linux.
This commit is contained in:
parent
ef4fef4699
commit
48112e0576
|
@ -4,8 +4,11 @@ mac {
|
|||
|
||||
bundle_target.files += $$PWD/bin/locale
|
||||
bundle_target.files += $$PWD/bin/themes
|
||||
bundle_target.files += $$PWD/bin/plugins
|
||||
bundle_target.path = Contents/Resources
|
||||
|
||||
bundle_target2.files += $$PWD/bin/
|
||||
|
||||
QMAKE_BUNDLE_DATA += bundle_target
|
||||
}
|
||||
|
||||
|
@ -32,6 +35,9 @@ mac {
|
|||
targetlib.files = $$PWD/bin/libqupzilla*
|
||||
targetlib.path = $$library_folder
|
||||
|
||||
targetplugins.files = $$PWD/bin/plugins/*.so
|
||||
targetplugins.path = "$$library_folder"/qupzilla/
|
||||
|
||||
target1.files += $$PWD/bin/locale
|
||||
target1.files += $$PWD/bin/themes
|
||||
target1.path = $$data_folder
|
||||
|
@ -60,6 +66,6 @@ mac {
|
|||
ico256.files = $$PWD/linux/hicolor/256x256/apps/qupzilla.png
|
||||
ico256.path = $$hicolor_folder/256x256/apps
|
||||
|
||||
INSTALLS += target targetlib target1 target2 target3
|
||||
INSTALLS += target targetlib targetplugins target1 target2 target3
|
||||
INSTALLS += ico16 ico32 ico48 ico64 ico128 ico256
|
||||
}
|
||||
|
|
|
@ -8,6 +8,14 @@ TARGET = ExamplePlugin
|
|||
|
||||
SOURCES += testplugin.cpp
|
||||
HEADERS += testplugin.h
|
||||
RESOURCES += data.qrc
|
||||
RESOURCES += \
|
||||
testplugin.qrc
|
||||
|
||||
TRANSLATIONS += cs_CZ.ts\
|
||||
sk_SK.ts\
|
||||
sr_BA.ts\
|
||||
sr_RS.ts\
|
||||
de_DE.ts\
|
||||
el_GR.ts\
|
||||
|
||||
include(../../plugins.pri)
|
||||
|
|
Binary file not shown.
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Příkladový doplněk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Ukázkový minimální doplněk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Velice jednoduchý minimální doplněk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="49"/>
|
||||
<location filename="testplugin.cpp" line="54"/>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation>Zavřít</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation>Nastavení ukázkového doplňku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Moje první akce z doplňku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Ahoj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>První akce funguje :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Beispiel-Plugin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Einfaches Beispiel-Plugin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Sehr einfaches Beispiel-Plugin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="49"/>
|
||||
<location filename="testplugin.cpp" line="54"/>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Meine erste Aktion</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Hallo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>Meine erste Aktion funktioniert :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Παράδειγμα προσθέτου</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Παράδειγμα απλού προσθέτου</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Πολύ απλό παράδειγμα απλού προσθέτου</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="49"/>
|
||||
<location filename="testplugin.cpp" line="54"/>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Η ενέργεια του πρώτου μου προσθέτου</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Γεια</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>Η ενέργεια του πρώτου προσθέτου δουλεύει :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Ukázkovy doplnek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Ukázkovy minimálny doplnek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Vel'mi jednoduchy minimálny doplnek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="49"/>
|
||||
<location filename="testplugin.cpp" line="54"/>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Moje první akce z doplnku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Ahoj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="64"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>První doplnek funguje :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Примjер прикључaк</translation>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Примјер минималног прикључка</translation>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Веома једноставан примјер прикључка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="52"/>
|
||||
<location filename="testplugin.cpp" line="57"/>
|
||||
<location filename="testplugin.cpp" line="62"/>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Моја прва радња прикључка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="67"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Здраво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="67"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>Прва радња прикључка ради :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,34 +4,27 @@
|
|||
<context>
|
||||
<name>TestPlugin</name>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="24"/>
|
||||
<source>Example Plugin</source>
|
||||
<translation>Пример прикључaк</translation>
|
||||
<location filename="testplugin.cpp" line="59"/>
|
||||
<source>Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="25"/>
|
||||
<source>Example minimal plugin</source>
|
||||
<translation>Пример минималног прикључка</translation>
|
||||
<location filename="testplugin.cpp" line="70"/>
|
||||
<source>Example Plugin Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.h" line="26"/>
|
||||
<source>Very simple minimal plugin example</source>
|
||||
<translation>Веома једноставан пример прикључка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="52"/>
|
||||
<location filename="testplugin.cpp" line="57"/>
|
||||
<location filename="testplugin.cpp" line="62"/>
|
||||
<location filename="testplugin.cpp" line="95"/>
|
||||
<source>My first plugin action</source>
|
||||
<translation>Моја прва радња прикључка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="67"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>Hello</source>
|
||||
<translation>Здраво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="testplugin.cpp" line="67"/>
|
||||
<location filename="testplugin.cpp" line="100"/>
|
||||
<source>First plugin action works :-)</source>
|
||||
<translation>Прва радња прикључка ради :-)</translation>
|
||||
</message>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
PluginSpec TestPlugin::pluginSpec()
|
||||
{
|
||||
PluginSpec spec;
|
||||
spec.name = tr("Example Plugin");
|
||||
spec.info = tr("Example minimal plugin");
|
||||
spec.description = tr("Very simple minimal plugin example");
|
||||
spec.name = "Example Plugin";
|
||||
spec.info = "Example minimal plugin";
|
||||
spec.description = "Very simple minimal plugin example";
|
||||
spec.version = "0.0.1";
|
||||
spec.author = "David Rosca <nowrep@gmail.com>";
|
||||
spec.icon = QIcon(":qupzilla.png");
|
||||
|
@ -48,7 +48,7 @@ bool TestPlugin::testPlugin()
|
|||
QTranslator* TestPlugin::getTranslator(const QString &locale)
|
||||
{
|
||||
QTranslator* translator = new QTranslator();
|
||||
translator->load(":/" + locale);
|
||||
translator->load(":/testplugin/" + locale);
|
||||
return translator;
|
||||
}
|
||||
|
||||
|
@ -56,15 +56,20 @@ void TestPlugin::showSettings(QWidget *parent)
|
|||
{
|
||||
QDialog* dialog = new QDialog(parent);
|
||||
QPushButton* b = new QPushButton("Example Plugin v0.0.1");
|
||||
QPushButton* closeButton = new QPushButton(tr("Close"));
|
||||
QLabel* label = new QLabel();
|
||||
label->setPixmap(QPixmap(":icons/other/about.png"));
|
||||
|
||||
QHBoxLayout* l = new QHBoxLayout(dialog);
|
||||
QVBoxLayout* l = new QVBoxLayout(dialog);
|
||||
l->addWidget(label);
|
||||
l->addWidget(b);
|
||||
l->addWidget(closeButton);
|
||||
dialog->setLayout(l);
|
||||
|
||||
dialog->resize(200, 200);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dialog->setWindowTitle("Example Plugin Settings");
|
||||
dialog->setWindowIcon(QIcon(":/qupzilla.png"));
|
||||
dialog->setWindowTitle(tr("Example Plugin Settings"));
|
||||
dialog->setWindowIcon(QIcon(":qupzilla.png"));
|
||||
connect(closeButton, SIGNAL(clicked()), dialog, SLOT(close()));
|
||||
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <QWebElement>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
class TestPlugin : public QObject, public PluginInterface
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<qresource prefix="/testplugin">
|
||||
<file>cs_CZ.qm</file>
|
||||
<file>sk_SK.qm</file>
|
||||
<file>sr_BA.qm</file>
|
||||
<file>sr_RS.qm</file>
|
||||
<file>de_DE.qm</file>
|
||||
<file>el_GR.qm</file>
|
||||
<file>de_DE.qm</file>
|
||||
<file>el_GR.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -1,8 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
lupdate ../plugins/TestPlugin/TestPlugin.pro -no-obsolete -ts ../plugins/TestPlugin/cs_CZ.ts
|
||||
|
||||
lupdate ../plugins/TestPlugin/TestPlugin.pro -no-obsolete -ts ../plugins/TestPlugin/sk_SK.ts
|
||||
lupdate ../plugins/TestPlugin/TestPlugin.pro -no-obsolete
|
||||
|
||||
read -p "Press [ENTER] to close terminal"
|
||||
exit
|
||||
|
|
|
@ -110,7 +110,6 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||
PROFILEDIR = QDir::homePath() + "/.qupzilla/";
|
||||
#endif
|
||||
|
||||
PLUGINSDIR = DATADIR + "plugins/";
|
||||
TRANSLATIONSDIR = DATADIR + "locale/";
|
||||
THEMESDIR = DATADIR + "themes/";
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ class MainApplication : public QtSingleApplication
|
|||
public:
|
||||
QString DATADIR;
|
||||
QString PROFILEDIR;
|
||||
QString PLUGINSDIR;
|
||||
QString TRANSLATIONSDIR;
|
||||
QString THEMESDIR;
|
||||
|
||||
|
|
|
@ -310,7 +310,6 @@ QString QupZillaSchemeReply::configPage()
|
|||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), mApp->DATADIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), mApp->THEMESDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
|
||||
|
||||
cPage.replace("%USER-AGENT%", mApp->getWindow()->weView()->webPage()->userAgentForUrl(QUrl()));
|
||||
|
|
|
@ -52,7 +52,7 @@ void Plugins::loadPlugin(Plugins::Plugin* plugin)
|
|||
refreshLoadedPlugins();
|
||||
}
|
||||
|
||||
void Plugins::unloadPlugin(Plugins::Plugin *plugin)
|
||||
void Plugins::unloadPlugin(Plugins::Plugin* plugin)
|
||||
{
|
||||
if (!plugin->isLoaded()) {
|
||||
return;
|
||||
|
@ -86,7 +86,7 @@ void Plugins::loadPlugins()
|
|||
m_pluginsLoaded = true;
|
||||
|
||||
QStringList dirs;
|
||||
dirs << mApp->PLUGINSDIR
|
||||
dirs << mApp->DATADIR + "plugins/"
|
||||
#ifdef Q_WS_X11
|
||||
<< "/usr/lib/qupzilla/"
|
||||
#endif
|
||||
|
@ -146,7 +146,7 @@ void Plugins::refreshLoadedPlugins()
|
|||
{
|
||||
m_loadedPlugins.clear();
|
||||
|
||||
foreach(const Plugin &plugin, m_availablePlugins) {
|
||||
foreach(const Plugin & plugin, m_availablePlugins) {
|
||||
if (plugin.isLoaded()) {
|
||||
m_loadedPlugins.append(plugin.instance);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
QList<Plugin> getAvailablePlugins() { return m_availablePlugins; }
|
||||
|
||||
void loadPlugin(Plugin* plugin);
|
||||
void unloadPlugin(Plugin *plugin);
|
||||
void unloadPlugin(Plugin* plugin);
|
||||
|
||||
public slots:
|
||||
void loadSettings();
|
||||
|
|
|
@ -183,7 +183,7 @@ void PluginsList::currentChanged(QListWidgetItem* item)
|
|||
ui->butSettings->setEnabled(showSettings);
|
||||
}
|
||||
|
||||
void PluginsList::itemChanged(QListWidgetItem *item)
|
||||
void PluginsList::itemChanged(QListWidgetItem* item)
|
||||
{
|
||||
if (!item) {
|
||||
return;
|
||||
|
|
|
@ -906,7 +906,7 @@ bool WebView::eventFilter(QObject* obj, QEvent* event)
|
|||
QTouchEvent::TouchPoint touchPoint;
|
||||
touchPoint.setState(Qt::TouchPointMoved);
|
||||
if ((ev->type() == QEvent::MouseButtonPress
|
||||
|| ev->type() == QEvent::MouseButtonDblClick)) {
|
||||
|| ev->type() == QEvent::MouseButtonDblClick)) {
|
||||
touchPoint.setState(Qt::TouchPointPressed);
|
||||
}
|
||||
else if (ev->type() == QEvent::MouseButtonRelease) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user