* 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 <q3popupmenu.h>
#include <kdebug.h>
#include <kprotocolinfo.h>
+#include <kprotocolmanager.h>
#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);
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
//menu->insertItems(m_protocols);
connect(menu, SIGNAL(activated(int)), this, SLOT(setProtocol(int)));
setText(protocol);
- setPopup(menu);
+ setMenu(menu);
setFlat(true);
}
}
QString protocol = m_protocols[index];
-kdDebug() << "setProtocol " << index << " " << protocol << endl;
+kDebug() << "setProtocol " << index << " " << protocol << endl;
setText(protocol);
emit activated(protocol);
/* */