* 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 <QMenu>
#include <kdebug.h>
#include <kprotocolinfo.h>
qSort(m_protocols);
QStringList::iterator it = m_protocols.begin();
QStringList::iterator itEnd = m_protocols.end();
- Q3PopupMenu* menu = new Q3PopupMenu(this);
+ QMenu* menu = new QMenu(this);
while (it != itEnd)
{
//kDebug() << "info for " << *it << " "
//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)
+
+ // DF: why not just supportsListing?
+
if (KProtocolInfo::protocolClass(*it) == ":" ||
!KProtocolManager::supportsWriting(*it))
{
//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);
}