Exemple #1
0
// We handle "parameters" separated by a semicolon, while KURL.cpp does not,
// which can lead to different results in some cases.
String KURL::lastPathComponent() const
{
    if (!m_isValid)
        return stringForInvalidComponent();
    ASSERT(!m_string.isNull());

    // When the output ends in a slash, WebCore has different expectations than
    // the GoogleURL library. For "/foo/bar/" the library will return the empty
    // string, but WebCore wants "bar".
    url::Component path = m_parsed.path;
    if (path.len > 0 && m_string[path.end() - 1] == '/')
        path.len--;

    url::Component file;
    if (m_string.is8Bit())
        url::ExtractFileName(asURLChar8Subtle(m_string), path, &file);
    else
        url::ExtractFileName(m_string.characters16(), path, &file);

    // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns
    // a null string when the path is empty, which we duplicate here.
    if (!file.is_nonempty())
        return String();
    return componentString(file);
}
Exemple #2
0
String KURL::pass() const {
  // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns
  // a null string when the password is empty, which we duplicate here.
  if (!m_parsed.password.is_nonempty())
    return String();
  return componentString(m_parsed.password);
}
Exemple #3
0
String KURL::fragmentIdentifier() const {
  // Empty but present refs ("foo.com/bar#") should result in the empty
  // string, which componentString will produce. Nonexistent refs
  // should be the null string.
  if (!m_parsed.ref.is_valid())
    return String();
  return componentString(m_parsed.ref);
}
Exemple #4
0
String KURL::query() const {
  if (m_parsed.query.len >= 0)
    return componentString(m_parsed.query);

  // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns
  // an empty string when the query is empty rather than a null (not sure
  // which is right).
  // Returns a null if the query is not specified, instead of empty.
  if (m_parsed.query.is_valid())
    return emptyString();
  return String();
}
QString QgsFilterVerticesAlgorithmBase::shortHelpString() const
{
  return QObject::tr( "Filters away vertices based on their %1, returning geometries with only "
                      "vertex points that have a %1 ≥ the specified minimum value and ≤ "
                      "the maximum value.\n\n"
                      "If the minimum value is not specified than only the maximum value is tested, "
                      "and similarly if the maximum value is not specified than only the minimum value is tested.\n\n"
                      "Depending on the input geometry attributes and the filters used, "
                      "the resultant geometries created by this algorithm may no longer be valid." ).arg( componentString() );
}
Exemple #6
0
String KURL::path() const
{
    return componentString(m_parsed.path);
}
Exemple #7
0
String KURL::user() const
{
    return componentString(m_parsed.username);
}
Exemple #8
0
String KURL::host() const
{
    return componentString(m_parsed.host);
}
Exemple #9
0
String KURL::protocol() const
{
    return componentString(m_parsed.scheme);
}