summaryrefslogtreecommitdiffstats
path: root/src/kooldock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kooldock.cpp')
-rw-r--r--src/kooldock.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/kooldock.cpp b/src/kooldock.cpp
index 58a0831..fb9cc9c 100644
--- a/src/kooldock.cpp
+++ b/src/kooldock.cpp
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <math.h>
+#include <algorithm>
#include <qpixmap.h>
#include <qimage.h>
@@ -967,7 +968,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton)
if ((fMinimizedOnly==0 || winfo.isMinimized()) && (fCurrent==0 || winfo.isOnDesktop(KWin::currentDesktop())))
{
KPopupMenu *tmpMenu = new KPopupMenu;
- createMenu(item->getId(), tmpMenu, &winfo);
+ createMenu(tmpMenu, &winfo);
connect(tmpMenu, SIGNAL(aboutToShow()), SLOT(menuShow()));
popups.append (tmpMenu);
appMenu->setItemParameter(appMenu->insertItem(*item->getIcon(iwBig2), item->getName(), tmpMenu), item->getId());
@@ -984,7 +985,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton)
else
{
iGroup=false;
- createMenu(cId, appMenu, &winfo);
+ createMenu(appMenu, &winfo);
}
appMenu->insertSeparator();
appMenu->insertItem(SmallIcon("forward"), "KoolDock", popup);
@@ -1406,7 +1407,7 @@ void KoolDock::edit()
}
-void KoolDock::run(QString command)
+void KoolDock::run(const QString& command)
{
QString exec;
@@ -2878,7 +2879,15 @@ void KoolDock::removeItem()
}
-void KoolDock::addFile(QString filename, QString iconname, QString execname, QString name, bool notify, bool terminal, bool tclose, bool cuser, QString puser)
+void KoolDock::addFile(const QString& filename,
+ const QString& iconname,
+ const QString& execname,
+ const QString& name,
+ bool notify,
+ bool terminal,
+ bool tclose,
+ bool cuser,
+ QString puser)
{
QString progPath = locateLocal("data", "kooldock");
QString menuPath = progPath + QString("/menu/");
@@ -2942,7 +2951,7 @@ void KoolDock::addFile(QString filename, QString iconname, QString execname, QSt
}
-bool KoolDock::ignored(QString appname)
+bool KoolDock::ignored(const QString& appname)
{
if(ignoreList.count()>0)
{
@@ -3054,12 +3063,12 @@ void KoolDock::chkRestart()
}
-void KoolDock::setMainPath(QString path)
+void KoolDock::setMainPath(const QString& path)
{
mainPath = path;
}
-void KoolDock::setArgs(QString params)
+void KoolDock::setArgs(const QString& params)
{
args = params;
if (args=="-options" || args=="-o") editPref();
@@ -3658,7 +3667,7 @@ void KoolDock::aboutToHide()
menuCount--;
}
-void KoolDock::createMenu(WId id, KPopupMenu* tmpMenu, KWin::WindowInfo * info)
+void KoolDock::createMenu(KPopupMenu* tmpMenu, KWin::WindowInfo * info)
{
QString appTitle;
int menustate;