src/gui/util/qcompleter.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   919 }
   919 }
   920 
   920 
   921 void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path)
   921 void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path)
   922 {
   922 {
   923     Q_Q(QCompleter);
   923     Q_Q(QCompleter);
       
   924 #ifndef QT_NO_LINEEDIT
   924     QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget);
   925     QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget);
   925     //the path given by QFileSystemModel does not end with /
   926     //the path given by QFileSystemModel does not end with /
   926     if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
   927     if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
   927         q->complete();
   928         q->complete();
       
   929 #endif
   928 }
   930 }
   929 
   931 
   930 /*!
   932 /*!
   931     Constructs a completer object with the given \a parent.
   933     Constructs a completer object with the given \a parent.
   932 */
   934 */