本文整理汇总了C++中setAutoDelete函数的典型用法代码示例。如果您正苦于以下问题:C++ setAutoDelete函数的具体用法?C++ setAutoDelete怎么用?C++ setAutoDelete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setAutoDelete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setAutoDelete
void
GeoImageList::clear()
{
setAutoDelete(TRUE);
QDict < GeoImage >::clear();
list_.clear();
setAutoDelete(FALSE);
minMaxResUptodate_ = false;
}
示例2: setAutoDelete
void TreeLeaf::setInitialSettings(int i_parent_id, const QString &str_name, int i_tree_id)
{
setAutoDelete(false); //do not delete instance of the object after the "run" execution
setItemColor();
//
m_iParentID = i_parent_id; // id of the parent node (id_parent_node). For the trop-levels node it is 0
//
m_iDBTreeID = i_tree_id;
//
this->setText(0, str_name);
//
m_strDatabaseNodeName = str_name;
//
//if (0 == m_iParentID)
this->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable|Qt::ItemIsEditable);
//else
// this->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable|Qt::ItemIsEditable/*|Qt::ItemIsDropEnabled|Qt::ItemIsDragEnabled*/);
//
//no attachments requested yet.
//
m_bIsAttachmentRequestedAlready = false;
//
//force delete is disabled
//
m_bForceDelete = false;
}
示例3: setAutoDelete
TreeDiagram::TreeDiagram(ClassDef *root,bool doBases)
{
setAutoDelete(TRUE);
DiagramRow *row=new DiagramRow(this,0);
append(row);
row->insertClass(0,root,doBases,Public,Normal,0);
}
示例4: plugins
bool qtractorInsertPluginCommand::undo (void)
{
qtractorPlugin *pPlugin = plugins().first();
if (pPlugin == NULL)
return false;
qtractorSession *pSession = qtractorSession::getInstance();
if (pSession == NULL)
return false;
// Save the previous track alright...
qtractorPluginList *pPluginList = pPlugin->list();
if (pPluginList == NULL)
return false;
// pSession->lock();
qtractorPlugin *pNextPlugin = pPlugin->next();
// Insert it...
pPluginList->removePlugin(pPlugin);
// Swap it nice, finally.
m_pNextPlugin = pNextPlugin;
// Whether to allow the disposal of the plugin reference.
setAutoDelete(true);
// pSession->unlock();
return true;
}
示例5: context
ScatterPlot::ScatterPlot(Context *context) : context(context)
{
setAutoDelete(false); // no don't delete on detach !
curve = NULL;
curve2 = NULL;
hover = NULL;
hover2 = NULL;
grid = NULL;
ride = NULL;
static_cast<QwtPlotCanvas*>(canvas())->setFrameStyle(QFrame::NoFrame);
setAxisMaxMinor(xBottom, 0);
setAxisMaxMinor(yLeft, 0);
QwtScaleDraw *sd = new QwtScaleDraw;
sd->setTickLength(QwtScaleDiv::MajorTick, 3);
setAxisScaleDraw(QwtPlot::xBottom, sd);
sd = new QwtScaleDraw;
sd->setTickLength(QwtScaleDiv::MajorTick, 3);
sd->enableComponent(QwtScaleDraw::Ticks, false);
sd->enableComponent(QwtScaleDraw::Backbone, false);
setAxisScaleDraw(QwtPlot::yLeft, sd);
connect(context, SIGNAL(configChanged(qint32)), this, SLOT(configChanged(qint32)));
connect(context, SIGNAL(intervalHover(IntervalItem*)), this, SLOT(intervalHover(IntervalItem*)));
// lets watch the mouse move...
new mouseTracker(this);
configChanged(CONFIG_APPEARANCE | CONFIG_GENERAL); // use latest wheelsize/cranklength and colors
}
示例6: QRunnable
Generic_Extractor::Generic_Extractor(void* z_context, const std::string& z_output_uri, const QString& file_path) : QRunnable()
{
error.calling_method = "Generic_Extractor::Generic_Extractor";
if ( z_context == NULL ) {
error.msg = "z_context is NULL";
throw error;;
}
if ( z_output_uri.empty() == true) {
error.msg = "z_output_uri is empty";
throw error;
}
if ( file_path.isEmpty() == true ) {
error.msg = "file_path is empty";
throw error;
}
zmq_context = (zmq::context_t*) z_context;
zmq_output_uri = z_output_uri;
file = file_path;
setAutoDelete(true);
if ( autoDelete() == false ) {
error.msg = "Cannot set autoDelete option";
throw error;
}
}
示例7: setAutoDelete
CoreAttributesList::~CoreAttributesList()
{
if (autoDelete())
{
/* We need to make sure that the CoreAttributes are first removed from
* the list and then deleted. */
setAutoDelete(false);
while (!isEmpty())
{
CoreAttributes* tp = getFirst();
removeRef(tp);
delete tp;
}
setAutoDelete(true);
}
}
示例8: setObjectName
void DUChainControlFlowJob::init(const QString &jobName)
{
setObjectName(i18n("Generating control flow graph for %1", jobName));
setCapabilities(Killable);
setAutoDelete(false);
ICore::self()->uiController()->registerStatus(this);
}
示例9: masterRef
/*!
* \brief SimulationManager::SimulationManager
*/
SimulationManager::SimulationManager() :
masterRef( Master::getInstance() ),
slaveRef( Slave::getInstance() ),
environmentRef( Environment::getInstance() )
{
setAutoDelete( false );
}
示例10: setAutoDelete
TPtrList::TPtrList(){
setAutoDelete(true);
first = 0;
last = 0;
current = 0;
count = 0;
}
示例11: m_opcode
EQPacketOPCode::EQPacketOPCode(uint16_t opcode, const QString& name)
: m_opcode(opcode),
m_implicitLen(0),
m_name(name)
{
setAutoDelete(true);
}
示例12: m_pScanner
ScannerTask::ScannerTask(LibraryScanner* pScanner,
const ScannerGlobalPointer scannerGlobal)
: m_pScanner(pScanner),
m_scannerGlobal(scannerGlobal),
m_success(false) {
setAutoDelete(true);
}
示例13: RootItem
Feed::Feed(RootItem *parent)
: RootItem(parent), m_url(QString()), m_status(Normal), m_autoUpdateType(DefaultAutoUpdate),
m_autoUpdateInitialInterval(DEFAULT_AUTO_UPDATE_INTERVAL), m_autoUpdateRemainingInterval(DEFAULT_AUTO_UPDATE_INTERVAL),
m_totalCount(0), m_unreadCount(0) {
setKind(RootItemKind::Feed);
setAutoDelete(false);
}
示例14: it_attribute
/*!
The constructor registers the QmvClass parent class, and populates itself
with relevant QmvTupleAttribute objects.
\param parent The parent class.
*/
QmvTuple::QmvTuple( QmvTuple * t )
{
parent_class = t->parent_class;
QDictIterator<QmvTupleAttribute> it_attribute(*t);
while (it_attribute.current() )
{
QmvTupleAttribute * old_ta = it_attribute.current();
QmvTupleAttribute * new_ta = new QmvTupleAttribute( this, old_ta->metaAttribute() );
// do not copy unique indexes or system attributes
if ( old_ta->accessMethod() != QmvAttribute::SystemAccess )
{
// Text primary keys can be munged, otherwise clear them
// Non-key attributes are copied.
if ( old_ta->attributeName() == parent_class->primaryKey() ||
old_ta->attributeName() == parent_class->userKey() )
if ( old_ta->attributeType() == "text" )
new_ta->update( QString( "%1_COPY" ).arg(old_ta->currentValue()) );
else
new_ta->update( QString( "" ) );
else
new_ta->update( old_ta->currentValue() );
}
insert( it_attribute.currentKey(), (QmvTupleAttribute *) new_ta);
++it_attribute;
}
setAutoDelete( TRUE );
}
示例15: Q_D
bool KJob::exec()
{
Q_D(KJob);
// Usually this job would delete itself, via deleteLater() just after
// emitting result() (unless configured otherwise). Since we use an event
// loop below, that event loop will process the deletion event and we'll
// have been deleted when exec() returns. This crashes, so temporarily
// suspend autodeletion and manually do it afterwards.
const bool wasAutoDelete = isAutoDelete();
setAutoDelete( false );
Q_ASSERT( ! d->eventLoop );
QEventLoop loop( this );
d->eventLoop = &loop;
start();
if( !d->isFinished ) {
d->eventLoop->exec(QEventLoop::ExcludeUserInputEvents);
}
d->eventLoop = 0;
if ( wasAutoDelete ) {
deleteLater();
}
return ( d->error == NoError );
}