Commit 49dc20af authored by Francis Herne's avatar Francis Herne
Browse files

Merge branch '5.6' into master

parents e2908899 05e95cac
......@@ -31,7 +31,7 @@ add_definitions( -DTRANSLATION_DOMAIN=\"kdevpython\" )
# CMake looks for exactly the specified version first and ignores newer versions.
# To avoid that, start looking for the newest supported version and work down.
set(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6 3.5 3.4)
set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4)
foreach(_PYTHON_V ${Python_ADDITIONAL_VERSIONS})
find_package(PythonInterp ${_PYTHON_V})
if ( PYTHONINTERP_FOUND )
......@@ -49,7 +49,7 @@ if ( PYTHONINTERP_FOUND AND PYTHON_VERSION_STRING VERSION_GREATER "3.4" )
endif()
if ( NOT PYTHONLIBS_FOUND OR PYTHONLIBS_VERSION_STRING VERSION_LESS "3.4.3" )
message(FATAL_ERROR "Python >= 3.4.3 but < 3.9 with --enable-shared is required to build kdev-python")
message(FATAL_ERROR "Python >= 3.4.3 but < 3.10 with --enable-shared is required to build kdev-python")
endif()
configure_file(kdevpythonversion.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/kdevpythonversion.h" @ONLY)
......
......@@ -5,7 +5,6 @@ Name[ca]=Django 1.11
Name[ca@valencia]=Django 1.11
Name[cs]=Django 1.11
Name[de]=Django 1.11
Name[el]=Django 1.11
Name[en_GB]=Django 1.11
Name[es]=Django 1.11
Name[et]=Django 1.11
......@@ -19,7 +18,6 @@ Name[pt]=Django 1.11
Name[pt_BR]=Django 1.11
Name[ru]=Django 1.11
Name[sk]=Django 1.11
Name[sl]=Django 1.11
Name[sv]=Django 1.11
Name[tr]=Django 1.11
Name[uk]=Django 1.11
......@@ -31,7 +29,6 @@ Comment=A Django project with one application
Comment[ca]=Un projecte de Django amb una aplicació
Comment[ca@valencia]=Un projecte de Django amb una aplicació
Comment[de]=Ein Django-Projekt mit einer Anwendung
Comment[el]=Ένα έργο Django με μία εφαρμογή
Comment[en_GB]=A Django project with one application
Comment[es]=Un proyecto Django con una aplicación
Comment[et]=Django projekt ühe rakendusega
......@@ -41,10 +38,9 @@ Comment[it]=Un progetto Django con un'applicazione
Comment[ko]=프로그램이 한 개 있는 Django 프로젝트
Comment[nl]=Een Django-project met één toepassing
Comment[pl]=Projekt Django wewnątrz jednej aplikacji
Comment[pt]=um projecto de Django com uma aplicação
Comment[pt]=Um projecto de Django com uma aplicação
Comment[pt_BR]=Um projeto de Django com um aplicativo
Comment[sk]=Django project s jednou aplikáciou
Comment[sl]=Projekt Django z enim programom
Comment[sv]=Ett Django-projekt med ett program
Comment[tr]=Uygulama ile birlikte bir Django projesi
Comment[uk]=Проєкт Django із однією програмою
......
......@@ -5,7 +5,6 @@ Name[ca]=Aplicació senzilla amb IGU de les Qt que usa el Designer
Name[ca@valencia]=Aplicació senzilla amb IGU de les Qt que usa el Designer
Name[cs]=Jednoduchá aplikace Qt GUI pomocí Designeru
Name[de]=Einfache Qt-GUI-Anwendung mit Designer
Name[el]=Απλή Qt GUI εφαρμογή με χρήση του Designer
Name[en_GB]=Simple Qt GUI application using Designer
Name[es]=Sencilla aplicación con interfaz gráfica de usuario que usa Designer
Name[et]=Lihtne Qt GUI rakendus Designeri abil
......@@ -18,7 +17,6 @@ Name[pl]=Prosta aplikacja z interfejsem Qt przy użyciu Designera
Name[pt]=Aplicação gráfica simples o Qt que usa o Designer
Name[pt_BR]=Aplicativo gráfico simples em Qt usando o Designer
Name[sk]=Jednoduchá Qt GUI aplikácia používajúca Designer
Name[sl]=Preprost Qt program z grafičnim vmesnikom z uporabo Snovalnika
Name[sv]=Enkelt Qt-program med grafiskt användargränssnitt som använder Designer
Name[tr]=Designer kullanarak Basit Bir QT GUI uygulaması
Name[uk]=Проста програма з графічним інтерфейсом Qt, створеним за допомогою Designer
......@@ -30,7 +28,6 @@ Comment=An example application using Qt Designer. If you edit mainwindow.ui, reg
Comment[ca]=Un exemple d'aplicació que usa el Designer de les Qt. Si editeu el «mainwindow.ui», regenereu el «mainwindow.py» invocant el «pyuic5».
Comment[ca@valencia]=Un exemple d'aplicació que usa el Designer de les Qt. Si editeu el «mainwindow.ui», regenereu el «mainwindow.py» invocant el «pyuic5».
Comment[de]=Ein Beispiel-Anwendung mit Qt Designer. Wenn Sie die Datei mainwindow.ui bearbeiten, erzeugen Sie die Datei mainwindow.py mit dem Befehl pyuic5 neu.
Comment[el]=Μια εφαρμογή παράδειγμα με χρήση του Qt Designer. Αν ανοίξετε το mainwindow.ui για επεξεργασία, παραγάγετε ξανά το mainwindow.py καλώντας το pyuic5.
Comment[en_GB]=An example application using Qt Designer. If you edit mainwindow.ui, regenerate mainwindow.py by calling pyuic5.
Comment[es]=Un ejemplo de aplicación que usa Qt Designer. Si edita mainwindow.ui, vuelva a generar mainwindow.py llamando a pyuic5.
Comment[et]=Näidisrakendus Qt Designeri abil. Kui redigeerid faili mainwindow.ui, regenereeri mainwindow.py, kutsudes välja pyuic5.
......@@ -41,9 +38,8 @@ Comment[ko]=Qt Designer를 사용하는 간단한 프로그램입니다. mainwin
Comment[nl]=Een voorbeeld toepassing met gebruik van Qt Designer. Als u mainwindow.ui bewerkt, genereer dan opnieuw mainwindow.py door pyuic5 aan te roepen.
Comment[pl]=Przykładowa aplikacja wykorzystująca Qt Designera. Po zmianie mainwindow.ui, odśwież mainwindow.py ponownie wywołując pyuic5.
Comment[pt]=Uma aplicação de exemplo que usa o Qt Designer. Se editar o 'mainwindow.ui', volte a gerar o 'mainwindow.py' ao invocar o 'pyuic5'.
Comment[pt_BR]=Um aplicativo de exemplo que usa o Qt Designer. Se editar o 'mainwindow.ui', gere novamente o 'mainwindow.py' ao chamar o 'pyuic5'.
Comment[pt_BR]=Um aplicativo de exemplo usando o Qt Designer. Se editar o 'mainwindow.ui', gere novamente o 'mainwindow.py' ao chamar o 'pyuic5'.
Comment[sk]=Ukážková aplikácia používajúca Qt Designer. Ak upravíte mainwindow.ui, pregenerujte mainwindow.py volaním pyuic5.
Comment[sl]=Preprost Qt program z grafičnim vmesnikom z uporabo Snovalnika. Če boste urejali mainwindow.ui, znova ustvarite mainwindow.py s klicem pyuic5.
Comment[sv]=Ett exempelprogram som använder Qt-designer. Om du redigerar mainwindo.ui, skapa om mainwindow.py genom att anropa pyuic5.
Comment[tr]=Qt Designer kullanan örnek bir uygulama. mainwindow.ui dosyasın düzenlerseniz, pyuic5'i çağırarak mainwindow.py dosyasını yeniden oluşturun.
Comment[uk]=Приклад програми із використанням Qt Designer. Після редагування mainwindow.ui вам слід повторно створити mainwindow.py за допомогою виклику pyuic5.
......
......@@ -4,8 +4,7 @@ Name=Simple Python Application
Name[ca]=Una aplicació senzilla en Python
Name[ca@valencia]=Una aplicació senzilla en Python
Name[cs]=Jednoduchá aplikace v Pythonu
Name[de]=Eine einfache Python-Anwendung
Name[el]=Απλή εφαρμογή Python
Name[de]=Einfache Python-Anwendung
Name[en_GB]=Simple Python Application
Name[es]=Aplicación sencilla en Python
Name[et]=Lihtne Pythoni rakendus
......@@ -16,9 +15,8 @@ Name[ko]=간단한 파이썬 프로그램
Name[nl]=Eenvoudige Python-toepassing
Name[pl]=Prosta aplikacja Pythona
Name[pt]=Aplicação Simples de Python
Name[pt_BR]=Aplicativo simples em Python
Name[pt_BR]=Aplicativo Python simples
Name[sk]=Jednoduchá Python aplikácia
Name[sl]=Preprost program v Python-u
Name[sv]=Enkelt Python-program
Name[tr]=Basit Python Uygulaması
Name[uk]=Проста програма мовою Python
......@@ -31,7 +29,6 @@ Comment[ca]=Genera l'estructura de fitxers per a començar una aplicació en Pyt
Comment[ca@valencia]=Genera l'estructura de fitxers per a començar una aplicació en Python
Comment[cs]=Vygenerovat strukturu souborů pro započetí aplikace v Pythonu
Comment[de]=Dateistruktur erstellen, auf deren Basis eine Python-Anwendung erstellt werden kann
Comment[el]=Παραγωγή δομής αρχείων για την έναρξη μιας εφαρμογής Python
Comment[en_GB]=Generate filestructure to start a Python application
Comment[es]=Generar la estructura de archivos para empezar una aplicación en Python
Comment[et]=Failistruktuuri genereerimine Pythoni rakenduse tarbeks
......@@ -44,7 +41,6 @@ Comment[pl]=Tworzy strukturę plików do rozpoczęcia projektu Pythona
Comment[pt]=Gerar a estrutura de ficheiros para iniciar uma aplicação em Python
Comment[pt_BR]=Gera a estrutura de arquivos para iniciar um aplicativo Python
Comment[sk]=Vygenerovať štruktúru súborov na spustenie aplikácie Python
Comment[sl]=Ustvari datotečno zgradbo za začetek programa v Python-u
Comment[sv]=Skapa filstruktur för att påbörja ett Python-program
Comment[tr]=Bir Python uygulaması başlatmak için dosya yapısını oluştur
Comment[uk]=Створити початкову файлову структуру програми мовою Python
......
......@@ -534,7 +534,7 @@ PythonCodeCompletionContext::ItemList PythonCodeCompletionContext::generatorItem
if ( v->unknownNames().size() >= 2 ) {
// we only take the first two, and only two. It gets too much items otherwise.
QStringList combinations;
auto names = v->unknownNames().toList();
auto names = v->unknownNames().values();
combinations << names.at(0) + ", " + names.at(1);
combinations << names.at(1) + ", " + names.at(0);
foreach ( const QString& c, combinations ) {
......
......@@ -42,6 +42,12 @@
#include <QStack>
#include "codegendebug.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
#define SkipEmptyParts Qt::SkipEmptyParts
#else
#define SkipEmptyParts QString::SkipEmptyParts
#endif
using namespace KDevelop;
namespace Python {
......@@ -165,7 +171,7 @@ void TypeCorrection::accepted()
CorrectionFileGenerator::HintType hintType = dialog->hintType();
generator.addHint(m_ui->typeText->text(), m_ui->importsText->text().split(',', QString::SkipEmptyParts), decl.data(), hintType);
generator.addHint(m_ui->typeText->text(), m_ui->importsText->text().split(',', SkipEmptyParts), decl.data(), hintType);
qCDebug(KDEV_PYTHON_CODEGEN) << "Forcing a reparse on " << decl.data()->topContext()->url();
ICore::self()->languageController()->backgroundParser()->addDocument(IndexedString(decl.data()->topContext()->url()),
......
......@@ -8,7 +8,6 @@
"Name[ca]": "Sven Brauch",
"Name[cs]": "Sven Brauch",
"Name[de]": "Sven Brauch",
"Name[el]": "Sven Brauch",
"Name[en_GB]": "Sven Brauch",
"Name[es]": "Sven Brauch",
"Name[et]": "Sven Brauch",
......@@ -38,10 +37,9 @@
"Description[ca]": "Aquest connector proveeix d'un frontal per al PDB",
"Description[cs]": "Tento modul poskytuje rozhraní pro PDB",
"Description[de]": "Dieses Modul stellt eine Oberfläche für PDB zur Verfügung.",
"Description[el]": "Αυτό το πρόσθετο παρέχει ένα περιβάλλον χρήσης για το PDB",
"Description[en_GB]": "This plugin provides a frontend for PDB",
"Description[es]": "Este complemento proporciona una interfaz para PDB",
"Description[et]": "See plugin pakub PDB kasutajaliidest",
"Description[et]": "PDB kasutajaliidese plugin",
"Description[fi]": "Tämä liitännäinen tarjoaa PDB-käyttöliittymän",
"Description[fr]": "Ce module externe fournit une interface pour PDB",
"Description[gl]": "Este complemento fornece unha interface para PDB.",
......@@ -67,22 +65,18 @@
"Name[ca]": "Implementació del depurador de Python (PDB)",
"Name[cs]": "Podpora ladění pro Python (PDB)",
"Name[de]": "Unterstützung für Python Debugger (PDB)",
"Name[el]": "Υποστήριξη διορθωτή σφαλμάτων Python (PDB)",
"Name[en_GB]": "Python Debugger (PDB) support",
"Name[es]": "Implementación del depurador Python (PDB)",
"Name[et]": "Pythoni siluri (PDB) toetus",
"Name[fr]": "Prise en charge du débogueur Python (pdb)",
"Name[gl]": "Compatibilidade co depurador de Python (PDB)",
"Name[it]": "Supporto al debugger di Python (PDB)",
"Name[ko]": "파이썬 디버거(PDB) 지원",
"Name[nl]": "Ondersteuning voor Python-debugger",
"Name[pl]": "Obsługa diagnostyki Pythona (PDB)",
"Name[pt]": "Suporte para o Depurador de Python (PDB)",
"Name[pl]": "Obsługa debuggera (PDB) Python",
"Name[pt]": "Suporte ao Depurador de Python (PDB)",
"Name[pt_BR]": "Suporte ao Python Debugger (PDB)",
"Name[sk]": "Podpora Python Debugger-a (PDB)",
"Name[sl]": "Podpora razhroščevalniku za Python (PDB)",
"Name[sv]": "Stöd för Python-avlusare (PDB)",
"Name[tr]": "Python Hata Ayıklayıcı (PDB) desteği",
"Name[uk]": "Підтримка засобу діагностики Python (PDB)",
"Name[x-test]": "xxPython Debugger (PDB) supportxx",
"Name[zh_CN]": "Python 调试器 (PDB) 支持",
......
......@@ -80,7 +80,7 @@ KJob* PdbLauncher::start(const QString& launchMode, KDevelop::ILaunchConfigurati
// check the interpreter
QProcess p;
p.setReadChannelMode(QProcess::MergedChannels);
p.setProcessChannelMode(QProcess::MergedChannels);
p.start(interpreter, QStringList() << "--version");
p.waitForFinished(500);
QByteArray version = p.readAll();
......
......@@ -177,7 +177,7 @@ bool DocfileWizard::run()
worker = new QProcess(this);
QObject::connect(worker, &QProcess::readyReadStandardError, this, &DocfileWizard::processScriptOutput);
QObject::connect(worker, &QProcess::readyReadStandardOutput, this, &DocfileWizard::processScriptOutput);
QObject::connect(worker, static_cast<void(QProcess::*)(int)>(&QProcess::finished), this, &DocfileWizard::processFinished);
QObject::connect(worker, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &DocfileWizard::processFinished);
// can never have too many slashes
outputFile.setFileName(workingDirectory + "/" + outputFilename);
......@@ -238,7 +238,7 @@ void DocfileWizard::processScriptOutput()
scrollbar->setValue(scrollbar->maximum());
}
void DocfileWizard::processFinished(int)
void DocfileWizard::processFinished(int, QProcess::ExitStatus)
{
worker = nullptr;
runButton->setEnabled(true);
......
......@@ -62,7 +62,7 @@ public slots:
bool run();
void updateOutputFilename(const QString& newModuleName);
void processScriptOutput();
void processFinished(int);
void processFinished(int, QProcess::ExitStatus);
void saveAndClose();
};
......
......@@ -1139,9 +1139,9 @@ void DeclarationBuilder::assignToSubscript(SubscriptAst* subscript, const Declar
}
auto map = MapType::Ptr::dynamicCast(list);
if ( map ) {
if ( subscript->slice && subscript->slice->astType == Ast::IndexAstType ) {
if ( subscript->slice && subscript->slice->astType != Ast::SliceAstType) {
ExpressionVisitor keyVisitor(currentContext());
keyVisitor.visitNode(static_cast<IndexAst*>(subscript->slice)->value);
keyVisitor.visitNode(subscript->slice);
AbstractType::Ptr key = keyVisitor.lastType();
if ( key ) {
map->addKeyType<Python::UnsureType>(key);
......
......@@ -365,7 +365,7 @@ void ExpressionVisitor::visitSubscript(SubscriptAst* node)
continue;
}
}
if ( (node->slice->astType != Ast::IndexAstType) && type.cast<ListType>() ) {
if ( (node->slice->astType == Ast::SliceAstType) && type.cast<ListType>() ) {
if ( type.cast<MapType>() ) {
continue; // Can't slice dicts.
}
......@@ -373,7 +373,7 @@ void ExpressionVisitor::visitSubscript(SubscriptAst* node)
result = Helper::mergeTypes(result, type);
}
else if ( const auto& indexed = type.cast<IndexedContainer>() ) {
long sliceIndex = integerValue(static_cast<IndexAst*>(node->slice)->value, indexed->typesCount());
long sliceIndex = integerValue(node->slice, indexed->typesCount());
if ( 0 <= sliceIndex && sliceIndex < indexed->typesCount() ) {
result = Helper::mergeTypes(result, indexed->typeAt(sliceIndex).abstractType());
continue;
......
......@@ -55,6 +55,12 @@
#include "kdevpythonversion.h"
#include "expressionvisitor.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
#define SkipEmptyParts Qt::SkipEmptyParts
#else
#define SkipEmptyParts QString::SkipEmptyParts
#endif
using namespace KDevelop;
namespace Python {
......@@ -320,8 +326,8 @@ static QString _relativePath(const QString &base_dir, const QString &path)
if (_base_dir[_base_dir.length()-1] != QLatin1Char('/'))
_base_dir.append(QLatin1Char('/') );
const QStringList list1 = _base_dir.split(QLatin1Char('/'), QString::SkipEmptyParts);
const QStringList list2 = _path.split(QLatin1Char('/'), QString::SkipEmptyParts);
const QStringList list1 = _base_dir.split(QLatin1Char('/'), SkipEmptyParts);
const QStringList list2 = _path.split(QLatin1Char('/'), SkipEmptyParts);
// Find where they meet
int level = 0;
......@@ -477,7 +483,7 @@ QVector<QUrl> Helper::getSearchPaths(const QUrl& workingOnDocument)
QString pythonpath = QString::fromUtf8(python.readAllStandardOutput());
if ( ! pythonpath.isEmpty() ) {
const auto paths = pythonpath.split("$|$", QString::SkipEmptyParts);
const auto paths = pythonpath.split("$|$", SkipEmptyParts);
foreach ( const QString& path, paths ) {
cachedForProject.append(QUrl::fromLocalFile(path));
}
......
......@@ -438,15 +438,15 @@ void PyDUChainTest::testCrashes_data() {
" \"\"\"! returnContentEqualsContentOf ! -3\"\"\"\n"
"e = Evil()\n"
"z = [e.aa(1), e.bb(2), e.cc(3)]";
QTest::newRow("comprehension_in_lambda") << "lambda foo: [bar for bar in foo]";
#if PYTHON_VERSION >= QT_VERSION_CHECK(3, 6, 0)
QTest::newRow("comprehension_in_fstring") <<
"def crash(): return f'expr={ {x: y for x, y in [(1, 2), ]}}'";
#endif
QTest::newRow("comprehension_in_lambda") << "lambda foo: [bar for bar in foo]";
QTest::newRow("comprehension_in_annassign_1") << "foo: int = [x for x in (42,)][0]";
QTest::newRow("comprehension_in_annassign_2") << "foo: [t for t in (int,)][0] = 42";
QTest::newRow("lambda_in_annassign_1") << "foo: int = (lambda: 42)()";
QTest::newRow("lambda_in_annassign_2") << "foo: (lambda: int)() = 42";
#endif
QTest::newRow("definition_in_baseclass_1") << "class Foo(lambda x: 1): pass";
QTest::newRow("definition_in_baseclass_2") << "class Foo([x for x in (1, 2)]): pass";
}
......@@ -954,10 +954,12 @@ void PyDUChainTest::testTypes_data()
// QTest::newRow("class_method_self") << "class c:\n def func(checkme, arg, arg2):\n pass\n" << "c";
// QTest::newRow("funccall_dict") << "def foo(): return foo; checkme = foo();" << (uint) IntegralType::TypeFunction;
#if PYTHON_VERSION >= QT_VERSION_CHECK(3, 6, 0)
// With only one subbed value we get a FormattedValue node
QTest::newRow("fstring_formattedvalue") << "name = 'Jim'; checkme = f'{name}'" << "str";
// Otherwise a JoinedString, with FormattedValues as children.
QTest::newRow("fstring_joinedstring") << "name = 'Jim'; checkme = f'Hello, {name}! Your name is {name}.'" << "str";
#endif
QTest::newRow("tuple_simple") << "mytuple = 3, 5.5\ncheckme, foobar = mytuple" << "int";
QTest::newRow("tuple_simple2") << "mytuple = 3, 5.5\nfoobar, checkme = mytuple" << "float";
......@@ -1317,6 +1319,7 @@ void PyDUChainTest::testTypes_data()
"def foo(a, b, /, c, d):\n"
" return a, b, c, d\n"
"checkme = foo(10, 'x', 2.3, d='y')\n" << "tuple of (int, str, float, str)";
QTest::newRow("fstring_self_documenting") << "checkme = f'{expr=}'" << "str";
#endif
}
......@@ -1389,7 +1392,9 @@ void PyDUChainTest::testProblemCount_data()
QTest::newRow("correct_return") << "def foo():\n return" << 0;
QTest::newRow("lambda_argument_outside") << "def bar():\n lambda foo: 3\n foo" << 1;
QTest::newRow("use_found_at_decl") << "foo = 3" << 0;
#if PYTHON_VERSION >= QT_VERSION_CHECK(3, 6, 0)
QTest::newRow("fstring_visit_inside") << "checkme = f'{name}'" << 1;
#endif
}
void PyDUChainTest::testImportDeclarations_data() {
......
This diff is collapsed.
......@@ -8,7 +8,6 @@
"Name[ca]": "Sven Brauch",
"Name[cs]": "Sven Brauch",
"Name[de]": "Sven Brauch",
"Name[el]": "Sven Brauch",
"Name[en_GB]": "Sven Brauch",
"Name[es]": "Sven Brauch",
"Name[et]": "Sven Brauch",
......@@ -38,7 +37,6 @@
"Description[ca]": "Implementació del llenguatge Python",
"Description[cs]": "Podpora jazyka Python",
"Description[de]": "Sprachunterstützung für Python",
"Description[el]": "Υποστήριξη γλώσσας Python",
"Description[en_GB]": "Python Language Support",
"Description[es]": "Implementación del lenguaje Python",
"Description[et]": "Pythoni keele toetus",
......@@ -67,7 +65,6 @@
"Name[ca]": "Implementació de Python",
"Name[cs]": "Podpora Pythonu",
"Name[de]": "Unterstützung für Python",
"Name[el]": "Υποστήριξη Python",
"Name[en_GB]": "Python Support",
"Name[es]": "Implementación de Python",
"Name[et]": "Pythoni toetus",
......
......@@ -20,9 +20,15 @@
#ifndef KDEVPYTHON_VERSION_H
#define KDEVPYTHON_VERSION_H
#define PYTHON_VERSION_MINOR @PYTHON_VERSION_MINOR@
#define PYTHON_VERSION_MINOR_STR "@PYTHON_VERSION_MINOR@"
#define PYTHON_VERSION_MAJOR @PYTHON_VERSION_MAJOR@
#define PYTHON_VERSION_MAJOR_STR "@PYTHON_VERSION_MAJOR@"
#define PYTHON_VERSION QT_VERSION_CHECK(@PYTHON_VERSION_MAJOR@, @PYTHON_VERSION_MINOR@, @PYTHON_VERSION_PATCH@)
#define PYTHON_VERSION_STR "@PYTHON_VERSION_MAJOR@.@PYTHON_VERSION_MINOR@"
#define PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@"
#endif
......@@ -17,9 +17,9 @@
<name xml:lang="nl">Python ondersteuning in KDevelop</name>
<name xml:lang="pl">Obsługa Pythona w KDevelop</name>
<name xml:lang="pt">Suporte para Python do KDevelop</name>
<name xml:lang="pt-BR">Suporte à Python do KDevelop</name>
<name xml:lang="pt-BR">Suporte a Python no KDevelop</name>
<name xml:lang="ru">Поддержка Python для KDevelop</name>
<name xml:lang="sk">Podpora jazyka Python pre KDevelop</name>
<name xml:lang="sl">Podpora Pythonu za KDevelop</name>
<name xml:lang="sv">KDevelop Python-stöd</name>
<name xml:lang="uk">Підтримка Python у KDevelop</name>
<name xml:lang="x-test">xxKDevelop Python Supportxx</name>
......@@ -39,9 +39,9 @@
<summary xml:lang="nl">Ondersteuning voor de taal Python voor KDevelop</summary>
<summary xml:lang="pl">Obsługa języka Python dla KDevelop</summary>
<summary xml:lang="pt">Suporte para a linguagem Python no KDevelop</summary>
<summary xml:lang="pt-BR">Suporta à linguagem Python para o KDevelop</summary>
<summary xml:lang="pt-BR">Suporte ao Python para o KDevelop</summary>
<summary xml:lang="ru">Поддержка языка программирования Python для KDevelop</summary>
<summary xml:lang="sk">Podpora jazyka Python pre KDevelop</summary>
<summary xml:lang="sl">Podpora jeziku Python za KDevelop</summary>
<summary xml:lang="sv">Stöd för språket Python i KDevelop</summary>
<summary xml:lang="tr">KDevelop için Python dil desteği</summary>
<summary xml:lang="uk">Підтримка мови Python у KDevelop</summary>
......@@ -56,21 +56,16 @@
<p xml:lang="ca-valencia">Afig suport de Python al KDevelop. Afig els «include» per a la integració amb el ressaltat de codi, compleció de codi, suport per al sistema de construcció, enllaços a la documentació i suport per a la depuració.</p>
<p xml:lang="en-GB">Adds Python support to KDevelop. Includes adding integration with code highlighting, code completion, build system support, documentation linking and debugging support.</p>
<p xml:lang="es">Implementa el uso de Python en KDevelop. Incluye resaltado de código, terminación automática de código, uso de sistemas de compilación, enlaces de documentación y depuración.</p>
<p xml:lang="et">Pythoni toetus KDevelopis. Lõimimine võimaldab süntaksi esiletõstmist, koodilõpetus, ehitamissüsteemi toetust, dokumentatsiooni linkimist ja silumise toetust.</p>
<p xml:lang="fr">Ajoute la prise en charge de Python à KDevelop. Les fonctionnalités incluent la coloration syntaxique, le complètement du code, la prise en charge du système de compilation, les liens avec la documentation et la prise en charge du débogage.</p>
<p xml:lang="gl">Engade compatibilidade con Python a KDevelop. Inclúe engadir integración con KDevelop para realce de código, completado de código, compatibilidade co sistema de construción, ligazóns á documentación e funcionalidade de depuración.</p>
<p xml:lang="it">Aggiunge il supporto a Python in KDevelop. Include l'integrazione con l'evidenziazione del codice, il completamente del codice, il supporto per il sistema di compilazione, il collegamento con la documentazione ed il supporto per il debugging.</p>
<p xml:lang="ko">KDevelop에 Python 지원을 추가합니다. 코드 구문 강조, 자동 완성, 빌드 시스템 지원, 문서 링크 및 디버그 지원 통합이 들어 있습니다.</p>
<p xml:lang="nl">Voegt ondersteuning voor Python toe aan KDevelop. Omvat toevoegen van integratie met accentuering van code, aanvullen van code, ondersteuning van bouwsysteem en koppelingen naar documentatie en ondersteuning van debuggen.</p>
<p xml:lang="pl">Dodaje obsługę Pythona do KDevelop. Zawiera podświetlanie kodu, uzupełnianie kodu, system budowania, odnośniki do dokumentacji oraz diagnostykę.</p>
<p xml:lang="pt">Adiciona o suporte para Python ao KDevelop. Inclui a adição da integração com o realce de código, completação de código, suporte para sistemas de compilação, referências à documentação e suporte para a depuração.</p>
<p xml:lang="pt-BR">Adiciona suporte para Python ao KDevelop. Inclui a adição da integração com o realce de código, completação de código, suporte para sistemas de compilação, referências à documentação e suporte para depuração.</p>
<p xml:lang="sk">Pridá podporu Pythonu do KDevelopu. Zahŕňa pridanie integrácie so zvýrazňovaním kódu, ukončovanie kódu, podpora systému zostavení, linkovanie dokumentácie a podporu ladenia.</p>
<p xml:lang="sl">Programu KDevelop doda podporo za Python. Vključuje dodatek integracije z označevanjem kode, dokončanje kode, gradnje podpore sistema, povezovanje dokumentacije in podporo za odpravljanje napak</p>
<p xml:lang="sv">Lägger till stöd för Python i KDevelop. Inkluderar tillägg av integrering med kodfärgläggning, kodkomplettering, byggsystemstöd, dokumentationslänkning och avlusningsstöd.</p>
<p xml:lang="uk">Додає підтримку Python до KDevelop. Включено інтеграцію із засобами підсвічування коду, автоматичне доповнення коду, підтримку систем збирання, інтеграцію посилань на документацію та засобів діагностики.</p>
<p xml:lang="x-test">xxAdds Python support to KDevelop. Includes adding integration with code highlighting, code completion, build system support, documentation linking and debugging support.xx</p>
<p xml:lang="zh-TW">對 KDevelop 增加 Python 支援。包含增加程式碼突顯、程式碼自動完成、編譯系統支援、文件連結及除錯支援整合。</p>
</description>
<developer_name>Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="ca">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
......@@ -89,7 +84,6 @@
<developer_name xml:lang="pt">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="pt-BR">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="sk">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="sl">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="sv">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="tr">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
<developer_name xml:lang="uk">Sven Brauch &lt;mail@svenbrauch.de&gt;</developer_name>
......
......@@ -128,12 +128,7 @@ DictAst::DictAst(Ast* parent): ExpressionAst(parent, Ast::DictAstType)
}
IndexAst::IndexAst(Ast* parent): SliceAstBase(parent, Ast::IndexAstType), value(nullptr)
{
}
SliceAst::SliceAst(Ast* parent): SliceAstBase(parent, Ast::SliceAstType), lower(nullptr), upper(nullptr), step(nullptr)
SliceAst::SliceAst(Ast* parent): ExpressionAst(parent, Ast::SliceAstType), lower(nullptr), upper(nullptr), step(nullptr)
{
}
......@@ -143,7 +138,7 @@ DictionaryComprehensionAst::DictionaryComprehensionAst(Ast* parent): ExpressionA
}
EllipsisAst::EllipsisAst(Ast* parent): SliceAstBase(parent, Ast::EllipsisAstType)
EllipsisAst::EllipsisAst(Ast* parent): ExpressionAst(parent, Ast::EllipsisAstType)
{
}
......@@ -173,11 +168,6 @@ YieldFromAst::YieldFromAst(Ast* parent) : ExpressionAst(parent, Ast::YieldFromAs
}
ExtendedSliceAst::ExtendedSliceAst(Ast* parent): SliceAstBase(parent, Ast::ExtendedSliceAstType)
{
}
ForAst::ForAst(Ast* parent): StatementAst(parent, Ast::ForAstType), target(nullptr), iterator(nullptr)
{
......@@ -288,11 +278,6 @@ SetComprehensionAst::SetComprehensionAst(Ast* parent): ExpressionAst(parent, Ast
}
SliceAstBase::SliceAstBase(Ast* parent, AstType type): Ast(parent, type)
{
}
StatementAst::StatementAst(Ast* parent, AstType type): Ast(parent, type)
{
......
......@@ -55,7 +55,6 @@ namespace Python {
class ExceptionHandlerAst;
class AliasAst;
class ComprehensionAst;
class SliceAstBase;
class SliceAst;
}
......@@ -102,7 +101,6 @@ public:
NameConstantAstType,
CallAstType,
AttributeAstType,
ExtendedSliceAstType,
DictionaryComprehensionAstType,
BooleanOperationAstType,
BinaryOperationAstType,
......@@ -127,10 +125,8 @@ public:
TupleAstType,
YieldFromAstType,
ComprehensionAstType,
SliceAstType,
EllipsisAstType,
IndexAstType,
AssignmentExpressionAstType,
LastExpressionType, // keep this at the end of the expr ast list
......@@ -244,16 +240,6 @@ public:
class KDEVPYTHONPARSER_EXPORT Identifier : public Ast {
public:
Identifier(QString value);
Identifier operator=(const Identifier& other) {
value = other.value;
startCol = other.startCol;
endCol = other.endCol;
startLine = other.startLine;
endLine = other.endLine;
parent = other.parent;
hasUsefulRangeInformation = other.hasUsefulRangeInformation;
return *this;
};
bool operator==(const Identifier& rhs) const {
return value == rhs.value;
};
......@@ -681,7 +667,7 @@ class KDEVPYTHONPARSER_EXPORT SubscriptAst : public ExpressionAst {
public:
SubscriptAst(Ast* parent);
ExpressionAst* value;
SliceAstBase* slice;
ExpressionAst* slice;
ExpressionAst::Context context;
};
......@@ -706,18 +692,12 @@ public:
ExpressionAst::Context context;
};
/** Slice classes **/
class KDEVPYTHONPARSER_EXPORT SliceAstBase : public Ast {
public:
SliceAstBase(Ast* parent, AstType type);
};
class KDEVPYTHONPARSER_EXPORT EllipsisAst : public SliceAstBase {
class KDEVPYTHONPARSER_EXPORT EllipsisAst : public ExpressionAst {
public:
EllipsisAst(Ast* parent);
};
class KDEVPYTHONPARSER_EXPORT SliceAst : public SliceAstBase {
class KDEVPYTHONPARSER_EXPORT SliceAst : public ExpressionAst {
public:
SliceAst(Ast* parent);
ExpressionAst* lower;
......@@ -725,17 +705,6 @@ public:
ExpressionAst* step;
};
class KDEVPYTHONPARSER_EXPORT ExtendedSliceAst : public SliceAstBase {
public:
ExtendedSliceAst(Ast* parent);
QList<SliceAst*> dims;
};
class KDEVPYTHONPARSER_EXPORT IndexAst : public SliceAstBase {
public:
IndexAst(Ast* parent);
ExpressionAst* value;
};
/** Independent classes **/
......
Markdown is supported
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