X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5252c12db4929886dbe502013e0a1fee6500f568..f42d1d2c02eb7e608564f137ce97f9424d9c49f6:/src/protocolcombo.cpp diff --git a/src/protocolcombo.cpp b/src/protocolcombo.cpp index b91b102cd..94f4e359c 100644 --- a/src/protocolcombo.cpp +++ b/src/protocolcombo.cpp @@ -14,20 +14,21 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include #include #include +#include #include "protocolcombo.h" const static int customProtocolIndex = 0; -ProtocolCombo::ProtocolCombo(const QString& protocol, URLNavigator* parent) - : URLNavigatorButton(-1, parent), +ProtocolCombo::ProtocolCombo(const QString& protocol, UrlNavigator* parent) + : UrlNavigatorButton(-1, parent), m_protocols(KProtocolInfo::protocols()) { qSort(m_protocols); @@ -36,18 +37,18 @@ ProtocolCombo::ProtocolCombo(const QString& protocol, URLNavigator* parent) Q3PopupMenu* menu = new Q3PopupMenu(this); while (it != itEnd) { - //kdDebug() << "info for " << *it << " " + //kDebug() << "info for " << *it << " " // << KProtocolInfo::protocolClass(*it) << endl; //TODO: wow this is ugly. or .. is it? ;) we need a way to determine // if a protocol is appropriate for use in a file manager. hum! //if (KProtocolInfo::capabilities(*it).findIndex("filemanager") == -1) if (KProtocolInfo::protocolClass(*it) == ":" || - !KProtocolInfo::supportsWriting(*it)) + !KProtocolManager::supportsWriting(*it)) { - //kdDebug() << "!!! removing " << *it << endl; + //kDebug() << "!!! removing " << *it << endl; QStringList::iterator tempIt = it; ++tempIt; - m_protocols.remove(it); + m_protocols.erase(it); it = tempIt; } else @@ -69,7 +70,7 @@ ProtocolCombo::ProtocolCombo(const QString& protocol, URLNavigator* parent) //menu->insertItems(m_protocols); connect(menu, SIGNAL(activated(int)), this, SLOT(setProtocol(int))); setText(protocol); - setPopup(menu); + setMenu(menu); setFlat(true); } @@ -100,7 +101,7 @@ void ProtocolCombo::setProtocol(int index) } QString protocol = m_protocols[index]; -kdDebug() << "setProtocol " << index << " " << protocol << endl; +kDebug() << "setProtocol " << index << " " << protocol << endl; setText(protocol); emit activated(protocol); /* */