Commit 1ba706f6 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port thumbnailer to new install location and embed metadata

parent 81660563
Pipeline #217263 passed with stage
in 1 minute and 58 seconds
......@@ -9,8 +9,5 @@ update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
install(PROGRAMS palapeli_servicemenu.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kio/servicemenus)
# thumbnail creator plugin
add_library(palathumbcreator MODULE thumbnail-creator.cpp)
kcoreaddons_add_plugin(palathumbcreator SOURCES thumbnail-creator.cpp INSTALL_NAMESPACE "kf${QT_MAJOR_VERSION}/thumbcreator")
target_link_libraries(palathumbcreator KF5::KIOCore KF5::KIOWidgets KF5::Archive)
install(TARGETS palathumbcreator DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES palathumbcreator.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR})
[Desktop Entry]
Type=Service
Name=Palapeli puzzles
Name[bs]=Palapeli slagalice
Name[ca]=Trencaclosques del Palapeli
Name[ca@valencia]=Trencaclosques de Palapeli
Name[cs]=Palapeli puzzle
Name[da]=Palapeli-puslespil
Name[de]=Palapeli-Puzzle
Name[el]=Palapeli puzzles
Name[en_GB]=Palapeli puzzles
Name[es]=Rompecabezas de Palapeli
Name[et]=Palapeli pusled
Name[eu]=Palapeli buru-hausgarriak
Name[fi]=Palapelit
Name[fr]=Puzzles Palapeli
Name[ga]=Puzail Palapeli
Name[gl]=Quebracabezas de Palapeli
Name[hu]=Palapeli-feladványok
Name[is]=Palapeli púsl
Name[it]=Puzzle per Palapeli
Name[kk]=Palapeli басқатырғышы
Name[km]=ល្បែង​ផ្គុំ​រូប​ Palapeli
Name[ko]=Palapeli 퍼즐
Name[lv]=Palapeli mīklas
Name[mr]=पालापेली कोडी
Name[nb]=Palapeli-puslespill
Name[nds]=Palapeli-Pusselspelen
Name[nl]=Palapeli puzzels
Name[nn]=Palapeli-puslespel
Name[pl]=Puzzle Palapeli
Name[pt]='Puzzles' do Palapeli
Name[pt_BR]=Quebra-cabeças do Palapeli
Name[ro]=Puzzle-uri Palapeli
Name[ru]=Головоломки Palapeli
Name[sk]=Palapeli puzzle
Name[sl]=Sestavljanke Palapeli
Name[sr]=Палапелијеве слагалице
Name[sr@ijekavian]=Палапелијеве слагалице
Name[sr@ijekavianlatin]=Palapelijeve slagalice
Name[sr@latin]=Palapelijeve slagalice
Name[sv]=Palapeli-pussel
Name[tr]=Palapeli yapbozları
Name[uk]=Складанки Palapeli
Name[x-test]=xxPalapeli puzzlesxx
Name[zh_CN]=Palapeli 拼图
Name[zh_TW]=Palapeli 謎題
ServiceTypes=ThumbCreator
MimeType=application/x-palapeli-puzzle;
CacheThumbnail=true
X-KDE-Library=palathumbcreator
{
"CacheThumbnail": true,
"KPlugin": {
"MimeTypes": [
"application/x-palapeli-puzzle"
],
"Name": "Palapeli puzzles"
}
}
......@@ -26,6 +26,13 @@ extern "C"
}
}
class KIOPluginForMetaData : public QObject
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "KIOPluginForMetaData" FILE "palathumbcreator.json")
};
bool Palapeli::ThumbCreator::create(const QString& path, int width, int height, QImage& image)
{
Q_UNUSED(width) Q_UNUSED(height) //NOTE: The ThumbCreator APIDOX says that these params should be ignored for images read from the disk.
......@@ -41,3 +48,5 @@ bool Palapeli::ThumbCreator::create(const QString& path, int width, int height,
image.load(cachePath + QLatin1String("image.jpg"));
return true;
}
#include "thumbnail-creator.moc"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment