Delete unused tooltip code (#81)
This commit is contained in:
@@ -287,10 +287,6 @@ Filter::HotSpot::HotSpot(int startLine , int startColumn , int endLine , int end
|
||||
, _type(NotSpecified)
|
||||
{
|
||||
}
|
||||
QString Filter::HotSpot::tooltip() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
QList<QAction*> Filter::HotSpot::actions()
|
||||
{
|
||||
return QList<QAction*>();
|
||||
@@ -418,19 +414,6 @@ UrlFilter::HotSpot::HotSpot(int startLine,int startColumn,int endLine,int endCol
|
||||
setType(Link);
|
||||
}
|
||||
|
||||
QString UrlFilter::HotSpot::tooltip() const
|
||||
{
|
||||
QString url = capturedTexts().first();
|
||||
|
||||
const UrlType kind = urlType();
|
||||
|
||||
if ( kind == StandardUrl )
|
||||
return QString();
|
||||
else if ( kind == Email )
|
||||
return QString();
|
||||
else
|
||||
return QString();
|
||||
}
|
||||
UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const
|
||||
{
|
||||
QString url = capturedTexts().first();
|
||||
|
||||
@@ -117,14 +117,6 @@ public:
|
||||
*/
|
||||
virtual QList<QAction*> actions();
|
||||
|
||||
/**
|
||||
* Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or
|
||||
* an empty string if there is no tooltip associated with this hotspot.
|
||||
*
|
||||
* The default implementation returns an empty string.
|
||||
*/
|
||||
virtual QString tooltip() const;
|
||||
|
||||
protected:
|
||||
/** Sets the type of a hotspot. This should only be set once */
|
||||
void setType(Type type);
|
||||
@@ -272,7 +264,6 @@ public:
|
||||
*/
|
||||
virtual void activate(const QString& action = QString());
|
||||
|
||||
virtual QString tooltip() const;
|
||||
private:
|
||||
enum UrlType
|
||||
{
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <QScrollBar>
|
||||
#include <QStyle>
|
||||
#include <QTimer>
|
||||
#include <QToolTip>
|
||||
#include <QtDebug>
|
||||
#include <QUrl>
|
||||
#include <QMimeData>
|
||||
@@ -1865,13 +1864,6 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
|
||||
(spot->endLine()+1)*_fontHeight );
|
||||
_mouseOverHotspotArea |= r;
|
||||
}
|
||||
// display tooltips when mousing over links
|
||||
// TODO: Extend this to work with filter types other than links
|
||||
const QString& tooltip = spot->tooltip();
|
||||
if ( !tooltip.isEmpty() )
|
||||
{
|
||||
QToolTip::showText( mapToGlobal(ev->pos()) , tooltip , this , _mouseOverHotspotArea.boundingRect() );
|
||||
}
|
||||
|
||||
update( _mouseOverHotspotArea | previousHotspotArea );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user