662 #ifdef DEBUG_RESOURCE_MATCH 670 int child_count = (
tree[6] << 24) + (
tree[7] << 16) +
672 int child = (
tree[10] << 24) + (
tree[11] << 16) +
679 while (child_count && splitter.hasNext()) {
682 #ifdef DEBUG_RESOURCE_MATCH 683 qDebug() <<
" CHILDREN" << segment;
684 for(
int j = 0; j < child_count; ++j) {
685 qDebug() <<
" " << child+j <<
" :: " <<
name(child+j);
688 const int h =
qHash(segment);
691 int l = 0, r = child_count-1;
692 int sub_node = (l+r+1)/2;
694 const int sub_node_hash =
hash(child+sub_node);
695 if(h == sub_node_hash)
697 else if(h < sub_node_hash)
701 sub_node = (l + r + 1) / 2;
707 if(
hash(sub_node) == h) {
708 while(sub_node > child &&
hash(sub_node-1) == h)
710 for(; sub_node < child+child_count &&
hash(sub_node) == h; ++sub_node) {
711 if(
name(sub_node) == segment) {
714 #ifdef DEBUG_RESOURCE_MATCH 715 qDebug() <<
" TRY" << sub_node <<
name(sub_node) << offset;
719 const short flags = (
tree[offset+0] << 8) +
720 (
tree[offset+1] << 0);
723 if(!splitter.hasNext()) {
726 (
tree[offset+1] << 0);
730 (
tree[offset+1] << 0);
732 #ifdef DEBUG_RESOURCE_MATCH 736 #ifdef DEBUG_RESOURCE_MATCH 737 qDebug() <<
"!!!!" <<
"FINISHED" << __LINE__ << sub_node;
746 #ifdef DEBUG_RESOURCE_MATCH 747 qDebug() <<
"!!!!" <<
"FINISHED" << __LINE__ << sub_node;
754 if(!(flags & Directory))
757 child_count = (
tree[offset+0] << 24) + (
tree[offset+1] << 16) +
758 (
tree[offset+2] << 8) + (
tree[offset+3] << 0);
760 child = (
tree[offset+0] << 24) + (
tree[offset+1] << 16) +
761 (
tree[offset+2] << 8) + (
tree[offset+3] << 0);
769 #ifdef DEBUG_RESOURCE_MATCH 770 qDebug() <<
"!!!!" <<
"FINISHED" << __LINE__ << node;
uint qHash(const QProcEnvKey &key)
Language language() const
Returns the language of this locale.
QString name(int node) const
int length() const
Returns the number of characters in this string.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
virtual QString mappingRoot() const
Q_CORE_EXPORT void qDebug(const char *,...)
QLocale::Language language
int size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
short flags(int node) const
The QStringRef class provides a thin wrapper around QString substrings.
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
int findOffset(int node) const
Country country() const
Returns the country of this locale.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.