File indexing completed on 2024-05-12 04:38:07
0001 /* 0002 SPDX-FileCopyrightText: 2007 David Nolden <david.nolden.kdevelop@art-master.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "quickopendataprovider.h" 0008 #include <QVariant> 0009 0010 #include <QIcon> 0011 0012 namespace KDevelop { 0013 QuickOpenFileSetInterface::~QuickOpenFileSetInterface() 0014 { 0015 } 0016 0017 QuickOpenEmbeddedWidgetInterface::~QuickOpenEmbeddedWidgetInterface() 0018 { 0019 } 0020 0021 QuickOpenDataBase::~QuickOpenDataBase() 0022 { 0023 } 0024 QIcon QuickOpenDataBase::icon() const 0025 { 0026 return QIcon(); 0027 } 0028 0029 bool QuickOpenDataBase::isExpandable() const 0030 { 0031 return false; 0032 } 0033 0034 QWidget* QuickOpenDataBase::expandingWidget() const 0035 { 0036 return nullptr; 0037 } 0038 0039 QList<QVariant> QuickOpenDataBase::highlighting() const 0040 { 0041 return QList<QVariant>(); 0042 } 0043 0044 QuickOpenDataProviderBase::~QuickOpenDataProviderBase() 0045 { 0046 } 0047 0048 void QuickOpenDataProviderBase::enableData(const QStringList&, const QStringList&) 0049 { 0050 } 0051 0052 bool extractLineNumber(const QString& from, QString& path, uint& lineNumber) 0053 { 0054 int colonIndex = from.indexOf(QLatin1Char(':')); 0055 if (colonIndex != -1) { 0056 if (colonIndex == from.count() - 1) { 0057 path = from.mid(0, colonIndex); 0058 lineNumber = 0; 0059 } else { 0060 bool ok; 0061 uint number = from.midRef(colonIndex + 1).toUInt(&ok); 0062 if (ok) { 0063 path = from.mid(0, colonIndex); 0064 lineNumber = number; 0065 } else { 0066 return false; 0067 } 0068 } 0069 return true; 0070 } else { 0071 return false; 0072 } 0073 } 0074 } 0075 0076 #include "moc_quickopendataprovider.cpp"