File indexing completed on 2025-01-05 04:26:49

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "CoreUrl.h"
0020 
0021 using namespace QtBindings::Core;
0022 
0023 Url::Url()
0024 {
0025 }
0026 
0027 Url::Url(const QUrl &copy) : QUrl(copy)
0028 {
0029 }
0030 
0031 Url::Url(const Url &copy) : QObject(), QUrl(copy)
0032 {
0033 }
0034 
0035 Url::Url(const QString &url, QUrl::ParsingMode mode) : QUrl(url, mode)
0036 {
0037 }
0038 
0039 Url::Url(QUrl &&other) : QUrl(other)
0040 {
0041 }
0042 
0043 QUrl Url::adjusted(QUrl::FormattingOptions options) const
0044 {
0045     return QUrl::adjusted(options);
0046 }
0047 
0048 QString Url::authority(QUrl::ComponentFormattingOptions options) const
0049 {
0050     return QUrl::authority(options);
0051 }
0052 
0053 void Url::clear()
0054 {
0055     QUrl::clear();
0056 }
0057 
0058 void Url::detach()
0059 {
0060     QUrl::detach();
0061 }
0062 
0063 QString Url::errorString() const
0064 {
0065     return QUrl::errorString();
0066 }
0067 
0068 QString Url::fileName(QUrl::ComponentFormattingOptions options) const
0069 {
0070     return QUrl::fileName(options);
0071 }
0072 
0073 QString Url::fragment(QUrl::ComponentFormattingOptions options) const
0074 {
0075     return QUrl::fragment(options);
0076 }
0077 
0078 bool Url::hasFragment() const
0079 {
0080     return QUrl::hasFragment();
0081 }
0082 
0083 bool Url::hasQuery() const
0084 {
0085     return QUrl::hasQuery();
0086 }
0087 
0088 QString Url::host(QUrl::ComponentFormattingOptions options) const
0089 {
0090     return QUrl::host(options);
0091 }
0092 
0093 bool Url::isDetached() const
0094 {
0095     return QUrl::isDetached();
0096 }
0097 
0098 bool Url::isEmpty() const
0099 {
0100     return QUrl::isEmpty();
0101 }
0102 
0103 bool Url::isLocalFile() const
0104 {
0105     return QUrl::isLocalFile();
0106 }
0107 
0108 bool Url::isParentOf(const QUrl &url) const
0109 {
0110     return QUrl::isParentOf(url);
0111 }
0112 
0113 bool Url::isRelative() const
0114 {
0115     return QUrl::isRelative();
0116 }
0117 
0118 bool Url::isValid() const
0119 {
0120     return QUrl::isValid();
0121 }
0122 
0123 bool Url::matches(const QUrl &url, QUrl::FormattingOptions options) const
0124 {
0125     return QUrl::matches(url, options);
0126 }
0127 
0128 QString Url::password(QUrl::ComponentFormattingOptions options) const
0129 {
0130     return QUrl::password(options);
0131 }
0132 
0133 QString Url::path(QUrl::ComponentFormattingOptions options) const
0134 {
0135     return QUrl::path(options);
0136 }
0137 
0138 int Url::port(int defaultPort) const
0139 {
0140     return QUrl::port(defaultPort);
0141 }
0142 
0143 QString Url::query(QUrl::ComponentFormattingOptions options) const
0144 {
0145     return QUrl::query(options);
0146 }
0147 
0148 QUrl Url::resolved(const QUrl &relative) const
0149 {
0150     return QUrl::resolved(relative);
0151 }
0152 
0153 QString Url::scheme() const
0154 {
0155     return QUrl::scheme();
0156 }
0157 
0158 void Url::setAuthority(const QString &authority, QUrl::ParsingMode mode)
0159 {
0160     QUrl::setAuthority(authority, mode);
0161 }
0162 
0163 void Url::setFragment(const QString &fragment, QUrl::ParsingMode mode)
0164 {
0165     QUrl::setFragment(fragment, mode);
0166 }
0167 
0168 void Url::setHost(const QString &host, QUrl::ParsingMode mode)
0169 {
0170     QUrl::setHost(host, mode);
0171 }
0172 
0173 void Url::setPassword(const QString &password, QUrl::ParsingMode mode)
0174 {
0175     QUrl::setPassword(password, mode);
0176 }
0177 
0178 void Url::setPath(const QString &path, QUrl::ParsingMode mode)
0179 {
0180     QUrl::setPath(path, mode);
0181 }
0182 
0183 void Url::setPort(int port)
0184 {
0185     QUrl::setPort(port);
0186 }
0187 
0188 void Url::setQuery(const QString &query, QUrl::ParsingMode mode)
0189 {
0190     QUrl::setQuery(query, mode);
0191 }
0192 
0193 void Url::setQuery(const QUrlQuery &query)
0194 {
0195     QUrl::setQuery(query);
0196 }
0197 
0198 void Url::setScheme(const QString &scheme)
0199 {
0200     QUrl::setScheme(scheme);
0201 }
0202 
0203 void Url::setUrl(const QString &url, QUrl::ParsingMode mode)
0204 {
0205     QUrl::setUrl(url, mode);
0206 }
0207 
0208 void Url::setUserInfo(const QString &userInfo, QUrl::ParsingMode mode)
0209 {
0210     QUrl::setUserInfo(userInfo, mode);
0211 }
0212 
0213 void Url::setUserName(const QString &userName, QUrl::ParsingMode mode)
0214 {
0215     QUrl::setUserName(userName, mode);
0216 }
0217 
0218 void Url::swap(QUrl &other)
0219 {
0220     QUrl::swap(other);
0221 }
0222 
0223 QString Url::toDisplayString(QUrl::FormattingOptions options) const
0224 {
0225     return QUrl::toDisplayString(options);
0226 }
0227 
0228 QByteArray Url::toEncoded(QUrl::FormattingOptions options) const
0229 {
0230     return QUrl::toEncoded(options);
0231 }
0232 
0233 QString Url::toLocalFile() const
0234 {
0235     return QUrl::toLocalFile();
0236 }
0237 
0238 QString Url::toString(QUrl::FormattingOptions options) const
0239 {
0240     return QUrl::toString(options);
0241 }
0242 
0243 QString Url::url(QUrl::FormattingOptions options) const
0244 {
0245     return QUrl::url(options);
0246 }
0247 
0248 QString Url::userInfo(QUrl::ComponentFormattingOptions options) const
0249 {
0250     return QUrl::userInfo(options);
0251 }
0252 
0253 QString Url::userName(QUrl::ComponentFormattingOptions options) const
0254 {
0255     return QUrl::userName(options);
0256 }
0257 
0258 QString Url::fromAce(const QByteArray &domain)
0259 {
0260     return QUrl::fromAce(domain);
0261 }
0262 
0263 QUrl Url::fromEncoded(const QByteArray &url, QUrl::ParsingMode mode)
0264 {
0265     return QUrl::fromEncoded(url,mode);
0266 }
0267 
0268 QUrl Url::fromLocalFile(const QString &localfile)
0269 {
0270     return QUrl::fromLocalFile(localfile);
0271 }
0272 
0273 QString Url::fromPercentEncoding(const QByteArray &input)
0274 {
0275     return QUrl::fromPercentEncoding(input);
0276 }
0277 
0278 QList<QUrl> Url::fromStringList(const QStringList &uris, QUrl::ParsingMode mode)
0279 {
0280     return QUrl::fromStringList(uris,mode);
0281 }
0282 
0283 QUrl Url::fromUserInput(const QString &userInput)
0284 {
0285     return QUrl::fromUserInput(userInput);
0286 }
0287 
0288 QUrl Url::fromUserInput(const QString &userInput, const QString &workingDirectory,
0289                         QUrl::UserInputResolutionOptions options)
0290 {
0291     return QUrl::fromUserInput(userInput,workingDirectory,options);
0292 }
0293 
0294 QStringList Url::idnWhitelist()
0295 {
0296     return QUrl::idnWhitelist();
0297 }
0298 
0299 void Url::setIdnWhitelist(const QStringList &list)
0300 {
0301     QUrl::setIdnWhitelist(list);
0302 }
0303 
0304 QByteArray Url::toAce(const QString &domain)
0305 {
0306     return QUrl::toAce(domain);
0307 }
0308 
0309 QByteArray Url::toPercentEncoding(const QString &input, const QByteArray &exclude,
0310                                   const QByteArray &include)
0311 {
0312     return QUrl::toPercentEncoding(input,exclude,include);
0313 }
0314 
0315 QStringList Url::toStringList(const QList<QUrl> &uris, QUrl::FormattingOptions options)
0316 {
0317     return QUrl::toStringList(uris,options);
0318 }
0319 
0320 Url &Url::operator=(const Url &other)
0321 {
0322     if (this != &other)
0323         QUrl::operator=(other);
0324     return *this;
0325 }