summaryrefslogtreecommitdiffstats
path: root/kfile-plugins
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:05:39 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:05:39 -0600
commitff94d46e423398804d2ae63faeb114c2cf604fc4 (patch)
tree4481ffd491d15ac15081cea46d7cc298ef6351a4 /kfile-plugins
parentb9553cef2a3cd9f5b89c8aca6f4b7781a079dbb7 (diff)
downloadtdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.tar.gz
tdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kfile-plugins')
-rw-r--r--kfile-plugins/CMakeLists.txt14
-rw-r--r--kfile-plugins/Makefile.am1
-rw-r--r--kfile-plugins/c++/CMakeLists.txt35
-rw-r--r--kfile-plugins/c++/Makefile.am22
-rw-r--r--kfile-plugins/c++/kfile_cpp.cpp130
-rw-r--r--kfile-plugins/c++/kfile_cpp.desktop60
-rw-r--r--kfile-plugins/c++/kfile_cpp.h41
-rw-r--r--kfile-plugins/c++/kfile_h.desktop58
-rw-r--r--kfile-plugins/diff/CMakeLists.txt34
-rw-r--r--kfile-plugins/diff/Makefile.am22
-rw-r--r--kfile-plugins/diff/kfile_diff.cpp610
-rw-r--r--kfile-plugins/diff/kfile_diff.desktop57
-rw-r--r--kfile-plugins/diff/kfile_diff.h53
-rw-r--r--kfile-plugins/ts/CMakeLists.txt35
-rw-r--r--kfile-plugins/ts/Makefile.am21
-rw-r--r--kfile-plugins/ts/kfile_ts.cpp93
-rw-r--r--kfile-plugins/ts/kfile_ts.desktop54
-rw-r--r--kfile-plugins/ts/kfile_ts.h40
18 files changed, 0 insertions, 1380 deletions
diff --git a/kfile-plugins/CMakeLists.txt b/kfile-plugins/CMakeLists.txt
deleted file mode 100644
index 6b769e5c..00000000
--- a/kfile-plugins/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-#################################################
-#
-# (C) 2012 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-add_subdirectory( diff )
-add_subdirectory( c++ )
-add_subdirectory( ts )
diff --git a/kfile-plugins/Makefile.am b/kfile-plugins/Makefile.am
deleted file mode 100644
index aa4d2f43..00000000
--- a/kfile-plugins/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS=diff c++ ts
diff --git a/kfile-plugins/c++/CMakeLists.txt b/kfile-plugins/c++/CMakeLists.txt
deleted file mode 100644
index 9b56e9d8..00000000
--- a/kfile-plugins/c++/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-#################################################
-#
-# (C) 2012 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${TDE_INCLUDE_DIR}
- ${TQT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-
-##### other data ################################
-
-install( FILES kfile_cpp.desktop kfile_h.desktop
- DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-##### kfile_cpp (module) ########################
-
-tde_add_kpart( kfile_cpp AUTOMOC
- SOURCES kfile_cpp.cpp
- LINK kio-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kfile-plugins/c++/Makefile.am b/kfile-plugins/c++/Makefile.am
deleted file mode 100644
index 4770b509..00000000
--- a/kfile-plugins/c++/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-## Makefile.am for c++ file meta info plugin
-
-# set the include path for X, qt and KDE
-INCLUDES = $(all_includes)
-
-# these are the headers for your project
-noinst_HEADERS = kfile_cpp.h
-
-kde_module_LTLIBRARIES = kfile_cpp.la
-
-kfile_cpp_la_SOURCES = kfile_cpp.cpp
-kfile_cpp_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_cpp_la_LIBADD = $(LIB_KIO)
-
-# let automoc handle all of the meta source files (moc)
-METASOURCES = AUTO
-
-messages:
- $(XGETTEXT) *.cpp -o $(podir)/kfile_cpp.pot
-
-services_DATA = kfile_cpp.desktop kfile_h.desktop
-servicesdir = $(kde_servicesdir)
diff --git a/kfile-plugins/c++/kfile_cpp.cpp b/kfile-plugins/c++/kfile_cpp.cpp
deleted file mode 100644
index 0840ab7f..00000000
--- a/kfile-plugins/c++/kfile_cpp.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Rolf Magnus <ramagnus@kde.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "kfile_cpp.h"
-
-#include <kurl.h>
-#include <klocale.h>
-#include <kgenericfactory.h>
-#include <kdebug.h>
-
-#include <tqfile.h>
-#include <tqregexp.h>
-
-typedef KGenericFactory<KCppPlugin> CppFactory;
-
-K_EXPORT_COMPONENT_FACTORY(kfile_cpp, CppFactory("kfile_cpp"))
-
-KCppPlugin::KCppPlugin(TQObject *parent, const char *name,
- const TQStringList &args)
- : KFilePlugin(parent, name, args)
-{
- kdDebug(7034) << "c++ plugin\n";
- makeMimeTypeInfo("text/x-c++src");
- makeMimeTypeInfo("text/x-chdr");
-}
-
-void KCppPlugin::makeMimeTypeInfo(const TQString& mimetype)
-{
- KFileMimeTypeInfo* info = addMimeTypeInfo( mimetype );
-
- KFileMimeTypeInfo::GroupInfo* group =
- addGroupInfo(info, "General", i18n("General"));
-
- KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Lines", i18n("Lines"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Code", i18n("Code"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Blank", i18n("Blank"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Strings", i18n("Strings"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "i18n Strings", i18n("i18n Strings"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Included Files", i18n("Included Files"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
-}
-
-bool KCppPlugin::readInfo( KFileMetaInfo& info, uint )
-{
- TQFile f(info.path());
- if (!f.open(IO_ReadOnly))
- return false;
-
- int codeLines = 0;
- int commentLines = 0;
- int totalLines = 0;
- int emptyLines = 0;
- int Strings = 0;
- int Stringsi18n = 0;
- int Includes = 0;
-
- bool inComment = false;
-
- TQString line;
-
- TQTextStream stream( &f );
- while (!stream.eof())
- {
- line = stream.readLine();
- totalLines++;
-
- if (line.stripWhiteSpace().isEmpty())
- {
- emptyLines++;
- continue;
- }
-
- if (line.contains("/*")) inComment = true;
-
- if (!inComment)
- {
- codeLines++;
- if (line.contains(TQRegExp("^\\s*#\\s*include"))) Includes++;
-
- int pos = line.find("//");
- if (pos>=0) commentLines++;
- // truncate the comment - we don't want to count strings in it
- line.truncate(pos);
-
- Strings+=line.contains(TQRegExp("\".*\""));
- Stringsi18n+=line.contains(TQRegExp("(?:i18n|I18N_NOOP)\\s*\\("));
- }
- else
- commentLines++;
-
- if (line.contains("*/")) inComment = false;
- }
-
- KFileMetaInfoGroup group = appendGroup(info, "General");
-
- appendItem(group, "Lines", int(totalLines));
- appendItem(group, "Code", int(codeLines));
- appendItem(group, "Comment", int(commentLines));
- appendItem(group, "Blank", int(emptyLines));
- appendItem(group, "Strings", int(Strings));
- appendItem(group, "i18n Strings", int(Stringsi18n));
- appendItem(group, "Included Files", int(Includes));
- return true;
-}
-
-#include "kfile_cpp.moc"
diff --git a/kfile-plugins/c++/kfile_cpp.desktop b/kfile-plugins/c++/kfile_cpp.desktop
deleted file mode 100644
index e550a223..00000000
--- a/kfile-plugins/c++/kfile_cpp.desktop
+++ /dev/null
@@ -1,60 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=C++ Info
-Name[af]=C++ Inligting
-Name[bg]=Изходен код на C++
-Name[br]=Titouroù C++
-Name[ca]=Informació C++
-Name[cs]=C++ info
-Name[cy]=Gwybodaeth C++
-Name[da]=C++-info
-Name[de]=C++-Info
-Name[el]=Πληροφορίες C++
-Name[eo]=C++-informo
-Name[es]=Info de C++
-Name[et]=C++ info
-Name[eu]=C++ informazioa
-Name[fa]=اطلاعات C++
-Name[fi]=C++-tiedot
-Name[fo]=C++-upplýsingar
-Name[fr]=Informations C++
-Name[ga]=Eolas C++
-Name[gl]=Información de C++
-Name[he]=מידע ++C
-Name[hi]=C++ जानकारी
-Name[hr]=C++ informacije
-Name[hu]=C++-jellemzők
-Name[is]=C++ upplýsingar
-Name[it]=Informazioni C++
-Name[ja]=C++ 情報
-Name[ka]=C++ ინფორმაცია
-Name[kk]=C++ мәліметі
-Name[lt]=C++ Informacija
-Name[ms]=Info C++
-Name[nds]=C++-Datei-Info
-Name[nl]=C++-info
-Name[nn]=C++-info
-Name[pa]=C++ ਜਾਣਕਾਰੀ
-Name[pl]=Informacja z C++
-Name[pt]=Informação de C++
-Name[pt_BR]=Informações C++
-Name[ro]=Informaţii C++
-Name[ru]=Информация C++
-Name[sk]=Informácie o C++
-Name[sl]=Informacije o C++
-Name[sr]=C++ информације
-Name[sr@Latn]=C++ informacije
-Name[sv]=C++-information
-Name[ta]= =C/C++ தகவல்
-Name[tg]=Ахбороти C++
-Name[th]=ข้อมูล C++
-Name[tr]=C++ Bilgisi
-Name[uk]=Інформація про C++
-Name[xh]=C++ Ulwazi
-Name[zh_CN]=C++ 信息
-Name[zh_TW]=C++ 資訊
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_cpp
-MimeType=text/x-c++src;text/x-chdr
-PreferredGroups=General
-PreferredItems=Lines,Code,Comment,Blank,Strings,i18n Strings,Included Files
diff --git a/kfile-plugins/c++/kfile_cpp.h b/kfile-plugins/c++/kfile_cpp.h
deleted file mode 100644
index 849dfabb..00000000
--- a/kfile-plugins/c++/kfile_cpp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Rolf Magnus <ramagnus@kde.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef __KFILE_CPP_H__
-#define __KFILE_CPP_H__
-
-#include <kfilemetainfo.h>
-#include <kurl.h>
-
-class TQStringList;
-
-class KCppPlugin: public KFilePlugin
-{
- Q_OBJECT
-
-
-public:
- KCppPlugin(TQObject *parent, const char *name, const TQStringList& args);
- virtual bool readInfo(KFileMetaInfo& info, uint what);
-
-private:
- void makeMimeTypeInfo(const TQString& mimetype);
-};
-
-#endif
diff --git a/kfile-plugins/c++/kfile_h.desktop b/kfile-plugins/c++/kfile_h.desktop
deleted file mode 100644
index 7eaa9ea6..00000000
--- a/kfile-plugins/c++/kfile_h.desktop
+++ /dev/null
@@ -1,58 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=C/C++ Header Info
-Name[af]=C/C++ Opskrif Inligting
-Name[bg]=Информация за заглавната част на C/C++
-Name[br]=Titouriñ diwar-benn ar reollin C/C++
-Name[ca]=Informació de capçaleres C/C++
-Name[cs]=Informace o C/C++ hlavičce
-Name[cy]=Gwybodaeth Pennawd C/C++
-Name[da]=C/C++-headerinfo
-Name[de]=C++-Header-Info
-Name[el]=Πληροφορίες κεφαλίδων C/C++
-Name[es]=Info de cabecera C/C++
-Name[et]=C/C++ päise info
-Name[eu]=C/C++ goiburuen informazioa
-Name[fa]=اطلاعات سرآیند C/C++
-Name[fi]=C/C++-otsikkotiedot
-Name[fr]=Informations d'en-tête C/C++
-Name[gl]=Información da cabeceira de C/C++
-Name[he]=מידע כותרות ++C/C
-Name[hi]=C/C++ हेडर जानकारी
-Name[hr]=Informacije o C++ zaglavljima
-Name[hu]=C/C++ header fájl jellemzői
-Name[is]=C/C++ haus upplýsingar
-Name[it]=Informazioni intestazioni C/C++
-Name[ja]=C/C++ ヘッダ情報
-Name[ka]=C/C++ ზედა კოლონტიტულის ინფორმაცია
-Name[kk]=C/C++ айдар мәліметі
-Name[lt]=C/C++ antraščių informacija
-Name[ms]=Info Pengepala C/C++
-Name[nb]=C++-deklarasjonsfilinfo
-Name[nds]=C/C++-Koppdatei-Info
-Name[ne]=C/C++ Header info
-Name[nl]=C/C++ Header-info
-Name[nn]=C/C++-deklarasjonsinfo
-Name[pa]=C/C++ Header ਜਾਣਕਾਰੀ
-Name[pl]=Informacja z nagłówka C/C++
-Name[pt]=Informações do Cabeçalho de C/C++
-Name[pt_BR]=Informações sobre Cabeçalhos C/C++
-Name[ro]=Informaţii antet C/C++
-Name[ru]=Информация о файлах заголовков C/C++
-Name[sk]=Informácie o hlavičkách C/C++
-Name[sl]=Informacije o glavi C/C++
-Name[sr]=Информације о C/C++ заглављу
-Name[sr@Latn]=Informacije o C/C++ zaglavlju
-Name[sv]=Information om C/C++-deklarationsfiler
-Name[ta]= =C/C++ தலைப்பு தகவல்
-Name[tg]=Ахборот дар бораи сарлавҳаи файлҳои C/C++
-Name[th]=ข้อมูลแฟ้มส่วนหัว C/C++
-Name[tr]=C/C++ Başlık Bilgisi
-Name[uk]=Інформація по заголовкам C++
-Name[xh]=C/C++ Ulwazi lokubhaliweyo okuphezulu
-Name[zh_CN]=C/C++ 头文件信息
-Name[zh_TW]=C/C++ 檔頭資訊
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_cpp
-MimeType=text/x-chdr
-PreferredItems=Lines,Code,Comment,Blank,Strings,i18n Strings,Included Files
diff --git a/kfile-plugins/diff/CMakeLists.txt b/kfile-plugins/diff/CMakeLists.txt
deleted file mode 100644
index 292372c3..00000000
--- a/kfile-plugins/diff/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-#################################################
-#
-# (C) 2012 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${TDE_INCLUDE_DIR}
- ${TQT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-
-##### other data ################################
-
-install( FILES kfile_diff.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-##### kfile_diff (module) #######################
-
-tde_add_kpart( kfile_diff AUTOMOC
- SOURCES kfile_diff.cpp
- LINK kio-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kfile-plugins/diff/Makefile.am b/kfile-plugins/diff/Makefile.am
deleted file mode 100644
index ea6cccc0..00000000
--- a/kfile-plugins/diff/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-## Makefile.am for diff file meta info plugin
-
-# set the include path for X, qt and KDE
-INCLUDES = $(all_includes)
-
-# these are the headers for your project
-noinst_HEADERS = kfile_diff.h
-
-kde_module_LTLIBRARIES = kfile_diff.la
-
-kfile_diff_la_SOURCES = kfile_diff.cpp
-kfile_diff_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_diff_la_LIBADD = $(LIB_KSYCOCA)
-
-# let automoc handle all of the meta source files (moc)
-METASOURCES = AUTO
-
-messages:
- $(XGETTEXT) *.cpp *.h -o $(podir)/kfile_diff.pot
-
-services_DATA = kfile_diff.desktop
-servicesdir = $(kde_servicesdir)
diff --git a/kfile-plugins/diff/kfile_diff.cpp b/kfile-plugins/diff/kfile_diff.cpp
deleted file mode 100644
index 957d0574..00000000
--- a/kfile-plugins/diff/kfile_diff.cpp
+++ /dev/null
@@ -1,610 +0,0 @@
-/**************************************************************************
-** kfile_diff.cpp
-** -------------------
-** begin : Sun Jan 20 23:25:44 2002
-** copyright : (C) 2002-2003 by Otto Bruggeman
-** email : otto.bruggeman@home.nl
-**
-***************************************************************************/
-/***************************************************************************
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-***************************************************************************/
-
-/*
-** Patch by Volker Augustin for empty diff files. Februari 8, 2002
-**
-** Patched to work with CVS from after February 26, 2002 Otto
-**
-** Patched to work with CVS from after March 24, 2002 Otto
-**
-** Added support for Perforce diffs, April 26, 2003 Otto Bruggeman
-**
-** Added support for Subversion diffs, September 11, 2003 Otto Bruggeman
-*/
-
-#include <tqcstring.h>
-#include <tqdatetime.h>
-#include <tqdict.h>
-#include <tqfile.h>
-#include <tqregexp.h>
-#include <tqvalidator.h>
-
-#include <kdebug.h>
-#include <kgenericfactory.h>
-#include <klocale.h>
-#include <kprocess.h>
-#include <kurl.h>
-
-#include "kfile_diff.h"
-
-K_EXPORT_COMPONENT_FACTORY(kfile_diff, KGenericFactory<KDiffPlugin>("kfile_diff"))
-
-KDiffPlugin::KDiffPlugin(TQObject *parent, const char *name,
- const TQStringList &preferredItems)
- : KFilePlugin(parent, name, preferredItems)
-{
- kdDebug(7034) << "diff plugin" << endl;
-
- KFileMimeTypeInfo* info = addMimeTypeInfo( "text/x-diff" );
-
- KFileMimeTypeInfo::GroupInfo* group;
- group = addGroupInfo( info, "General", i18n( "General" ) );
- addItemInfo( group, "Files", i18n( "Files" ), TQVariant::UInt );
- addItemInfo( group, "First", i18n( "First File" ), TQVariant::String );
- addItemInfo( group, "Format", i18n( "Format" ), TQVariant::String );
- addItemInfo( group, "DiffProgram", i18n( "Diff Program" ), TQVariant::String );
- addItemInfo( group, "Hunks", i18n( "Hunks" ), TQVariant::UInt );
- group = addGroupInfo( info, "Statistics", i18n( "Statistics" ) );
- addItemInfo( group, "Insert", i18n( "Insertions" ), TQVariant::UInt );
- addItemInfo( group, "Modify", i18n( "Changes" ), TQVariant::UInt );
- addItemInfo( group, "Delete", i18n( "Deletions" ), TQVariant::UInt );
-}
-
-bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
-{
- // This is a hack to avoid using the what stuff, since it is not yet implemented
- what = 0;
-
- // Used to determine if false or true should be returned
- bool dataSet = false;
-
- KFileMetaInfoGroup group;
-
- TQFile file( info.path() );
- TQStringList lines;
-
- if( file.open( IO_ReadOnly ) )
- {
- TQTextStream stream( &file );
- while (!stream.eof())
- {
- lines.append( stream.readLine() );
- }
- file.close();
- }
-
- TQString format;
- TQString program;
-
- enum KDiffPlugin::Format diffFormat;
- enum KDiffPlugin::DiffProgram diffProgram;
-
- diffFormat = determineDiffFormat ( lines );
-
- format = determineI18nedFormat( diffFormat );
-
- diffProgram = determineDiffProgram( lines );
-
- program = determineI18nedProgram( diffProgram );
-
- int numberOfAdditions = 0;
- int numberOfDeletions = 0;
- int numberOfChanges = 0;
- int numberOfHunks = 0;
- int numberOfFiles = 0;
-
-
- if ( what != KFileMetaInfo::Fastest )
- {
- determineDiffInfo( lines, diffFormat, &numberOfFiles, &numberOfHunks, &numberOfAdditions, &numberOfChanges, &numberOfDeletions );
- }
-
- TQString filename;
- TQRegExp firstFile( "^Index: (.*)" );
- TQStringList::ConstIterator it = lines.begin();
-
- it = lines.begin();
- while ( it != lines.end() )
- {
- if ( firstFile.exactMatch( (*it) ) )
- {
- filename = firstFile.cap(1);
- // only interested in the first filename
- break;
- }
- ++it;
- }
-
- kdDebug(7034) << "Diff Format : " << format << endl; // i18n-ed but that is not a problem unless i get i18n-ed debug output ah well, we'll figure something out when then happens
-
- if (what != KFileMetaInfo::Fastest )
- {
- // These dont get calculated in fastest mode...
- kdDebug(7034) << "Number of additions : " << numberOfAdditions << endl;
- kdDebug(7034) << "Number of deletions : " << numberOfDeletions << endl;
- kdDebug(7034) << "Number of changes : " << numberOfChanges << endl;
- kdDebug(7034) << "Number of hunks : " << numberOfHunks << endl;
- }
-
- group = appendGroup( info, "General" );
-
- if ( numberOfFiles != 0 && what != KFileMetaInfo::Fastest )
- {
- appendItem( group, "Files", numberOfFiles );
- dataSet = true;
- }
-
- if ( !filename.isEmpty() )
- {
- appendItem( group, "First", filename );
- dataSet = true;
- }
-
- if ( !format.isEmpty() )
- {
- appendItem( group, "Format", format );
- dataSet = true;
- }
-
- if ( !program.isEmpty() )
- {
- appendItem( group, "DiffProgram", program );
- dataSet = true;
- }
-
- if ( numberOfHunks != 0 && what != KFileMetaInfo::Fastest )
- {
- appendItem( group, "Hunks", numberOfHunks );
- dataSet = true;
- }
-
- group = appendGroup( info, "Statistics" );
-
- if ( numberOfAdditions != 0 && what != KFileMetaInfo::Fastest )
- {
- appendItem( group, "Insert", numberOfAdditions );
- dataSet = true;
- }
-
- if ( numberOfChanges != 0 && what != KFileMetaInfo::Fastest )
- {
- appendItem( group, "Modify", numberOfChanges );
- dataSet = true;
- }
-
- if ( numberOfDeletions != 0 && what != KFileMetaInfo::Fastest )
- {
- appendItem( group, "Delete", numberOfDeletions );
- dataSet = true;
- }
-
- return dataSet;
-}
-
-enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const TQStringList lines ) const
-{
- TQString line;
-
- if ( lines.count() == 0 )
- {
- return KDiffPlugin::Empty;
- }
-
- TQStringList::ConstIterator it = lines.begin();
-
- while ( it != lines.end() )
- {
- line = (*it);
- if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 )
- {
- return KDiffPlugin::Normal;
- }
- else if ( line.find( TQRegExp( "^--- " ), 0 ) == 0 )
- {
- // unified has first a '^--- ' line, then a '^+++ ' line
- return KDiffPlugin::Unified;
- }
- else if ( line.find( TQRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 )
- {
- // context has first a '^*** ' line, then a '^--- ' line
- return KDiffPlugin::Context;
- }
- else if ( line.find( TQRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 )
- {
- return KDiffPlugin::RCS;
- }
- else if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 )
- {
- return KDiffPlugin::Ed;
- }
- ++it;
- }
- return KDiffPlugin::Unknown;
-}
-
-enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const TQStringList lines ) const
-{
- if ( lines.count() == 0 )
- {
- return KDiffPlugin::Undeterminable;
- }
-
- TQStringList::ConstIterator it = lines.begin();
- // very crude, might need some more refining
- TQRegExp diffRE( "^diff .*" );
- TQRegExp p4sRE("^==== ");
-
- bool indexFound = false;
-
- while ( it != lines.end() )
- {
- if ( (*it).startsWith( "Index:" ) )
- indexFound = true;
- else if ( (*it).startsWith( "retrieving revision") )
- return KDiffPlugin::CVSDiff;
- else if ( diffRE.exactMatch( *it ) )
- return KDiffPlugin::Diff;
- else if ( p4sRE.exactMatch( *it ) )
- return KDiffPlugin::Perforce;
-
- ++it;
- }
-
- if ( indexFound ) // but no "retrieving revision" found like only cvs diff adds.
- return KDiffPlugin::SubVersion;
-
- return KDiffPlugin::Undeterminable;
-}
-
-const TQString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffFormat ) const
-{
- TQString format;
- switch( diffFormat )
- {
- case KDiffPlugin::Context:
- format = i18n( "Context" );
- break;
- case KDiffPlugin::Ed:
- format = i18n( "Ed" );
- break;
- case KDiffPlugin::Normal:
- format = i18n( "Normal" );
- break;
- case KDiffPlugin::RCS:
- format = i18n( "RCS" );
- break;
- case KDiffPlugin::Unified:
- format = i18n( "Unified" );
- break;
- case KDiffPlugin::Empty:
- format = i18n( "Not Available (file empty)" );
- break;
- case KDiffPlugin::Unknown:
- format = i18n( "Unknown" );
- break;
- case KDiffPlugin::SideBySide:
- format = i18n( "Side by Side" );
- }
- return format;
-}
-
-const TQString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const
-{
- TQString program;
-
- switch( diffProgram )
- {
- case KDiffPlugin::CVSDiff:
- program = i18n( "CVSDiff" );
- break;
- case KDiffPlugin::Diff:
- program = i18n( "Diff" );
- break;
- case KDiffPlugin::Diff3:
- program = i18n( "Diff3" );
- break;
- case KDiffPlugin::Perforce:
- program = i18n( "Perforce" );
- break;
- case KDiffPlugin::SubVersion:
- program = i18n( "SubVersion" );
- break;
- case KDiffPlugin::Undeterminable:
- program = i18n( "Unknown" );
- break;
- }
- return program;
-}
-
-void KDiffPlugin::determineDiffInfo( const TQStringList lines,
- enum KDiffPlugin::Format diffFormat,
- int* numberOfFiles,
- int* numberOfHunks,
- int* numberOfAdditions,
- int* numberOfChanges,
- int* numberOfDeletions )
-{
- TQString line;
-
- TQRegExp edAdd( "([0-9]+)(|,([0-9]+))a" );
- TQRegExp edDel( "([0-9]+)(|,([0-9]+))d" );
- TQRegExp edMod( "([0-9]+)(|,([0-9]+))c" );
-
- TQRegExp normalAdd( "[0-9]+a([0-9]+)(|,([0-9]+))" );
- TQRegExp normalDel( "([0-9]+)(|,([0-9]+))d(|[0-9]+)" );
- TQRegExp normalMod( "([0-9]+)(|,([0-9]+))c([0-9]+)(|,([0-9]+))" );
-
- TQRegExp rcsAdd( "a[0-9]+ ([0-9]+)" );
- TQRegExp rcsDel( "d[0-9]+ ([0-9]+)" );
-
- TQStringList::ConstIterator it = lines.begin();
-
- switch( diffFormat )
- {
- case KDiffPlugin::Context:
- while ( it != lines.end() )
- {
- if ( (*it).startsWith("***************") )
- {
- (*numberOfHunks)++;
-// kdDebug(7034) << "Context Hunk : " << (*it) << endl;
- }
- else if ( (*it).startsWith("***") )
- {
- (*numberOfFiles)++;
-// kdDebug(7034) << "Context File : " << (*it) << endl;
- }
- else if ( (*it).startsWith("---") ) {} // ignore
- else if ( (*it).startsWith("+") )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Context Insertion : " << (*it) << endl;
- }
- else if ( (*it).startsWith("-") )
- {
- (*numberOfDeletions)++;
-// kdDebug(7034) << "Context Deletion : " << (*it) << endl;
- }
- else if ( (*it).startsWith("!") )
- {
- (*numberOfChanges)++;
-// kdDebug(7034) << "Context Modified : " << (*it) << endl;
- }
- else if ( (*it).startsWith(" ") )
- {
-// kdDebug(7034) << "Context Context : " << (*it) << endl;
- }
- else
- {
-// kdDebug(7034) << "Context Unknown : " << (*it) << endl;
- }
-
- ++it;
- }
- (*numberOfChanges) /= 2; // changes are in both parts of the hunks
- (*numberOfFiles) -= (*numberOfHunks); // it counts old parts of a hunk as files :(
- break;
- case KDiffPlugin::Ed:
- while ( it != lines.end() )
- {
- if ( (*it).startsWith( "diff" ) )
- {
- (*numberOfFiles)++;
-// kdDebug(7034) << "Ed File : " << (*it) << endl;
- }
- else if ( edAdd.exactMatch( (*it) ) )
- {
-// kdDebug(7034) << "Ed Insertion : " << (*it) << endl;
- (*numberOfHunks)++;
- ++it;
- while( it != lines.end() && !(*it).startsWith(".") )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Ed Insertion : " << (*it) << endl;
- ++it;
- }
- }
- else if ( edDel.exactMatch( (*it) ) )
- {
-// kdDebug(7034) << "Ed Deletion : " << (*it) << endl;
- (*numberOfHunks)++;
- (*numberOfDeletions) += (edDel.cap(3).isEmpty() ? 1 : edDel.cap(3).toInt() - edDel.cap(1).toInt() + 1);
-// kdDebug(7034) << "Ed noOfLines : " << (edDel.cap(3).isEmpty() ? 1 : edDel.cap(3).toInt() - edDel.cap(1).toInt() + 1) << endl;
- }
- else if ( edMod.exactMatch( (*it) ) )
- {
-// kdDebug(7034) << "Ed Modification : " << (*it) << endl;
- if ( edMod.cap(3).isEmpty() )
- (*numberOfDeletions)++;
- else
- (*numberOfDeletions) += edMod.cap(3).toInt() - edMod.cap(1).toInt() + 1;
- (*numberOfHunks)++;
- ++it;
- while( it != lines.end() && !(*it).startsWith(".") )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Ed Modification : " << (*it) << endl;
- ++it;
- }
- }
- else
- {
-// kdDebug(7034) << "Ed Unknown : " << (*it) << endl;
- }
-
- ++it;
- }
- break;
- case KDiffPlugin::Normal:
- while ( it != lines.end() )
- {
- if ( (*it).startsWith( "diff" ) )
- {
- (*numberOfFiles)++;
-// kdDebug(7034) << "Normal File : " << (*it) << endl;
- }
- else if ( normalAdd.exactMatch( *it ) )
- {
-// kdDebug(7034) << "Normal Insertion : " << (*it) << endl;
- (*numberOfHunks)++;
- if ( normalAdd.cap(3).isEmpty() )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Normal Addition : " << 1 << endl;
- }
- else
- {
- (*numberOfAdditions) += normalAdd.cap(3).toInt() - normalAdd.cap(1).toInt() + 1;
-// kdDebug(7034) << "Normal Addition : " << normalAdd.cap(3).toInt() - normalAdd.cap(1).toInt() + 1 << endl;
- }
- }
- else if ( normalDel.exactMatch( *it ) )
- {
-// kdDebug(7034) << "Normal Deletion : " << (*it) << endl;
- (*numberOfHunks)++;
- if ( normalDel.cap(3).isEmpty() )
- {
- (*numberOfDeletions)++;
-// kdDebug(7034) << "Normal Deletion : " << 1 << endl;
- }
- else
- {
- (*numberOfDeletions) += normalDel.cap(3).toInt() - normalDel.cap(1).toInt() + 1;
-// kdDebug(7034) << "Normal Deletion : " << normalDel.cap(3).toInt() - normalDel.cap(1).toInt() + 1 << endl;
- }
- }
- else if ( normalMod.exactMatch( *it ) )
- {
-// kdDebug(7034) << "Normal Modification : " << (*it) << endl;
- (*numberOfHunks)++;
- if ( normalMod.cap(3).isEmpty() )
- {
- (*numberOfDeletions)++;
-// kdDebug(7034) << "Normal Deletion : " << 1 << endl;
- }
- else
- {
- (*numberOfDeletions) += normalMod.cap(3).toInt() - normalMod.cap(1).toInt() + 1;
-// kdDebug(7034) << "Normal Deletion : " << normalMod.cap(3).toInt() - normalMod.cap(1).toInt() + 1 << endl;
- }
- if ( normalMod.cap(6).isEmpty() )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Normal Addition : " << 1 << endl;
- }
- else
- {
- (*numberOfAdditions) += normalMod.cap(6).toInt() - normalMod.cap(4).toInt() + 1;
-// kdDebug(7034) << "Normal Addition : " << normalMod.cap(6).toInt() - normalMod.cap(4).toInt() + 1 << endl;
- }
- }
- else if ( (*it).startsWith(">") )
- {
-// numberOfAdditions++;
-// kdDebug(7034) << "Normal Insertion : " << (*it) << endl;
- }
- else if ( (*it).startsWith("<") )
- {
-// numberOfDeletions++;
-// kdDebug(7034) << "Normal Deletion : " << (*it) << endl;
- }
- else
- {
-// kdDebug(7034) << "Normal Unknown : " << (*it) << endl;
- }
-
- ++it;
- }
- break;
- case KDiffPlugin::RCS:
- while ( it != lines.end() )
- {
- if ( (*it).startsWith( "diff" ) ) // works for cvs diff, have to test for normal diff
- {
-// kdDebug(7034) << "RCS File : " << (*it) << endl;
- (*numberOfFiles)++;
- }
- else if ( rcsAdd.exactMatch( *it ) )
- {
-// kdDebug(7034) << "RCS Insertion : " << (*it) << endl;
- (*numberOfHunks)++;
- (*numberOfAdditions) += rcsAdd.cap(1).toInt();
-// kdDebug(7034) << "RCS noOfLines : " << rcsAdd.cap(1).toInt() << endl;
- }
- else if ( rcsDel.exactMatch( *it ) )
- {
-// kdDebug(7034) << "RCS Deletion : " << (*it) << endl;
- (*numberOfHunks)++;
- (*numberOfDeletions) += rcsDel.cap(1).toInt();
-// kdDebug(7034) << "RCS noOfLines : " << rcsDel.cap(1).toInt() << endl;
- }
- else
- {
-// kdDebug(7034) << "RCS Unknown : " << (*it) << endl;
- }
-
- ++it;
- }
- break;
- case KDiffPlugin::Unified:
- while ( it != lines.end() )
- {
- if ( (*it).startsWith("@@ ") )
- {
- (*numberOfHunks)++;
-// kdDebug(7034) << "Unified Hunk : " << (*it) << endl;
- }
- else if ( (*it).startsWith("---") )
- {
- (*numberOfFiles)++;
-// kdDebug(7034) << "Unified File : " << (*it) << endl;
- }
- else if ( (*it).startsWith("+++") ) {} // ignore (dont count as insertion)
- else if ( (*it).startsWith("+") )
- {
- (*numberOfAdditions)++;
-// kdDebug(7034) << "Unified Insertion : " << (*it) << endl;
- }
- else if ( (*it).startsWith("-") )
- {
- (*numberOfDeletions)++;
-// kdDebug(7034) << "Unified Deletion : " << (*it) << endl;
- }
- else if ( (*it).startsWith(" ") )
- {
-// kdDebug(7034) << "Unified Context : " << (*it) << endl;
- }
- else
- {
-// kdDebug(7034) << "Unified Unknown : " << (*it) << endl;
- }
-
- ++it;
- }
- break;
- case KDiffPlugin::Empty:
- case KDiffPlugin::Unknown:
- case KDiffPlugin::SideBySide:
- break;
- }
-}
-
-#include "kfile_diff.moc"
-
-/* vim: set ts=4 sw=4 noet: */
-
diff --git a/kfile-plugins/diff/kfile_diff.desktop b/kfile-plugins/diff/kfile_diff.desktop
deleted file mode 100644
index a76557ff..00000000
--- a/kfile-plugins/diff/kfile_diff.desktop
+++ /dev/null
@@ -1,57 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=Diff Stats
-Name[af]=Diff Statistiek
-Name[bg]=Статистика за разлики
-Name[br]=Stadegoù Diff
-Name[bs]=Diff statistika
-Name[ca]=Estadístiques de diff
-Name[cs]=Statistika rozdílů
-Name[cy]=Ystadegau Gwahaniaethau
-Name[da]=Diff-stats
-Name[de]=Diff-Statistiken
-Name[el]=Στατιστικά diff
-Name[es]=Estadísticas Diff
-Name[et]=Võrdlemise tulemused
-Name[eu]=Desberdintasun estatistikak
-Name[fa]=آمارهای Diff
-Name[fi]=Diff-tilastot
-Name[fr]=Statistiques de diff
-Name[ga]=Staitistic Diff
-Name[gl]=Estatísticas de diff
-Name[he]=סטטיסטיקת Diff
-Name[hi]=डिफ स्टेट्स
-Name[hr]=Diff statistike
-Name[hu]=Diff statisztika
-Name[it]=Statistiche di confronto
-Name[ja]=Diff 統計
-Name[kk]=Diff статистикасы
-Name[lt]=Skirtumų statistika
-Name[ms]=Stat Diff
-Name[nb]=Diff-statistikk
-Name[nds]=Verscheelstatistiken
-Name[ne]=भिन्न तथ्याङ्क
-Name[nl]=Diff-statistieken
-Name[nn]=Diff-statistikk
-Name[pa]=ਅੰਤਰ ਹਾਲਤ
-Name[pl]=Statystyka różnic
-Name[pt]=Estatísticas do diff
-Name[pt_BR]=Estados do Diff
-Name[ro]=Statistici Diff
-Name[ru]=Статистика различий
-Name[sk]=Štatistiky Diff
-Name[sl]=Statistike diff
-Name[sr]=Статистика разликовања
-Name[sr@Latn]=Statistika razlikovanja
-Name[sv]=Diff-statistik
-Name[ta]=டிப் ஸ்டட்ஸ்
-Name[tg]=Статистикаи фарқият
-Name[th]=สถานะแตกต่าง
-Name[tr]=Diff İstatistikleri
-Name[uk]=Статистика відмінностей
-Name[zh_CN]=Diff 统计
-Name[zh_TW]=Diff 狀態
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_diff
-MimeType=text/x-diff
-PreferredItems=Files,First,Format,Hunks,Insert,Modify,Delete
diff --git a/kfile-plugins/diff/kfile_diff.h b/kfile-plugins/diff/kfile_diff.h
deleted file mode 100644
index 5249a8ac..00000000
--- a/kfile-plugins/diff/kfile_diff.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**************************************************************************
-** kfile_diff.h
-** -------------------
-** begin : Sun Jan 20 23:25:29 2002
-** copyright : (C) 2002 by Otto Bruggeman
-** email : otto.bruggeman@home.nl
-**
-***************************************************************************/
-/***************************************************************************
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-***************************************************************************/
-
-#ifndef __KFILE_PDF_H__
-#define __KFILE_PDF_H__
-
-#include <kfilemetainfo.h>
-
-class TQStringList;
-
-class KDiffPlugin: public KFilePlugin
-{
- Q_OBJECT
-
-
-public:
- KDiffPlugin( TQObject *parent, const char *name,
- const TQStringList& preferredItems );
-
-
- virtual bool readInfo( KFileMetaInfo& info, uint what );
-
-public:
- enum Format { Context, Ed, Normal, RCS, Unified, Empty, SideBySide, Unknown };
- enum DiffProgram { CVSDiff, Diff, Diff3, Perforce, SubVersion, Undeterminable }; // cant use Unknown again :(
-
-private:
- enum Format determineDiffFormat ( const TQStringList lines ) const;
- enum DiffProgram determineDiffProgram ( const TQStringList lines ) const;
- const TQString determineI18nedFormat ( enum KDiffPlugin::Format diffFormat ) const;
- const TQString determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const;
- // yes ugly, it's better to use a struct or classmembers to pass these parameters around
- void determineDiffInfo ( const TQStringList lines,
- enum KDiffPlugin::Format diffFormat, int* numberOfFiles,
- int* numberOfHunks, int* numberOfAdditions,
- int* numberOfChanges, int* numberOfDeletions );
-};
-
-#endif
diff --git a/kfile-plugins/ts/CMakeLists.txt b/kfile-plugins/ts/CMakeLists.txt
deleted file mode 100644
index 4e68beb6..00000000
--- a/kfile-plugins/ts/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-#################################################
-#
-# (C) 2012 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${TDE_INCLUDE_DIR}
- ${TQT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-
-##### other data ################################
-
-install( FILES kfile_ts.desktop
- DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-##### kfile_ts (module) #########################
-
-tde_add_kpart( kfile_ts AUTOMOC
- SOURCES kfile_ts.cpp
- LINK kio-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kfile-plugins/ts/Makefile.am b/kfile-plugins/ts/Makefile.am
deleted file mode 100644
index dd64ec48..00000000
--- a/kfile-plugins/ts/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-## Makefile.am for text file meta info plugin
-
-# set the include path for X, qt and KDE
-INCLUDES = $(all_includes)
-
-noinst_HEADERS = kfile_ts.h
-
-kde_module_LTLIBRARIES = kfile_ts.la
-
-kfile_ts_la_SOURCES = kfile_ts.cpp
-kfile_ts_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_ts_la_LIBADD = $(LIB_KIO)
-
-# let automoc handle all of the meta source files (moc)
-METASOURCES = AUTO
-
-messages:
- $(XGETTEXT) *.cpp -o $(podir)/kfile_ts.pot
-
-services_DATA = kfile_ts.desktop
-servicesdir = $(kde_servicesdir)
diff --git a/kfile-plugins/ts/kfile_ts.cpp b/kfile-plugins/ts/kfile_ts.cpp
deleted file mode 100644
index 0d6f5dc1..00000000
--- a/kfile-plugins/ts/kfile_ts.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Carsten Niehaus <cniehaus@kde.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "kfile_ts.h"
-
-#include <kgenericfactory.h>
-#include <kdebug.h>
-
-#include <tqfile.h>
-#include <tqstringlist.h>
-
-typedef KGenericFactory<KTsPlugin> TsFactory;
-
-K_EXPORT_COMPONENT_FACTORY(kfile_ts, TsFactory("kfile_ts"))
-
-KTsPlugin::KTsPlugin(TQObject *parent, const char *name,
- const TQStringList &args) : KFilePlugin(parent, name, args)
-{
- makeMimeTypeInfo( "application/x-linguist" );
-}
-
-void KTsPlugin::makeMimeTypeInfo(const TQString& mimeType)
-{
- KFileMimeTypeInfo* info = addMimeTypeInfo(mimeType);
-
- KFileMimeTypeInfo::GroupInfo* group =
- addGroupInfo(info, "General", i18n("General"));
-
- KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Messages", i18n("Messages"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Translated", i18n("Translated"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Untranslated", i18n("Untranslated"), TQVariant::Int);
- setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Obsolete", i18n("Obsolete"), TQVariant::Int);
-}
-
-bool KTsPlugin::readInfo(KFileMetaInfo& info, uint)
-{
- TQFile f(info.path());
- if (!f.open(IO_ReadOnly))
- return false;
-
- int messages = 0;
- int untranslated = 0;
- int obsolete = 0;
-
- TQTextStream stream( &f );
- TQString line = stream.readLine();
-
- // is it really a linguist file?
- if (!line.contains("<!DOCTYPE TS>", false))
- return false;
-
- while (!stream.eof())
- {
- line = stream.readLine();
-
- if (line.contains("type=\"obsolete\"")) obsolete++;
-
- if (line.contains("<source>")) messages++;
-
- if (line.contains("type=\"unfinished\"")) untranslated++;
-
- }
-
- KFileMetaInfoGroup group = appendGroup(info, "General");
- appendItem(group, "Messages", messages);
- appendItem(group, "Translated", messages-untranslated-obsolete);
- appendItem(group, "Untranslated", untranslated);
- appendItem(group, "Obsolete", obsolete);
-
- return true;
-}
-
-#include "kfile_ts.moc"
diff --git a/kfile-plugins/ts/kfile_ts.desktop b/kfile-plugins/ts/kfile_ts.desktop
deleted file mode 100644
index be4954ad..00000000
--- a/kfile-plugins/ts/kfile_ts.desktop
+++ /dev/null
@@ -1,54 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=Qt Linguist File Info
-Name[bg]=Информация за файла Qt Linguist
-Name[br]=Restr titouroù Qt Linguist
-Name[bs]=Qt Linguist informacije o datoteci
-Name[ca]=Informació fitxer de Qt Linguist
-Name[cs]=Info o souboru Qt Linguist
-Name[cy]=Gwybodaeth Ffeil Qt Linguist
-Name[da]=Qt Linguist Fil-info
-Name[de]=Qt Linguist-Dateiinfo
-Name[el]=Πληροφορίες αρχείου Qt Linguist
-Name[es]=Información de archivo de Qt Linguist
-Name[et]=Qt Linguisti faili info
-Name[eu]=Qt Linguist fitxategi informazioa
-Name[fa]=اطلاعات پروندۀ زبان‌شناسQt
-Name[fi]=Qt Linquist -tiedoston tiedot
-Name[fr]=Fichier d'informations Qt Linguist
-Name[ga]=Eolas faoi Chomhad Qt Linguist
-Name[gl]=Información do Ficheiro de Qt Linguist
-Name[hi]=क्यूटी लिंग्विस्ट फ़ाइल जानकारी
-Name[hu]=Qt Linguist fájljellemzők
-Name[is]=Qt Linguist skráarupplýsingar
-Name[it]=Informazioni file per Qt Linguist
-Name[ja]=Qt Linguist ファイル情報
-Name[ka]=Qt Linguist ფაილის ინფორმაცია
-Name[kk]=Qt Linguist файл мәліметі
-Name[lt]=Qt Linguist bylos informacija
-Name[nb]=Informasjon om Qt Linguist-fil
-Name[nds]=QtLinguist-Datei-Info
-Name[ne]=Qt बहुभाषी फाइल सूचना
-Name[nl]=Qt Linquïst-bestandsinformatie
-Name[nn]=Informasjon om Qt Linguist-fil
-Name[pa]=Qt Linguist ਫਾਇਲ ਜਾਣਕਾਰੀ
-Name[pl]=Informacja pliku Qt Linguist
-Name[pt]=Informação do Ficheiro do Qt Linguist
-Name[pt_BR]=Arquivo de Informações de Lingüística do Qt
-Name[ru]=Информация о файле в формате Qt Linguist
-Name[sk]=Informácie pre Qt Linguist
-Name[sl]=Informacije o Qt Linguist
-Name[sr]=Информације о фајлу Qt Linguist-а
-Name[sr@Latn]=Informacije o fajlu Qt Linguist-a
-Name[sv]=Qt Linguist-filinformation
-Name[ta]=Qt மொழியியல் கோப்புகள் தகவல்
-Name[tg]=Ахборот дар бораи файл дар формати Qt Linguist
-Name[tr]=Qt Dilbilimci Dosya Bilgisi
-Name[uk]=інформація про файл формату Qt Linguist
-Name[zh_CN]=Qt 语言大师文件信息
-Name[zh_TW]=Qt 語言檔資訊
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_ts
-MimeType=application/x-linguist
-PreferredGroups=General
-PreferredItems=Messages,Translated,Untranslated,Fuzzi
diff --git a/kfile-plugins/ts/kfile_ts.h b/kfile-plugins/ts/kfile_ts.h
deleted file mode 100644
index f60972e1..00000000
--- a/kfile-plugins/ts/kfile_ts.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Carsten Niehaus <cniehaus@kde.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef __KFILE_TS_H_
-#define __KFILE_TS_H_
-
-#include <kfilemetainfo.h>
-
-class TQStringList;
-
-class KTsPlugin: public KFilePlugin
-{
- Q_OBJECT
-
-
-public:
- KTsPlugin(TQObject *parent, const char *name, const TQStringList& args);
- virtual bool readInfo(KFileMetaInfo& info, uint what);
-
-private:
- void makeMimeTypeInfo(const TQString& mimeType);
-};
-
-#endif