equal
deleted
inserted
replaced
553 } |
553 } |
554 |
554 |
555 /*! |
555 /*! |
556 \obsolete |
556 \obsolete |
557 |
557 |
|
558 Use QDir::addSearchPath() with a prefix instead. |
|
559 |
558 Adds \a path to the search paths searched in to find resources that are |
560 Adds \a path to the search paths searched in to find resources that are |
559 not specified with an absolute path. The \a path must be an absolute |
561 not specified with an absolute path. The \a path must be an absolute |
560 path (start with \c{/}). |
562 path (start with \c{/}). |
561 |
563 |
562 The default search path is to search only in the root (\c{:/}). The last |
564 The default search path is to search only in the root (\c{:/}). The last |
563 path added will be consulted first upon next QResource creation. |
565 path added will be consulted first upon next QResource creation. |
564 |
566 */ |
565 Use QDir::addSearchPath() with a prefix instead. |
|
566 */ |
|
567 |
|
568 void |
567 void |
569 QResource::addSearchPath(const QString &path) |
568 QResource::addSearchPath(const QString &path) |
570 { |
569 { |
571 if (!path.startsWith(QLatin1Char('/'))) { |
570 if (!path.startsWith(QLatin1Char('/'))) { |
572 qWarning("QResource::addResourceSearchPath: Search paths must be absolute (start with /) [%s]", |
571 qWarning("QResource::addResourceSearchPath: Search paths must be absolute (start with /) [%s]", |
576 QMutexLocker lock(resourceMutex()); |
575 QMutexLocker lock(resourceMutex()); |
577 resourceSearchPaths()->prepend(path); |
576 resourceSearchPaths()->prepend(path); |
578 } |
577 } |
579 |
578 |
580 /*! |
579 /*! |
|
580 \obsolete |
|
581 |
|
582 Use QDir::searchPaths() instead. |
|
583 |
581 Returns the current search path list. This list is consulted when |
584 Returns the current search path list. This list is consulted when |
582 creating a relative resource. |
585 creating a relative resource. |
583 |
586 |
584 \sa QDir::addSearchPath() QDir::setSearchPaths() |
587 \sa QDir::addSearchPath() QDir::setSearchPaths() |
585 */ |
588 */ |